next up previous contents
Next: Manual Merge Up: Resolving Conflicts Previous: Resolving Conflicts   Contents

Automatic Merge

You've edited the home page to refine the ``KEYWORDS'' META tag and prepend an HTML DTD element. When you attempt to commit your newly edited index.htm file to the site repository with the cvs commit command, you are told:

$ cvs commit index.htm
cvs commit: Up-to-date check failed for `index.htm'
cvs [commit aborted]: correct above errors first!

You can tell that the master copy of this site stored in the site repository must have acquired some new content, so you use the cvs update process to refresh your working copy of the web site. In the example below, we instruct the CVS server to update just the index.htm file as a test case, with the command line: cvs update index.htm:

$ cvs update index.htm
RCS file: /usr/local/cvs-repository/camp-kawanhee/index.htm,v
retrieving revision 1.4
retrieving revision 1.5
Merging differences between 1.4 and 1.5 into index.htm
M index.htm

In this case, the lines you added to the index.htm file (near the top of the HTML file) and changes made by other developers (elsewhere in the file) were automatically and successfully merged. The index.htm file in your working copy of the site (and only your working copy) now contains all the changes you wanted to make to the file and all the that have been made and committed recently by other authors. The CVS program managed to assemble the two versions of the file into one that should work to everyone's satisfaction. You should still open the index.htm file in a web browser to make sure the automatic merge did the right thing. When the index.htm file works to your satisfaction, use cvs commit to put it into the site repository:

$ cvs commit index.htm
Checking in index.htm;
/usr/local/cvs-repository/camp-kawanhee/index.htm,v  <--  index.htm
new revision: 1.6; previous revision: 1.5
done

next up previous contents
Next: Manual Merge Up: Resolving Conflicts Previous: Resolving Conflicts   Contents

copyright © 1997-1999 sean dreilinger.