[darcs-users] handling of conflicts?

David Roundy droundy at abridgegame.org
Mon Mar 22 14:20:53 UTC 2004


On Mon, Mar 22, 2004 at 12:27:34PM +0100, Andres Loeh wrote:
> I've done the following.
> 
> ~ $ mkdir darcs.1 && mkdir darcs.2
> ~ $ cd darcs.1
> ~/darcs.1 $ darcs inittree
> ~/darcs.1 $ echo "foo" > test
> ~/darcs.1 $ darcs record --look-for-adds
>                { I record the changes as patch "foo" }
> ~ $ cd ../darcs.2
> ~/darcs.2 $ darcs inittree
> ~/darcs.2 $ echo "bar" > test
> ~/darcs.2 $ darcs record --look-for-adds
>                { I record the changes as patch "bar" }
> ~/darcs.2 $ darcs pull ../darcs.1
> Pulling from ../darcs.1...
> 
> Mon Mar 22 12:23:08 CET 2004  andres at cs.uu.nl
>   * foo
> Shall I pull this patch? [ynWvqdjk?] y
> So far so good... finished merging.
> We have conflicts in the following files:
> ./test
> Finished pulling.
> ~/darcs.2 $ cat test
> bar
> ~/darcs.2 $ darcs whatsnew
> No changes!
> 
> From checking past mails, I found out that the reason that "bar" alone
> remains in the file might be that it alphabetically comes before
> "foo". But what is the way to actually resolve the conflict?

Actually, this is a more complicated situation.  I believe the file test is
no longer in the repository, although the *history* of it is, including
both versions.  There was a conflict between the two file adds, which
precludes the possibility of a the conflict in file content, since they are
different files.  Since darcs didn't know which of the two files to keep,
it didn't keep either, but of course it wasn't rude enough to delete the
file from your working directory.

You can resolve the conflict by adding test back into the repository.
Unfortunately, there isn't yet an easy way to see that this was the
problem.  :(
-- 
David Roundy
http://www.abridgegame.org




More information about the darcs-users mailing list