[darcs-users] Dealing with File Addition Conflicts

Curt Sampson cjs at staring-software.com
Sun Jun 22 23:34:41 UTC 2008


This is using darcs 2.0.0.

I am having trouble understanding how to deal with conflicts when I add
a file to my repo and pull a change from another repo that adds the same
file.

Let's say I do this:

    mkdir repo1; cd repo1; darcs init; cd ..
    darcs get repo1 repo2
    cd repo1; echo "one" > file; darcs add file; darcs record -a -m 'one'; cd ..
    cd repo2; echo "two" > file; darcs add file; darcs record -a -m 'two'
    darcs pull -a

At this point, I have file, containing "two", and file-darcs-backup0,
containing "two". I also have a modified working copy where "darcs diff"
says:

    --- old-repo2/file      1970-01-01 09:00:00.000000000 +0900
    +++ new-repo2/file      2008-06-20 16:30:25.000000000 +0900
    @@ -0,0 +1 @@
    +two

Where do I find a copy of the file containing "one", and/or information
about what change conflicted there, so I can decide whether to keep my
version of "file," use the pulled version of "file," or do some merge of
the two?

And this is very strange to my mind: if I do a "darcs revert -a" at this
point, "file" vanishes entirely, though "darcs changes" claims that I
have both patch "one" and "two". So it seems that repo1 has a patch
"one" that adds "file", but repo2 has a patch "one" that removes "file."
What's up with this?

cjs
-- 
Curt Sampson       <cjs at starling-software.com>        +81 90 7737 2974   
Mobile sites and software consulting: http://www.starling-software.com


More information about the darcs-users mailing list