We've lost hours, even days of work on web sites when one developer has overwritten the work of another by uploading files without checking for improvements made by the other project authors. Along with good planning and communication, version control helps prevent web development disasters. This section shows you how CVS version control will help you prevent or resolve any development conflicts when uploading your work to the site repository.
When you enter the cvs commit command to automatically upload all the files you have changed or added to a site, the site repository server may inform you that your locally-edited files are not up-to-date with the server or that you need to manually merge one or more files with newer versions that have already been uploaded to the repository by a colleague. Here's a sample conflict warning message that occurred during a cvs commit process:
$ cvs commit cvs commit: Examining . cvs commit: Up-to-date check failed for `activity.htm' cvs commit: Up-to-date check failed for `camp.htm' cvs commit: Up-to-date check failed for `index.htm' ... cvs [commit aborted]: correct above errors first!
You can use the cvs update command to bring your local copy
of the site up-to-date with the repository and attempt to
automatically merge your latest work with changes that
other web developers may have already made to the site. To
update your entire working copy of the site,
open a command prompt, change to the directory containing the site
you're developing, and issue the command: cvs update. This
will update and automatically merge every file that has changed
since you last copied over new files from the site repository.
Line-by-line updates to individual text files (such as HTML
files) can often be handled automatically. CVS will list for
you any files that require your attention for manual editing and
merging. Let's walk through one automatic merge and one
manual merge as examples.
copyright © 1997-1999 sean dreilinger.