[darcs-users] Colin Walters blogs on Arch changesets vs Darcs

Anthony Towns aj at azure.humbug.org.au
Sat Nov 27 00:44:39 UTC 2004


Andrew Pimlott wrote:
> But what is the combination of two patches that both add (and probably
> add different contents to) the same file?  The natural (if unintuitive)
> answer is that neither version of the file exists.

How can something be natural but unintuitive? Anyway, the other 
possibilities are (obviously) only one of the files exists; or both 
versions of the file exist, with one getting the original name, or 
neither getting it.

I don't know that there's any acceptable way of choosing a file to 
disappear/rename while leaving the other alone; but renaming both files 
seems plausible, so you end up with, say:

     foo.20041126234918-bb3ee-587a30808e3c85b4add00db4c91d97a33239ed14
     foo.20041126234936-bb3ee-a5efca6869902205088865d8371ff45038f64648

If you don't mind having "pull" result in new unrecorded changes in your 
repository, then you could even have "move ./foo.20041126234918-... 
./foo" end up in pending so that your old file is still the same, your 
new file is easily accessible, and the result of "pull" on your recorded 
patches is still symmetric.

Hrm, if you have:

     A1: addfile ./foo; hunk ./foo ...
     A2: hunk ./foo ...
     B1: addfile ./foo; hunk ./foo ...
     B2: hunk ./foo ...

and you pull A1,B1; resolve the conflict; then try pulling A2 or B2, you 
seem to lose your conflict resolution entirely and have to start again 
from scratch? ie, you can't say "I want to merge some changes from B1's 
foo into A1's foo, then keep accepting changes to foo from A1"?

TBH, I think it's a bug that "addfile x; move x y" and "addfile y" don't 
have the same behaviour -- fair enough that both conflict with "addfile 
y"; but having only one conflict with "addfile x" doesn't seem right. 
Actually, worse, they even conflict with "addfile y" in different ways 
-- the former leaves a "y-conflict" file lying about, the latter doesn't.

Cheers,
aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 155 bytes
Desc: OpenPGP digital signature
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20041127/256d2029/attachment.pgp 


More information about the darcs-users mailing list