[darcs-devel] merging with working set

Jim Radford radford at blackbean.org
Fri Feb 11 08:56:10 PST 2005


On Tue, Feb 08, 2005 at 07:41:49AM -0500, David Roundy wrote:
> It's a question of how you define a conflict.  I would say that in your
> case darcs was right, there were two conflicting changes.  Admittedly, they
> were identical, but darcs doesn't know whether the "correct" answer is to
> have two bars or four bars when the merge is complete.  That would depend
> on what programming language you're using, for example.

> "wrong", take an example from a code which I've used in the past, which
> sadly was written in fortran.  There was an array of "input commands", and
> a separate integer indicating how many elements that array contains.  If
> two people each add a single command, they will both make the change

> -       numcommands = 501
> +       numcommands = 502

> but of course the correct "merged" result will be

> -       numcommands = 501
> +       numcommands = 503

> Darcs, of course, has no way of knowing this.  And obviously there's
> no way a revision control will be able to always flag a conflict
> when you have changes that when merged will break the code.  But I
> don't think that darcs' conflict behavior in this case (or in your
> bar\nbar case) is really wrong.

I agree, however your example relies on the fact that only one of the
hunks of the changeset was already present.  What about the case where
the *entire* changeset already exists in the working directory?  Can
you think of an example where leaving out the markers in that case
would be wrong?

-Jim




More information about the darcs-devel mailing list