[darcs-devel] Bug in commute / ChangePref?

Anthony Towns aj at azure.humbug.org.au
Wed Sep 29 12:49:56 PDT 2004


Hi,

I'm trying to understand the way commute's meant to work. One thing that
I don't understand is the behaviour for ChangePref commuting. As far as I
can see, if you have:

	ChangePref boringfile foo bar ; ChangePref boringfile bar baz

then you shouldn't be able to commute, but afaics darcs thinks you
can. This means if you do:

	mkdir one
	cd one
	darcs init
	darcs setpref boringfile foo
	darcs record -a --patch-name foo
	darcs setpref boringfile bar
	darcs record -a --patch-name bar
	cd ..

	mkdir two
	cd two
	darcs init
	darcs pull -a --patches bar ../one
	darcs unpull --patch bar
	cat _darcs/prefs/prefs

You end up with boringfile set to "foo", when you should be back at your
initial state, afaics?

Is that a bug or the way it's meant to work? If it's a bug, does adding
something like:

	commute (ChangePref p f1 t1, ChangePref p f2 t2) = Nothing

somewhere around line 751 of Patch.lhs fix it? (Though, presumably
composite patches would also have to be taken into account?)

Cheers,
aj

-- 
Anthony Towns <aj at humbug.org.au> <http://azure.humbug.org.au/~aj/>
Don't assume I speak for anyone but myself. GPG signed mail preferred.

``Like the ski resort of girls looking for husbands and husbands looking
  for girls, the situation is not as symmetrical as it might seem.''
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.osuosl.org/pipermail/darcs-devel/attachments/20040930/54c1a8cc/attachment.pgp


More information about the darcs-devel mailing list