[PATCH 12 of 36] context: move __ne__ from changectx

Sean Farley sean.michael.farley at gmail.com
Wed Aug 7 13:13:12 CDT 2013


# HG changeset patch
# User Sean Farley <sean.michael.farley at gmail.com>
# Date 1375740032 18000
#      Mon Aug 05 17:00:32 2013 -0500
# Node ID 0b673783f3caa2e53a86efdf5cd1177adacc313d
# Parent  b6fba3a11c94e653cab0a481788724c9a6b356df
context: move __ne__ from changectx

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -48,10 +48,13 @@
         try:
             return self._rev == other._rev
         except AttributeError:
             return False
 
+    def __ne__(self, other):
+        return not (self == other)
+
     def rev(self):
         return self._rev
     def node(self):
         return self._node
     def hex(self):
@@ -160,13 +163,10 @@
         try:
             return hash(self._rev)
         except AttributeError:
             return id(self)
 
-    def __ne__(self, other):
-        return not (self == other)
-
     def __nonzero__(self):
         return self._rev != nullrev
 
     @propertycache
     def _changeset(self):


More information about the Mercurial-devel mailing list