Updating Sandboxes
The
cvs update
command checks your sandbox against
the repository and downloads any changed files to the sandbox. It
complements the cvs commit
command, which
uploads changes from the sandbox to the repository. Use the
-d
command option to download new directories as
well. Example 2-16 shows the use of cvs
update
.
Example 2-16. Updating the sandbox
$cvs update -d
cvs update: Updating . U file2 cvs update: Updating directory $ls
CVS directory file1 file2
As with committing, you should not have to specify the repository; it
should be stored in the special CVS
subdirectory
in the sandbox. You must run cvs update
from
within the sandbox, and it is best to run it from the root directory
of the sandbox to ensure that it checks all the subdirectories.
Note that -d
means two different things,
depending on where it is in the command. Recall that CVS commands
take the form:
cvs [cvs-options
]command
[command-options
]
As a CVS option, -d
defines the directory path.
As a command option to the update
command,
-d
downloads directories and files. This is
explained more in Chapter 3.
As the update command runs, it generates a list of files that are modified. To the immediate left of each filename, you will see a single uppercase letter. Those letters report the status of each file listed, and they have the following meanings:
- U filename
Updated successfully. A newer version in the repository has replaced your sandbox version.
- A filename
Marked for addition but not yet added to ...
Get Essential CVS now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.