[darcs-devel] [darcs #492] bug

James Cheney via RT bugs at darcs.net
Wed Aug 17 06:54:41 PDT 2005


Wed Aug 17 09:54:29 2005: New ticket: 492.
Transaction: Ticket created by james.cheney at gmail.com
       Queue: Darcs
     Subject: bug
       Owner: Nobody
  Requestors: james.cheney at gmail.com
      Status: new
 Ticket <URL: http://bugs.darcs.net/.//Ticket/Display.html?id=492 >

Hi,

i've been playing with darcs. In particular I'm interested in understanding 
how the theory of patches works, and if more can be done with it to make it 
into a real mathematical theory. To that end, I've been trying various evil 
combinations of patches, and ran across the following bug. Basically, I 
decided to see what happens if one source tree inserts a file foo, records, 
deletes foo, and records; simultaneously the other tree inserts directory 
foo/, records, deletes foo/ and records again. This is a pathological case, 
but things like this have to be considered if you want to prove something...

Anyway, here is what I did.

--James

[jcheney at dhcp-2-167 test2]$ darcs add foo
[jcheney at dhcp-2-167 test2]$ darcs record
adddir ./foo
Shall I record this patch? (1/1) [ynWsfqadjk], or ? for help: y
What is the patch name? addfoo5
Do you want to add a long comment? [yn] b
Invalid response, try again!
Do you want to add a long comment? [yn] n
Finished recording patch 'addfoo5'
[jcheney at dhcp-2-167 test2]$ darcs remove foo
[jcheney at dhcp-2-167 test2]$ darcs record
rmdir ./foo
Shall I record this patch? (1/1) [ynWsfqadjk], or ? for help: y
What is the patch name? removefoo5
Do you want to add a long comment? [yn] b
Invalid response, try again!
Do you want to add a long comment? [yn] n
Finished recording patch 'removefoo5'
[jcheney at dhcp-2-167 test2]$ cd ..
[jcheney at dhcp-2-167 darcstest]$ cd test1
[jcheney at dhcp-2-167 test1]$ cat > foo
asdfasdf
[jcheney at dhcp-2-167 test1]$ darcs add foo
[jcheney at dhcp-2-167 test1]$ darcs record
hunk ./d/foo 1
-asdfasdf
-asdfasdfasdf
-fofofoof
-gogogogo
-asdf
Shall I record this patch? (1/4) [ynWsfqadjk], or ? for help: n
addfile ./foo
Shall I record this patch? (3/4) [ynWsfqadjk], or ? for help: y
hunk ./foo 1
+asdfasdf
Shall I record this patch? (4/4) [ynWsfqadjk], or ? for help: y
What is the patch name? addfoo6
Do you want to add a long comment? [yn] n
Finished recording patch 'addfoo6'
[jcheney at dhcp-2-167 test1]$ darcs remove foo
[jcheney at dhcp-2-167 test1]$ rm foo
[jcheney at dhcp-2-167 test1]$ darcs record
hunk ./d/foo 1
-asdfasdf
-asdfasdfasdf
-fofofoof
-gogogogo
-asdf
Shall I record this patch? (1/4) [ynWsfqadjk], or ? for help: n
hunk ./foo 1
-asdfasdf
Shall I record this patch? (3/4) [ynWsfqadjk], or ? for help: y
rmfile ./foo
Shall I record this patch? (4/4) [ynWsfqadjk], or ? for help: y
What is the patch name? removefoo6
Do you want to add a long comment? [yn] b
Invalid response, try again!
Do you want to add a long comment? [yn] n
Finished recording patch 'removefoo6'
[jcheney at dhcp-2-167 test1]$ darcs pull
Pulling from "../test2"...

Wed Aug 17 12:40:17 BST 2005 jcheney at inf.ed.ac.uk
* addfoo5
Shall I pull this patch? (1/2) [ynWvpxqadjk], or ? for help: y

Wed Aug 17 12:40:31 BST 2005 jcheney at inf.ed.ac.uk
* removefoo5
Shall I pull this patch? (2/2) [ynWvpxqadjk], or ? for help: y
darcs: bug in darcs!
in function reconcile_unwindings
Original patch:
merger 0.0 (
merger 0.0 (
(
move ./foo ./foo-conflict
adddir ./foo
)
rmfile ./foo
)
merger 0.0 (
hunk ./foo-conflict 1
-asdfasdf
merger 0.0 (
hunk ./foo-conflict 1
+asdfasdf
merger 0.0 (
addfile ./foo-conflict
rmdir ./foo
)
)
)
)
Please report this to bugs at darcs.net
If possible include the output of 'darcs --exact-version'.
[jcheney at dhcp-2-167 test1]$ darcs --exact-version
darcs compiled on Jun 22 2005, at 03:01:59
# configured Tue May 24 18:34:35 EDT 2005
sh ./configure

Context:

[TAG 1.0.3
Tomasz Zielonka <tomasz.zielonka at gmail.com>**20050524215127]





More information about the darcs-devel mailing list