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

Anthony Towns aj at azure.humbug.org.au
Sat Nov 27 13:03:46 UTC 2004

Karl Hasselström wrote:
> On 2004-11-26 09:22:45 -0500, 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.
> I would say that the natural answer is that the patches can't be
> combined. (Unless you add a conflict-resolving patch between them that
> removes or renames the file added by one of them.)

How can you add a "conflict-resolving patch" between two conflicting 
hunk patches though? What I'd like to end up with is:

contents of
first conflicting patch
here is the second
conflicting patch

with three patches: one containing the first conflicting bit, another 
containing the second conflicting bit, and the third containing the 
markers and "resolving" the conflict. And that works fine if you create 
them in a single repository (as long as you create the markers last, so 
they don't get put in as a single hunk). You can pull either conflicting 
patch alone, or all three and get a sane result, with no conflicts.

But if you make three new repositories, one with the first patch, one 
with the second, and one with the markers, then create a new repository 
and pull each of the single-patch repos into that, you end up with darcs 
attempting to resolve things as:

v v v v v v v
here is the second
conflicting patch
v v v v v v v
contents of
first conflicting patch
^ ^ ^ ^ ^ ^ ^
^ ^ ^ ^ ^ ^ ^

So in spite of having the _exact same_ inventory in the new repository 
as in the original one, we've got completely different contents.

On the upside, that means if I hax0r my GUI the way I'm thinking of, I'm 
not introducing any /new/ breakage. :)

Summarising the problem: if you start with applying X and Y and Z to the 
same repository, you can unmerge them and apply X, Y and Z independently 
to the repository, but you can't go back from those to the original 
clean X, Y, Z combination you had to start with. So some information got 
lost there in the unmerge step. It doesn't get lost when you merely 
commute the patches, though, so putting in dependencies would be 
overkill. On the other hand, I just don't see anywhere the missing 
information can go, that it won't just continue getting lost...

(My GUI'll just let you add this information when it's not already 
present, basically)

-------------- 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/6059a25d/attachment.pgp 

More information about the darcs-users mailing list