< Zurück | Inhalt | Weiter >

8.2.4 Update

If there are other people working on this project with you, they will also be making changes. To bring there changes into your sandbox, run the cvs update command:


$ cvs update

cvs server: Updating . P Account.java

M User.java

cvs server: Updating subdir


Here, P indicates CVS has patched in changes to that source file; and M indicates you have modified the file. Note that Xyz.java is not mentioned. That means there were no updates involved.

The subdirectory subdir was also updated, but no changes were made. Had a change been made, you would see the modified files mentioned by name.

You can update a single file at a time by naming that file on the command line, but typically you want to get the changes for all the files in a directory, or even all the changes throughout the project, since a change in one file may be dependent on changes in other files.

Sometimes when you try to commit your changes you will be told that the commit did not succeed because one or more of your files was not up to date. Not to worry; it’s easy to bring your files up to date. This leads directly into our next topic. Read on!