##// 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 class changectx(object):
31 def __repr__(self):
31 def __repr__(self):
32 return "<changectx %s>" % short(self.node())
32 return "<changectx %s>" % short(self.node())
33
33
34 def __eq__(self, other):
35 return self._rev == other._rev
36
34 def changeset(self):
37 def changeset(self):
35 try:
38 try:
36 return self._changeset
39 return self._changeset
@@ -126,6 +129,9 class filectx(object):
126 def __repr__(self):
129 def __repr__(self):
127 return "<filectx %s@%s>" % (self.path(), short(self.node()))
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 def filerev(self): return self._filerev
135 def filerev(self): return self._filerev
130 def filenode(self): return self._filenode
136 def filenode(self): return self._filenode
131 def filelog(self): return self._filelog
137 def filelog(self): return self._filelog
General Comments 0
You need to be logged in to leave comments. Login now