[darcs-devel] Bug in get_extra :)

Anthony Towns aj at azure.humbug.org.au
Thu Dec 30 08:50:27 PST 2004


Hi all,

More commutation bug fun :)

So, I'm still trying to actually understand the merge algorithm, but 
it's not falling in to place for me in theory, which means I'm still 
experimenting. The latest was to see what darcs thinks commuted mergers 
should look like.

Anyway, what doesn't work is if you have three patches, A, B and C, with 
A and B conflicting, A and C conflicting, but B not conflicting, and 
doing odd merges with them. In particular:

This works:
	cd x; darcs pull ../a; darcs pull ../b; darcs pull ../c

This works too:
	cd y; darcs pull ../b; darcs pull ../c; darcs pull ../a

But this doesn't:
	cd y; darcs pull ../b; darcs pull -p c ../x
	
because darcs decides "c" depends on "a". This seems wrong to me, but 
isn't necessarily unacceptable.

But this gives you a bug:

	cd y; darcs pull ../b; darcs pull ../c; darcs pull ../x

	Fail: bug in get_extra.
	Most likely this is caused by a bug that existed in darcs prior
	to version 1.0.1.  Details for dealing with this issue can be
	found at http://www.scannedinavian.org/DarcsWiki/Issues1_2e0_2e1

A script to reproduce the bug is attached. Before anyone points out the 
obvious -- yes, this occurs if you only use darcs post-1.0.1 to create 
and manipulate all the patches involved.

Cheers,
aj, who wonders what would happen if physicists went to church to file
     bug reports when their experiments didn't pan out quite how they'd
     hoped
-------------- next part --------------

f () {
   for a in "$@"; do echo $a; done > foo.txt
}

mkdir init
(cd init
 darcs init
 f foo bar
 darcs add foo.txt
 darcs record -am init
)

darcs get --repo-name a init
(cd a
 f hello bar
 darcs record -am a
)

darcs get --repo-name b init
(cd b
 darcs replace bar hello foo.txt
 darcs record -am b
)

darcs get --repo-name c init
(cd c
 f bar foo
 darcs record -am c
)

darcs get --repo-name x init
(cd x
 darcs pull -a ../a
 darcs pull -a ../b
 darcs pull -a ../c
)

darcs get --repo-name y init
(cd y
 darcs pull -a ../b
 darcs pull -a ../c
 darcs pull -a ../x
)




More information about the darcs-devel mailing list