|
From: | Frederic Gioanni |
Subject: | CVS merge issue: "cvs update -j -j" |
Date: | Sun, 23 Mar 2003 17:59:53 +1100 |
I have got some problems when merging delta between rev1 and rev2 into
my Working revision of a file using
cvs update -j rev1 -j
rev2 file
I am using CVS 1.10 with diff3 2.7. The same problem occurs in the latest version of CVS.
Let's say that the content of file:rev1 is:
a
b
c
Content of file:rev2 is:
a
b
c
d
e
Content of my working revision is:
a
When doing the merge, I am expecting 2 new lines and so I am expecting the following conflict:
a
<<<<<<< file
=======
d
e
>>>>>>> rev2
However, "cvs up -j -j" ends with:
a
<<<<<<< file
=======
b
c
d
e
>>>>>>> rev2
When resolving the conflict, the user thinks that 4 lines were added between rev1 and rev2 whereas only 2 lines were added. The user will take these 4 lines introducing "damage" in the code.
I am refering to the CVS documentation that says: "With two -j options, merge changes from the revision specified with the first -j option to the revision specified with the second -j option, into the working directory."
CVS uses the following command to merge:
diff3 -E -am -L file
-Lrev1 -Lrev2 file file:rev1 file:rev2
I talked to Paul Eggert regarding diff3 (from diff3 support). The result for diff3 is "as expected". But this is not the result expected by a CVS user.
Is there a way to solve the problem. I was thinking of implementing a wrapper in order to check / compare the delta rev1->rev2 with the delta introduced in my working revision. This is not obvious at all. If the delta rev1->rev2 is already in my working revision, the working revision is unchanged and so, no delta is introduced in my working revision.
Is there any other sub-programs to perform the task CVS wants to do ? Or is there any sub-programs to check the result of CVS merge ? My first priority is not to correct the merging but to warn the user when such a case happens.
Thanks for your help,
Frederic Gioanni
frederic.gioanni.vcf
Description: Card for Frederic Gioanni
[Prev in Thread] | Current Thread | [Next in Thread] |