Mercurial > public > mercurial-scm > hg
comparison mercurial/upgrade.py @ 32029:9e35848fa007
upgrade: implement '__hash__' on 'improvement' class
The pythonomicon request its implementation.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Mon, 17 Apr 2017 13:07:31 +0200 |
parents | 99f63f476a72 |
children | e47223576b8d |
comparison
equal
deleted
inserted
replaced
32028:99f63f476a72 | 32029:9e35848fa007 |
---|---|
144 return NotImplemented | 144 return NotImplemented |
145 return self.name == other.name | 145 return self.name == other.name |
146 | 146 |
147 def __ne__(self, other): | 147 def __ne__(self, other): |
148 return not self == other | 148 return not self == other |
149 | |
150 def __hash__(self): | |
151 return hash(self.name) | |
149 | 152 |
150 def finddeficiencies(repo): | 153 def finddeficiencies(repo): |
151 """returns a list of deficiencies that the repo suffer from""" | 154 """returns a list of deficiencies that the repo suffer from""" |
152 newreporeqs = localrepo.newreporequirements(repo) | 155 newreporeqs = localrepo.newreporequirements(repo) |
153 | 156 |