0

I've just discovered, a surprising for me behavior of cvs.

  • I change file1 localy
  • During this time people change other unrelated parts of the same file, and commit to the repository
  • I update my local copy from repository
  • At this point I expect my local copy of file1 to contain all changes made by others to this file, unless the update above reported a conflict. However, when I do now diff with head, I discover lot's of differences coming from changes made by others in parts of the file that I did not touch at all.

Any ideas? Is this just the limited abilities of cvs to merge? Any wrong setting? Something in my workflow?

shealtiel
  • 8,020
  • 18
  • 50
  • 82

2 Answers2

1

CVS has very limited merge facilities. Switch to a modern system such as Git (perhaps via git-cvsimport if the repo maintainer is uncooperative) if you want a better merge experience. See also Best practices for using git with CVS

Community
  • 1
  • 1
tripleee
  • 175,061
  • 34
  • 275
  • 318
  • Hmmm... Any way to ask cvs to use an external merge tool? – shealtiel Jan 13 '13 at 11:11
  • Yes, it's possible, but requires CVS support un the tool, or a CVS wrapper of some sort. See e.g. http://stackoverflow.com/questions/631781/use-a-different-diff-command-with-cvs for some options. – tripleee Jan 13 '13 at 12:04
  • It seems the tools mentioned on your above link support only viewing the differences in an external tool. Is there anything that can *merge* with an external tool? – shealtiel Jan 14 '13 at 07:26
  • 1
    My impression is that e.g. Meld can do that too, but I haven't tried it (long-time Emacs user, long since migrated from CVS to SVN and on to Darcs and Git). My suggestion would be to post a separate question because this discussion is basically only seen by you and me. – tripleee Jan 14 '13 at 07:41
0

The final solution is :

1. Save your local code to another place manually

2. Revert the files which may has conflict to the HEAD (most latest) version on CVS server.

3. Add back your change to the Reverted file.

The concept for above solution is to CLEAR UP all the possible issue by REVERT and get a 100% clean version from repository then add back our changes.

It can resolve below issues which caused by code out of date / code base messed up.

  1. CVS commit had a conflict and has not been modified
  2. CVS update failed
  3. CVS not sync
Community
  • 1
  • 1
Kevin
  • 1,335
  • 14
  • 14