Issue 746 unrevert/reorder => bug in get_extra commuting patch (2.0.0pre3)

Title unrevert/reorder => bug in get_extra commuting patch (2.0.0pre3)
Priority bug Status need-info
Superseder Nosy List beschmi, dagit, droundy, kowey, quick, tommy
Assigned To quick Topics

Created on 2008-03-12.21:16:14 by quick, last changed 2008-05-07.14:35:29 by kowey.

Messages
msg3877 (view) Author: quick Date: 2008-03-12.21:16:11
I haven't had time to try reproducing this, but I'm reporting it to see if 
anyone else has run into a similar issue.

In an active tree:

$ darcs pull
... pull some new patches ...
$ darcs optimize --reorder
This operation will make unrevert impossible!
Proceed? [yn]n

darcs failed:  Cancelled to avoid unrevert catastrophe!
$ darcs unrevert
Backing up ./a/b/c/X-darcs-backup0
We have conflicts in the following files:
./a/b/c/X=
hunk ./a/b/c/X 20
-       old stuff
+       new stuff
Shall I unrevert this change? (1/?)  [ynWsfvpxdaqjkc], or ? for help: n
Skipped unrevert of 1 patch due to dependencies.
I'm about to write_unrevert.
Finished unreverting.
$

[Note that I didn't initially notice the conflicts report.  Why would unrevert 
encounter a conflict, especially when I haven't indicated I wanted anything 
done yet?!  The intention was just to see what was unrevertable... not to 
actually effect any change.  Since I didn't notice the conflict problem, I 
moved forward to request the optimization since I didn't care about the above 
change:]

$ darcs optimize --reorder
Done optimizing!
$

[Here is where I got wise: it reordered without asking about destroying 
unrevertability!  What happens if I do it again?]

$ darcs optimize --reorder
darcs: bug in get_extra commuting patch:
Wed Mar  5 15:11:46 MST 2008  Kevin Quick
  * blah blah blah
$

[Wow, didn't expect that.  Looking at the patch reported, it does not include 
the a/b/c/X file that the unrevert had trouble with.]

$ darcs -v
2.0.0pre3 (unknown)
$ darcs --exact-version
darcs compiled on Feb  6 2008, at 23:31:19
unknown
$

[I have no idea why there was a conflict, although I assume that the stored 
revert patch conflicted with some more recent patches applied to the tree.  So 
let's try cleaning up:]

$ darcs check
The repository is consistent!                                        
$ darcs w -l
a .a/b/c/X-darcs-backup0

[Nothing seems to be wrong, but is that true?]

$ darcs optimize --reorder
darcs: bug in get_extra commuting patch:
Wed Mar  5 15:11:46 MST 2008  Kevin Quick
  * blah blah blah
$

Yup, definite problems.

-KQ

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
msg3948 (view) Author: droundy Date: 2008-03-21.15:50:47
Yes, this is definitely a real bug.  It'll take time to track down, though.  It
also doesn't show up on hashed-format repositories.  The bug is in optimize
--reorder, which doesn't affect the working directory, and doesn't actually make
unrevert impossible.  But we check on an intermediate stage of the reordering
(basically, we remove a bunch of patches and then add them back).

David
msg4451 (view) Author: kowey Date: 2008-05-02.09:13:44
Resurrecting this bug (now that darcs 2 is out).  Kevin, I presume this is still
happening with the released darcs2? 

I'm feeling a bit uneasy because I have seen a couple of reports of this
'get_extra commuting patch' error on the bug tracker, some of which involve darcs 2

Browse related patches: unstable | stable

History
Date User Action Args
2008-03-12 21:16:14quickcreate
2008-03-21 15:50:49droundysetpriority: bug
status: unread -> deferred
messages: + msg3948
nosy: droundy, tommy, beschmi, kowey, quick
2008-05-02 09:13:46koweysetstatus: deferred -> chatting
nosy: + dagit
messages: + msg4451
title: unrevert/reorder bug -> unrevert/reorder => bug in get_extra commuting patch (2.0.0pre3)
2008-05-07 14:35:29koweysetstatus: chatting -> need-info
nosy: droundy, tommy, beschmi, kowey, dagit, quick
assignedto: quick