i have found a bug in manifest.diff. this happens when i try to commit a change
in my repository. it raises an AssertionError that says sortdiff failed. i think
the manifest cache code is getting confused. i do not know why.
this patch fixes the problem for me.
diff -r 68f81ba07b2a mercurial/manifest.py
--- a/mercurial/manifest.py Thu Oct 20 11:41:14 2005 -0700
+++ b/mercurial/manifest.py Thu Oct 20 22:14:54 2005 -0700
@@ -43,11 +43,9 @@
# this is sneaky, as we're not actually using a and b
if self.listcache and self.addlist and self.listcache[0] == a:
d = mdiff.diff(self.listcache[1], self.addlist, 1)
- if mdiff.patch(a, d) != b:
- raise AssertionError(_("sortdiff failed!"))
- return d
- else:
- return mdiff.textdiff(a, b)
+ if mdiff.patch(a, d) == b:
+ return d
+ return mdiff.textdiff(a, b)
def add(self, map, flags, transaction, link, p1=None, p2=None,
changed=None):
|