How to fix issue when committing a change to CVS
Asked Answered
S

2

15

I'm trying to commit my changes to CVS repository, but I get the following error:

RCS file: /opt/CZarmen/CVS_REPOSITORY/Z_user/lib/python/StudioCustom.py,v
retrieving revision 1.38
retrieving revision 1.39
Merging differences between 1.38 and 1.39 into StudioCustom.py
M lib/python/StudioCustom.py

RCS file: /opt/CZarmen/CVS_REPOSITORY/Z_user/menu_scripts/Y/ZExtensions,v
retrieving revision 1.46
retrieving revision 1.47
Merging differences between 1.46 and 1.47 into ZExtensions
M menu_scripts/Y/ZExtensions

cvs commit: Up-to-date check failed for `lib/python/StudioCustom.py'
cvs commit: Up-to-date check failed for `menu_scripts/Y/ZExtensions'
cvs [commit aborted]: correct above errors first!

Why does it fail to commit my changes? How do I "correct above errors"?

Storied answered 8/9, 2011 at 8:5 Comment(0)
C
24

You need to update your working copy first by running cvs up because someone has already updated these files while you were working on them. CVS can't automatically merge these changes during commit.

Chestnut answered 8/9, 2011 at 8:9 Comment(3)
But if I update my working copy, I will lose my edits, won't I? I mean, say the file contains "abc", I want to make it "abcd", but someone has already updated it to "abce". If I update my working copy, my file will be "abce", and "abcd" will be lost, Right?Storied
And, which one is the "working copy"? The one in CVS repositry, or the one in my local computer?Storied
The working copy is your directory in which you want to do the cvs commit call. The server part is called repository. cvs update will not overwrite your changes (unless you pass the -C flag), but if you're worried you can first do cvs diff >myChanges.patch to save your modifications in a patch.Chestnut
S
1

Additionally, just in case you may get error sometimes to UPDATE your local version. The final solution is :

1. Save your local code to another place manually

2. Revert the files which may have conflicts 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 the 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 synced
Skiffle answered 19/12, 2017 at 3:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.