Show More
@@ -44,6 +44,12 b' class basectx(object):' | |||||
44 | def __repr__(self): |
|
44 | def __repr__(self): | |
45 | return "<%s %s>" % (type(self).__name__, str(self)) |
|
45 | return "<%s %s>" % (type(self).__name__, str(self)) | |
46 |
|
46 | |||
|
47 | def __eq__(self, other): | |||
|
48 | try: | |||
|
49 | return type(self) == type(other) and self._rev == other._rev | |||
|
50 | except AttributeError: | |||
|
51 | return False | |||
|
52 | ||||
47 | def rev(self): |
|
53 | def rev(self): | |
48 | return self._rev |
|
54 | return self._rev | |
49 | def node(self): |
|
55 | def node(self): | |
@@ -162,12 +168,6 b' class changectx(basectx):' | |||||
162 | except AttributeError: |
|
168 | except AttributeError: | |
163 | return id(self) |
|
169 | return id(self) | |
164 |
|
170 | |||
165 | def __eq__(self, other): |
|
|||
166 | try: |
|
|||
167 | return self._rev == other._rev |
|
|||
168 | except AttributeError: |
|
|||
169 | return False |
|
|||
170 |
|
||||
171 | def __ne__(self, other): |
|
171 | def __ne__(self, other): | |
172 | return not (self == other) |
|
172 | return not (self == other) | |
173 |
|
173 |
General Comments 0
You need to be logged in to leave comments.
Login now