The following sequence results in darcs 2.5.2 reporting that there is
a bug, confirmed by myself and wferi in #darcs:
1. Create repo foo;
2. Create a non-empty file in foo and record it;
3. Clone foo to bar;
4. Remove the file in foo and record it;
5. Add another line to the file in bar and record it;
6. Pull from foo into bar, obtain conflict notification;
7. Note that executing mark-conflicts causes a crash.
Full reproduction given here:
$ mkdir foo
$ cd foo/
foo$ darcs initialize
foo$ touch shopping
foo$ vi shopping <-- add a couple of lines
foo$ darcs add shopping
foo$ darcs record
addfile ./shopping
Shall I record this change? (1/2) [ynW...], or ? for more options: y
hunk ./shopping 1
+cake
+pie
Shall I record this change? (2/2) [ynW...], or ? for more options: y
What is the patch name? Added shopping
Do you want to add a long comment? [yn]n
Finished recording patch 'Added shopping'
foo$ cd ..
$ darcs get foo/ bar
$ cd bar/
bar$ vi shopping <-- add another line
bar$ darcs record
hunk ./shopping 2
+beer
Shall I record this change? (1/1) [ynW...], or ? for more options: y
What is the patch name? Added beer
Do you want to add a long comment? [yn]n
Finished recording patch 'Added beer'
bar$ cd ../foo
foo$ rm shopping
foo$ darcs record
hunk ./shopping 1
-cake
-pie
Shall I record this change? (1/2) [ynW...], or ? for more options: y
rmfile ./shopping
Shall I record this change? (2/2) [ynW...], or ? for more options: y
What is the patch name? Removed shopping
Do you want to add a long comment? [yn]n
Finished recording patch 'Removed shopping'
foo$ cd ../bar
bar$ darcs pull
Pulling from "../foo"...
Mon Nov 14 19:26:44 GMT 2011 dukedave@gmail.com
* Removed shopping
Shall I pull this patch? (1/1) [ynW...], or ? for more options: y
Backing up ./shopping(-darcs-backup0)
We have conflicts in the following files:
./shopping
Finished pulling and applying.
bar$ darcs whatsnew
hunk ./shopping 1
-cake
-pie
rmfile ./shopping
bar$ darcs mark-conflicts
This will trash any unrecorded changes in the working directory.
Are you sure? [yn]y
darcs: bug at src/Darcs/Repository/Internal.hs:319 compiled Jun 25 2011 09:28:23
There was an attempt to write an invalid pending! user error (No such
file AnchoredPath [Name "shopping"])
If possible, please send the contents of _darcs/patches/pending_buggy
along with a bug report.
See http://wiki.darcs.net/BugTracker/Reporting for help on bug reporting.
|