[cvsnt] CVS diff behaves strangely? Merge not fluent?

Koen no at ssppaamm.com
Thu Feb 6 09:19:25 GMT 2003


Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.


Hi!

I have some questions about the behaviour of calculating diffs with CVS (I
think this is CVS in general and not only CVSNT, but I'm not sure). Say I
have two branches and each branch has a version of the same file. The
contents of the files are shown below (the --- stuff is not part of it and
there is an end of line after each line, which is why I explicitely left a
blank before the end of file markers):

----- Start of file1 -----
This is just a module for testing the CVS functionality.
There is no crucial stuff in here.

----- End of file 1 -----


----- Start of file 2 -----
This is just a module for testing the CVS functionality.
There is no crucial stuff in here.
You can experiment with CVS's possibilities as much as you like.

----- End of file 2 -----


Now, when I try to merge with CVS, I get conflicts (because I changed
something in both branches), and the diff file looks
like this:


----- Start of diff -----
This is just a module for testing the CVS functionality.
<<<<<<< ReadMe.txt
There is no crucial stuff in here.
=======
There is no crucial stuff in here.
You can experiment with CVS's possibilities as much as you like.
>>>>>>> 1.1.2.2
----- End of diff -----


Why is it that the "There is no crucial stuff in here." line is seen as a
difference?! I would expect this diff to show:


----- Start of diff -----
This is just a module for testing the CVS functionality.
There is no crucial stuff in here.
<<<<<<< ReadMe.txt
=======
You can experiment with CVS's possibilities as much as you like.
>>>>>>> 1.1.2.2
----- End of diff -----

Isn't that what should be expected?
When I run a tool like WinMerge on the two versions of the files, it does
show the correct difference (as shown just above, with only the last line
differing), and not what cvs diff gives me.

The problem is that if you want to use a tool like conflicteditor to easily
merge the differences, it doesn't work, because it uses the diffs generated
from CVS, and it only allows to slip in extra lines from one or the other,
not "replace differing region of first file by that of second file".
How do you people do this easily (I know you can also copy/paste manually in
these editors, but that's not very practical especially for clear
differences like this) ?
Are these CVS generated diffs really correct (and if so why?)?

Koen

PS
As a side note, to explain how I came to this: I'm using TortoiseCVS as
client and CVSNT as server and I'm trying to setup a conflict editor/merger
to make CVS life easier (while still having full control ;-) )




More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook