< Day Day Up > |
Recipe 18.12. Updating Your Working Files in CVS18.12.1 ProblemBecause you are working on a shared project, you want to be sure that your first checkout of the day brings all your sandbox files up to date, and incorporates changes made by other users. 18.12.2 SolutionAt the start of the day, run the update command, with the -n flag (for "not really"), from your sandbox: $ cvs -n update -dP
cvs update: Updating .
cvs update: Updating CVSROOT
cvs update: Updating project
M project/oldfile
? project/newfile This shows what files are different, and the status of each of these files. To synchronize your sandbox with the repository, re-run the command without the -n flag. This will merge, or attempt to merge, both sets of files. To get even more information, run the following command: $ cvs diff This will display line-by-line changes. 18.12.3 DiscussionRunning update routinely will keep your local working copies in sync with the repository copies. If you're concerned about other users making annoying changes (which is not a CVS problem, but a project-management problem), you can always review them first. Keep in mind that when you have edited a file to a point where you wish to preserve it, you should check it into the repository. Don't leave it lying around in your sandbox—the whole point of using CVS is to preserve many versions of the same file. These are the possible states that files will be in:
18.12.4 See Also
|
< Day Day Up > |