Issue22

Title manifest.diff can be confused
Priority bug Status resolved
Superseder Nosy List mason, mpm, vadim
Assigned To vadim Topics

Created on 2005-10-21.05:15:06 by vadim, last changed 2005-11-04.23:19:00 by vadim.

Files
File name Uploaded Type Edit Remove
manifest.diff vadim, 2005-10-26.03:41:03 text/x-patch
Messages
msg141 (view) Author: vadim Date: 2005-11-04.23:19:00
this works for me now. thank you.
msg72 (view) Author: mpm Date: 2005-10-26.23:17:49
Please retest this and mark it resolved if it works.
msg61 (view) Author: mpm Date: 2005-10-26.05:18:30
I just killed the whole function.
msg54 (view) Author: vadim Date: 2005-10-26.03:41:24
matt, please apply.
msg53 (view) Author: vadim Date: 2005-10-26.03:41:03
i talked to chris. he says the patch i have attached is best.
msg21 (view) Author: mason Date: 2005-10-21.17:35:08
This happens with every change you submit?

Could you please attach the output from hg manifest

I might need a tar of the repo to debug it, would that be possible?
msg18 (view) Author: mpm Date: 2005-10-21.16:36:24
If you know what changeset is causing the problem, please do:

hg log --debug -r <changeset> # get first manifest rev, 1419 here 
...
manifest:    1419:e2e597083e6ccaa0ea382950418eaafce6cb7075
...          

hg debugdata .hg/00manifest.d 1418 > before
hg debugdata .hg/00manifest.d 1419 > after

and attach them here.
msg17 (view) Author: vadim Date: 2005-10-21.15:08:55
yes i can reproduce it 100%.
msg15 (view) Author: mpm Date: 2005-10-21.07:20:08
Eep! Is this reproduceable? The message should instead say "sortdiff failed!
report it immediately!"
msg14 (view) Author: vadim Date: 2005-10-21.05:15:06
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):
History
Date User Action Args
2005-11-04 23:19:00vadimsetstatus: testing -> resolved
nosy: mpm, vadim, mason
messages: + msg141
2005-10-26 23:17:49mpmsetnosy: mpm, vadim, mason
messages: + msg72
assignedto: mason -> vadim
2005-10-26 05:18:30mpmsetnosy: mpm, vadim, mason
messages: + msg61
2005-10-26 03:41:24vadimsetstatus: chatting -> testing
nosy: mpm, vadim, mason
messages: + msg54
2005-10-26 03:41:04vadimsetfiles: + manifest.diff
nosy: mpm, vadim, mason
messages: + msg53
2005-10-21 18:04:28mpmsetnosy: mpm, vadim, mason
assignedto: mpm -> mason
2005-10-21 17:46:50masonsetnosy: + mason
2005-10-21 17:35:08masonsetmessages: + msg21
2005-10-21 16:37:26mpmsetassignedto: mpm
2005-10-21 16:37:13mpmsetnosy: + mpm
2005-10-21 16:36:24mpmsetmessages: + msg18
2005-10-21 15:08:55vadimsetmessages: + msg17
2005-10-21 07:20:08mpmsetstatus: unread -> chatting
messages: + msg15
2005-10-21 05:15:06vadimcreate