Submitter | Pierre-Yves David |
---|---|
Date | April 11, 2017, 10:47 p.m. |
Message ID | <0646947aaf15ffa2a0f0.1491950870@nodosa.octopoid.net> |
Download | mbox | patch |
Permalink | /patch/20118/ |
State | Accepted |
Headers | show |
Comments
Patch
diff --git a/mercurial/upgrade.py b/mercurial/upgrade.py --- a/mercurial/upgrade.py +++ b/mercurial/upgrade.py @@ -138,6 +138,12 @@ class improvement(object): for k, v in kwargs.items(): setattr(self, k, v) + def __eq__(self, other): + if not isinstance(other, improvement): + # This is what python tell use to do + return NotImplemented + return self.name == other.name + def finddeficiencies(repo): """returns a list of deficiencies that the repo suffer from""" newreporeqs = localrepo.newreporequirements(repo)