[darcs-devel] merging with working set
Johan Rydberg
jrydberg at gnu.org
Mon Feb 7 19:32:48 PST 2005
Hi,
I have a little problem. Darcs doesn't seem to handle patch merges
with changes already in the working set. To clearify, take this
example:
I have a test repo, called test-1, which contains the following
changes:
test-1$ darcs changes
Tue Feb 8 04:16:23 CET 2005 Johan Rydberg <jrydberg at gnu.org>
* bar
Tue Feb 8 04:15:03 CET 2005 Johan Rydberg <jrydberg at gnu.org>
* patch-1
test-1$ darcs annotate --patch=bar
[bar
Johan Rydberg <jrydberg at gnu.org>**20050208031623] {
hunk ./foo.c 2
+bar
+bar
}
test-1$
I have then another test repo, called test-2, which contains the named
patch "patch-1" from test-1 (the originated from the same repo.)
test-2$ darcs changes
Tue Feb 8 04:15:03 CET 2005 Johan Rydberg <jrydberg at gnu.org>
* patch-1
But it also contains unrecorded changes:
test-2$ darcs diff -u
diff -rN -u old-test-2/foo.c new-test-2/foo.c
--- old-test-2/foo.c 2005-02-08 04:18:00.000000000 +0100
+++ new-test-2/foo.c 2005-02-08 04:18:16.000000000 +0100
@@ -1 +1,3 @@
foo
+bar
+bar
Say then that I want to pull a few updates from another repo, using
"darcs pull" and that one of the newly received patches contains just
the change I have in my working set. This results in a conflict.
test-2$ darcs pull ../test-1
Pulling from "../test-1"...
Tue Feb 8 04:16:23 CET 2005 Johan Rydberg <jrydberg at gnu.org>
* bar
Shall I pull this patch? (1/1) [ynWvxqadjk], or ? for help: y
We have conflicts in the following files:
./foo.c
Finished pulling and applying.
And if you look at foo.c :
test-2$ cat foo.c
foo
v v v v v v v
bar
bar
^ ^ ^ ^ ^ ^ ^
I've just started to use darcs after being used to CVS for several
years, and this behavior is unfamiliar to me. CVS is capable of
resolving situations like this without reporting a conflict. Or is it
that darcs identifies a conflict between the freshly pulled patch and
the "pending" patch -- and thinks that pending is ordered before
"bar", and therefor reports a conflict?
I'm using darcs 1.0.2, fresh from the repo as of earlier today.
~j
More information about the darcs-devel
mailing list