Patchwork [12,of,36] context: move __ne__ from changectx

login
register
mail settings
Submitter Sean Farley
Date Aug. 7, 2013, 6:13 p.m.
Message ID <0b673783f3caa2e53a86.1375899192@laptop.local>
Download mbox | patch
Permalink /patch/2029/
State Superseded
Commit da27cc3bd9f7916ba1d86b49f2f1cc74e53a15a6
Delegated to: Augie Fackler
Headers show

Comments

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

Patch

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):