Show More
@@ -36,7 +36,10 b' class changectx(object):' | |||
|
36 | 36 | return "<changectx %s>" % str(self) |
|
37 | 37 | |
|
38 | 38 | def __eq__(self, other): |
|
39 | return self._rev == other._rev | |
|
39 | try: | |
|
40 | return self._rev == other._rev | |
|
41 | except AttributeError: | |
|
42 | return False | |
|
40 | 43 | |
|
41 | 44 | def __nonzero__(self): |
|
42 | 45 | return self._rev != nullrev |
@@ -176,7 +179,11 b' class filectx(object):' | |||
|
176 | 179 | return "<filectx %s>" % str(self) |
|
177 | 180 | |
|
178 | 181 | def __eq__(self, other): |
|
179 | return self._path == other._path and self._changeid == other._changeid | |
|
182 | try: | |
|
183 | return (self._path == other._path | |
|
184 | and self._changeid == other._changeid) | |
|
185 | except AttributeError: | |
|
186 | return False | |
|
180 | 187 | |
|
181 | 188 | def filectx(self, fileid): |
|
182 | 189 | '''opens an arbitrary revision of the file without |
@@ -139,9 +139,9 b' def findcopies(repo, m1, m2, ma, limit):' | |||
|
139 | 139 | ''' check if an apparent pair actually matches ''' |
|
140 | 140 | c2 = ctx(f2, man[f2]) |
|
141 | 141 | ca = c.ancestor(c2) |
|
142 | if c == ca or c2 == ca: | |
|
142 | if not ca or c == ca or c2 == ca: | |
|
143 | 143 | return |
|
144 |
if |
|
|
144 | if ca.path() == c.path() or ca.path() == c2.path(): | |
|
145 | 145 | copy[c.path()] = f2 |
|
146 | 146 | copy[f2] = c.path() |
|
147 | 147 |
General Comments 0
You need to be logged in to leave comments.
Login now