[darcs-users] User interface for conflicts: confusing enough to lose data

Andrew Pimlott andrew at pimlott.net
Tue Jul 27 16:51:54 UTC 2004


On Tue, Jul 27, 2004 at 06:27:24AM -0400, David Roundy wrote:
> On Mon, Jul 26, 2004 at 09:09:35PM -0400, Andrew Pimlott wrote:
> > Why can't you use a simple alphabetical ordering of patch names?  The
> > concept strikes me as a win, because you want the tree to be
> > conspicuously broken after a conflict.
> 
> That probably would work if the merge were done in such a way that I knew
> what the patch names are (and is a good idea).

Thinking further, if this were done, on conflict format would have to be
chosen as cannonical, and due to the artificial ordering, it might not
be the friendliest ordering.  Then, if someone wanted to use a different
conflict format (assuming one is provided), whatsnew would be totally
incomprehensible.  And you would still need "darcs markconflicts" to
undo a darcs revert.

So maybe the current behavior of resolving to the ancestor is best after
all.  Or maybe the cannonical format should be used in the conflicting
file, and a human-friendly format in a foo.c.mergeme file.  This has the
benefit of conspicuous breakage, and avoids the confusion that results
from playing games in the conflicting file.

> > If this is done, may I request the diff3 variant in which all three
> > (potentially N+1, where N is the number of contributing patches) versions
> > of the file are shown: with patch a, with patch b, and with neither?  Two
> > versions are really not enough to resolve a conflict.  (Other formats
> > with equivalent information would be interesting to consider.  For
> > example, the original plus the text of the N conflicting patches; or the
> > N new versions plus the text of the N patches...
> 
> That does sound like a good idea.  On the other hand, depending on how
> things were done, one might be able to see the original version by running
> a darcs whatsnew, which might in some ways be a "cleaner" way of looking at
> things.

A diff of a conflict can be tricky to interpret.  Maybe there should be
a "darcs cat" to see a repository version.  It would also be nice (I
think it's already been raised here) to provide the conflicting patch
names so one could look at them directly, but that is probably precluded
by the limitation you noted in the current code.  You may be right that
trying to shove all the information into the file is a losing game.  But
I would still like to try it, because having everything right there in
your editor is pretty handy.

Andrew




More information about the darcs-users mailing list