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

login
register
mail settings
Submitter Sean Farley
Date Aug. 7, 2013, 11:51 p.m.
Message ID <e43d5f413432111e1482.1375919486@laptop.local>
Download mbox | patch
Permalink /patch/2065/
State Accepted
Headers show

Comments

Sean Farley - Aug. 7, 2013, 11:51 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 e43d5f413432111e14823853e0ac9aeb59bc05b9
# Parent  e685c688e55f971b359f3f77d008b12dbe0485d6
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 type(self) == type(other) and 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):
@@ -166,13 +169,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):