mercurial/context.py
changeset 3198 e78185746554
parent 3154 15d585dcdd1c
child 3199 ebdb3f616bc0
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -31,6 +31,9 @@ class changectx(object):
     def __repr__(self):
         return "<changectx %s>" % short(self.node())
 
+    def __eq__(self, other):
+        return self._rev == other._rev
+
     def changeset(self):
         try:
             return self._changeset
@@ -126,6 +129,9 @@ class filectx(object):
     def __repr__(self):
         return "<filectx %s@%s>" % (self.path(), short(self.node()))
 
+    def __eq__(self, other):
+        return self._path == other._path and self._changeid == other._changeid
+
     def filerev(self): return self._filerev
     def filenode(self): return self._filenode
     def filelog(self): return self._filelog