Updating Modules with CVS
Once you have checked out a module from CVS,
you can update that module to the latest version of the code being developed.
If you have made changes to any of the files, CVS will try to combine (merge)
those changes with the changes on the CVS server.
Linux users can use the command-line CVS program:
- Open a console
- Go to the module directory
- Run "cvs update -P -d"
Windows users can use the graphical WinCVS program:
- Select the module folder in the WinCVS tree view
- Open the Modify menu (or right-click the folder) and choose Update Selection
- Check the "create missing directories that exist in the repository" option
- Click the OK button to update the module
- Wait for CVS to finish and print "*****CVS exited normally with code 0*****"
Making sense of CVS output:
- "U ..." - the latest version of this file has been downloaded
- "P ..." - this file has been patched with the latest changes
- "M ..." - your copy of this file is modified. If CVS merges your changes with it's latest changes, this is preceded by additional messages
- "C ..." - there was a conflict while merging your changes with the latest code in CVS
- "? ..." - CVS does not recognize this file
- "cvs server: Updating ..." - tells you which folder is being updated
- "cvs server: warning: ... is not (any longer) pertinent" - this file has been removed from CVS, so it is being deleted
- "*****CVS exited normally with code 0*****" - finished with no errors
- "*****CVS exited normally with code 1*****" - finished with one or more errors
If you have conflicts while updating the code from CVS:
- Open the files with conflicts and locate the conflicts in each file
- look for a line beginning with "<<<<<<<"
- On the same line will be the name of the file being merged.
- Part of your modified code will follow (usually the part you modified)
- This section should end with a "=======" line
- Some new code from CVS will follow the "=======" line
- This new code ends with a line that begins ">>>>>>>"
- That line ends with the number of the revision which caused the conflict
- In other words the first part is your changes, and the last part is from CVS.
- Now you must decide which code to keep, which to remove, and/or how to combine them.