[PATCH 12 of 35 V2] context: move __ne__ from changectx
Sean Farley
sean.michael.farley at gmail.com
Wed Aug 7 23:51:26 UTC 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 e43d5f413432111e14823853e0ac9aeb59bc05b9
# Parent e685c688e55f971b359f3f77d008b12dbe0485d6
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 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):
More information about the Mercurial-devel
mailing list