# HG changeset patch # User Benjamin Peterson # Date 2018-12-14 07:20:28 # Node ID 038108a9811c472d38046adab8dba7bcac522140 # Parent 6f2510b581a0955b71f79578af16634ecdf0305e upgrade: correct implementation of improvement.__ne__ The "not" operator binds more closely than "==": >>> not False == False False diff --git a/mercurial/upgrade.py b/mercurial/upgrade.py --- a/mercurial/upgrade.py +++ b/mercurial/upgrade.py @@ -142,7 +142,7 @@ class improvement(object): return self.name == other.name def __ne__(self, other): - return not self == other + return not (self == other) def __hash__(self): return hash(self.name)