[darcs-users] On merging

Tomasz Zielonka tomasz.zielonka at gmail.com
Sat Nov 27 10:08:45 UTC 2004


Hi!

Let's check if my understanding is correct...

On Fri, Nov 26, 2004 at 02:50:01AM +1000, Anthony Towns wrote:
> I guess the main thing I don't get is why when you have conflicts, 
> "darcs pull" leaves unrecorded changes (ie, "vvvv", "****", and "^^^^") 
> in the repo?

Darcs undoes the conflicting patches and makes some unrecorded changes to
help you resolve the conflict.

> What does "q and P doesn't commute" mean? Unless I'm missing something 
> it means q depends on P

Yes. It means q and p can't be reordered.

> which is to say q can't be applied until something from p is undone. 

No. If you sequentially record p={addfile A} and q={mv A B}, then q obviously
depends on p, but there is no need to undo p before q can be applied.

> Which I think is the same as saying "q and p conflict".

In my understanding patches can conflict, when they have (or can be made to
have) the same context. Some conflicts can be resolved automatically by
darcs (changes to different parts of file, different files, replaces).

> Okay, now I'm really confused. It seems like "X,MERGE(X,Y)" is the same 
> as "X,X^{-1}". 

My feeling is that you can tell the difference if you think how they will
work as contents of the repository.

If you have only X,X^{-1} in the repository, you can't pull Y from there, can
you?

If you pull to X from Y, darcs makes X,MERGE(X,Y). If you pull again, it
won't try to pull Y again.

I am not sure, but I think that darcs checks if the conflict was resolved by
searching for patches that depend on the merger.

Best regards,
Tomasz




More information about the darcs-users mailing list