[darcs-devel] [issue1327] Failed to commute common patches
Ganesh Sittampalam
bugs at darcs.net
Sat May 28 06:09:51 UTC 2016
Ganesh Sittampalam <ganesh at earth.li> added the comment:
A few thoughts:
- The most obvious technical difficulty that this bug causes is that it makes tags
effectively mutable, in that you can replace the patches a tag depends on without changing
its identity.
That in turn defeats assumptions darcs makes about tags throughout. In the code this can
be seen from the structure of a PatchSet and lots of code that depends on it like
findCommonAndUncommon. The key point is that when merging you can stop comparing two
repositories at the first common "clean" tag.
- I think consistency of failure breaks down in any case involving dependency. If you
replace "add file f" with "add line 10 in f" and "modify f" with "modify line 10 in f",
exactly the same issues arise.
- I personally don't believe that it's desirable to have duplicates not conflict. While
it's attractive in a lot of common cases, there are occasional cases where it silently
does the wrong thing - e.g. consider a file being used as a record of a list of actions or
events; the same action/event happening twice could be lost. It's also brittle: identical
changes merge "cleanly", but very similar changes cause a conflict. IMO the real problem
is that conflicts are so painful in darcs that any opportunity to avoid them is attractive
:)
My own preferred solution is to get completely away from the way darcs handles conflicts
at the moment. Instead of just giving up on merging conflicts and effectively undoing
them, a richer model for repository content allows them to be represented directly.
http://darcs.net/Ideas/AddAddConflicts is one idea that we've experimented with and Pijul
is a more ambitious attempt at doing this for file content as well as directory contents.
__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue1327>
__________________________________
More information about the darcs-devel
mailing list