[prev in list] [next in list] [prev in thread] [next in thread]
List: darcs-devel
Subject: [darcs-devel] [darcs #557] replace + pull + conflict = lost
From: " via RT" <bugs () darcs ! net>
Date: 2005-10-18 15:15:36
Message-ID: rt-3.0.12-557-2847.9.69874364866222 () darcs ! net
[Download RAW message or body]
Tue Oct 18 11:15:21 2005: New ticket: 557.
Transaction: Ticket created by guest
Queue: Darcs
Subject: replace + pull + conflict = lost replace!
Owner: Nobody
Requestors: b.wheeler@ulcc.ac.uk
Status: new
Ticket <URL: http://bugs.darcs.net/.//Ticket/Display.html?id=557 >
I'm quite new to darcs so it's possible I've misunderstood what's going
on here. Using darcs 1.0.3.
repo1 and repo2 are two copies of the same repo, containing a file
'test' which has the text "I am a foo."
In repo1, I use 'darcs replace foo bar test', and record this patch.
This is fine, there are no pre-existing mentions of 'bar'.
Meanwhile, over in repo2, I've added a mention of 'bar'. 'test' now
contains "I am a foo and I live in a bar". I may or may not have
recorded this change ([*] - see below)
I now try to pull the replace patch from repo1.
[repo2]$ darcs pull ../repo1/
Tue Oct 18 15:36:52 BST 2005 Ben Wheeler <b.wheeler@ulcc.ac.uk>
* Replace foo with bar
Shall I pull this patch? (1/1) [ynWvpxqadjk], or ? for help: y
We have conflicts in the following files:
./test
Finished pulling and applying.
A conflict is exactly what I would expect. However, the conflict is not
marked in the file. Darcs seems to think the pull was successful: 'darcs
changes' shows the patch as having been pulled, and 'darcs pull' says
there are no remote changes to bring in. But what darcs has actually
done depends on whether I recorded the incompatible change at [*] prior
to the pull.
If I DID record at [*]:
[repo2]$ darcs diff
diff -rN old-repo2/test new-repo2/test
1c1
< I am a foo.
---
> I am a foo and I live in a bar.
repo2]$ darcs record
hunk ./test 1
-I am a foo.
+I am a foo and I live in a bar.
Shall I record this patch? (1/1) [ynWsfqadjk], or ? for help:
So in this case, darcs seems to have completely lost the replace patch's
effects on this file. If I record that patch, pull it to another repo
and hit 'view in full', it says:
[Replace foo with bar
Ben Wheeler <b.wheeler@ulcc.ac.uk>**20051018143652] {
merger 0.0 (
hunk ./test 1
-I am a foo.
+I am a foo and I live in a bar.
replace ./test [A-Za-z_0-9] foo bar
)
}
So the replace is there, but not doing its job.
If I did NOT record at [*]:
[repo2]$ darcs diff
diff -rN old-repo2/test new-repo2/test
1c1
< I am a bar.
---
> I am a foo and I live in a bar.
[repo2]$ darcs record
replace ./test [A-Za-z_0-9] bar foo
Shall I record this patch? (1/2) [ynWsfqadjk], or ? for help:
hunk ./test 1
-I am a foo.
+I am a foo and I live in a bar.
Shall I record this patch? (2/2) [ynWsfqadjk], or ? for help:
So in the second case, darcs has magically created an inverse patch for
the original replace patch, which does at least make the patches stack
up, but is still not want I expected!
_______________________________________________
darcs-devel mailing list
darcs-devel@darcs.net
http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic