[darcs-users] handling of conflicts?

Andres Loeh andres at cs.uu.nl
Mon Mar 22 14:57:17 UTC 2004


> 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.  :(

Okay, thanks, but here is a variant of the problem:

{ I still assume the empty repositories darcs.1 and darcs.2 }

~/darcs.1 $ touch test
~/darcs.1 $ darcs record --look-for-adds
              { recording the patch as "test" }
~/darcs.1 $ darcs push --and-apply ../darcs.2

Mon Mar 22 15:49:50 CET 2004  andres at cs.uu.nl
  * test
Shall I push this patch? [ynWvqdjk?] y
So far so good... finished merging.
Finished applying...
~/darcs.1 $ echo "foo" >> test
~/darcs.1 $ darcs record
              { recording the patch as "foo" }
~/darcs.1 $ cd ../darcs.2
~/darcs.2 $ echo "bar" >> test
~/darcs.2 $ darcs record
              { recording the patch as "bar" }
~/darcs.2 $ darcs pull ../darcs.1

Mon Mar 22 15:52:17 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
foo
~/darcs.2 $ darcs whatsnew
{
hunk ./test 1
+bar
+foo
}

{ At this point, I decide that the correct resolution to this
conflict is to remove both offending lines, bar and add. }

~/darcs.2 $ rm test && touch test
~/darcs.2 $ darcs whatsnew --look-for-adds
No changes!

In this case, I really see no way to confirm the resolution
of the conflict with darcs. If I would pull this repo to another
location, I would still get the conflict ...

Best,
  Andres




More information about the darcs-users mailing list