##// END OF EJS Templates
Add equality operators to changectx and filectx
Matt Mackall -
r3165:e7818574 default
parent child Browse files
Show More
@@ -31,6 +31,9 b' class changectx(object):'
31 31 def __repr__(self):
32 32 return "<changectx %s>" % short(self.node())
33 33
34 def __eq__(self, other):
35 return self._rev == other._rev
36
34 37 def changeset(self):
35 38 try:
36 39 return self._changeset
@@ -126,6 +129,9 b' class filectx(object):'
126 129 def __repr__(self):
127 130 return "<filectx %s@%s>" % (self.path(), short(self.node()))
128 131
132 def __eq__(self, other):
133 return self._path == other._path and self._changeid == other._changeid
134
129 135 def filerev(self): return self._filerev
130 136 def filenode(self): return self._filenode
131 137 def filelog(self): return self._filelog
General Comments 0
You need to be logged in to leave comments. Login now