darcs

Issue 549 regrem - rollback patch done while in conflict behaves badly (1.0.9, stable)

Title regrem - rollback patch done while in conflict behaves badly (1.0.9, stable)
Priority bug Status resolved
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, kowey, ppessi, thorkilnaur, tommy
Assigned To
Topics Conflicts

Created on 2007-10-18.12:13:39 by ppessi, last changed 2009-08-27.14:07:30 by admin.

Files
File name Uploaded Type Edit Remove
1.0.9.exact ppessi, 2007-10-18.12:13:37 application/octet-stream
regrem-bug ppessi, 2007-10-18.12:13:37 application/octet-stream
stable.exact ppessi, 2007-10-18.12:13:37 application/octet-stream
Messages
msg2169 (view) Author: ppessi Date: 2007-10-18.12:13:37
A rollback patch done while in conflict behaves badly. A demonstration
script regrem-bug attached as well as --exact-version from stable and
1.0.9.
Attachments
msg2190 (view) Author: ppessi Date: 2007-10-29.13:58:23
I took the liberty to change priority to 'bug' as the web interface does not
accept edits otherwise.

So let's explain what I think happening in the demo script regrem-bug.
 
Local repo contains patches { p0 x0 } and p1 is pulled. The conflict is resolved
by rolling back x0, so repository now contains patches { p0 x0 p1 -x0 } (the
order from left to right is one in which the patches are applied).

Next the patch p2 from remote repository is pulled with context { p0 p1 }. When
darcs tries to commute p2 past the patch-rollback pair x0 -x0, it reports bug in
reconcile_unwindings.

Output from the regrem-bug shell script follows:

 $ sh ~/bin/regrem-bug
/home/ppessi/bin/regrem-bug: running in /tmp/demo-12233
Recording changes in "f":

Finished recording patch 'p0'
Recording changes in "f":

Finished recording patch 'p1'
Recording changes in "f":

Finished recording patch 'p2'
+ : Demonstrate problem with regrem
+ time darcs pull --patch p0 ../R0 --all
Finished pulling and applying.
0.00user 0.00system 0:01.01elapsed 1%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+1287minor)pagefaults 0swaps
+ darcs whatsnew
No changes!
+ : Create local change and record it
+ echo X0
+ darcs record --ignore-time -m x0 --all f
Recording changes in "f":

Finished recording patch 'x0'
+ time darcs pull --patch p1 ../R0 --all
Pulling from "../R0"...
We have conflicts in the following files:
./f
Finished pulling and applying.
0.01user 0.00system 0:01.02elapsed 1%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+1315minor)pagefaults 0swaps
+ darcs whatsnew
{
hunk ./f 1
-0
+v v v v v v v
+1
+*************
+X0
+^ ^ ^ ^ ^ ^ ^
}
+ : Resolve conflict - rollback our patch
+ darcs revert --all
Finished reverting.
+ yes
+ darcs rollback --patch x0

Mon Oct 29 15:24:11 EET 2007  Pekka Pessi <Pekka.Pessi@nokia.com>
  * x0
Shall I rollback this patch? [yNvpq], or ? for help: 
Finished rolling back.
+ darcs revert --all
There are no changes to revert!
Finished reverting.
+ : Create local change and record it
+ echo X1
+ darcs record --ignore-time -m x1 --all f
Recording changes in "f":

Finished recording patch 'x1'
+ time darcs pull --patch p2 ../R0 --all
Pulling from "../R0"...
darcs: bug in darcs!
in function reconcile_unwindings
Original patch:
merger 0.0 (
regrem 0.0 (
hunk ./f 1
-0
+1
hunk ./f 1
-0
+X0
)
merger 0.0 (
merger 0.0 (
hunk ./f 1
-0
+1
hunk ./f 1
-0
+X0
)
hunk ./f 1
-1
+2
)
)
Please report this to bugs@darcs.net
If possible include the output of 'darcs --exact-version'.
Command exited with non-zero status 1
0.00user 0.00system 0:00.01elapsed 81%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+1269minor)pagefaults 0swaps
+ exit 1
msg2553 (view) Author: droundy Date: 2008-01-17.20:34:17
This is fixed in darcs-unstable.  Thanks for the bug report!
History
Date User Action Args
2007-10-18 12:13:40ppessicreate
2007-10-29 13:58:25ppessisettopic: + Conflicts
status: unread -> unknown
messages: + msg2190
2008-01-17 20:34:18droundysetstatus: unknown -> resolved-in-unstable
nosy: droundy, tommy, beschmi, kowey, ppessi
messages: + msg2553
2008-09-04 21:31:31adminsetstatus: resolved-in-unstable -> resolved
nosy: + dagit
2009-08-06 17:39:44adminsetnosy: + markstos, jast, Serware, dmitry.kurochkin, darcs-devel, zooko, mornfall, simon, thorkilnaur, - droundy, ppessi
2009-08-06 20:36:44adminsetnosy: - beschmi
2009-08-10 22:09:06adminsetnosy: + ppessi, - markstos, darcs-devel, zooko, jast, Serware, mornfall
2009-08-11 00:02:49adminsetnosy: - dagit
2009-08-25 17:53:21adminsetnosy: + darcs-devel, - simon
2009-08-27 14:07:30adminsetnosy: tommy, kowey, darcs-devel, ppessi, thorkilnaur, dmitry.kurochkin