home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam    

  Previous section   Next section

3.9 Releasing a Sandbox

The cvs release command should be used before you delete a sandbox. CVS first checks whether there are any files with uncommitted changes; then, if all is well, CVS runs cvs unedit on each file to signal that you no longer intend to edit the files, and writes to the history file in the repository to state that the sandbox was released.[4] CVS also reports on files and directories that are not currently stored in the repository.

[4] The cvs unedit command is explained in Chapter 5. The history file is explained in Chapter 7.

If there are uncommitted changes, CVS alerts you to the changes and does not release the sandbox. You can use cvs commit to commit the changes, remove the changed files manually, or use cvs update -A to revert to a state where you can release the sandbox (and lose the changed data).

It's not strictly necessary to use cvs release before deleting a sandbox. You can delete a sandbox with no effect on the repository. However, if you get into the habit of using cvs release, you'll remember to use it the one time you do need to run an unedit or when you have made an uncommitted but important change.

The syntax for cvs release is:

cvs [cvs-options] release [-d] directory

The only option to cvs release is -d, which deletes the sandbox after checking it for uncommitted changes. You can use cvs release on an entire sandbox or on a subdirectory within the sandbox.

When you execute cvs release, you must specify a directory, but you can use a dot (.) to indicate your current working directory. Example 3-20 shows cvs release being used to release the wizzard sandbox. Note that a dot is used to specify the current working directory as the sandbox to release.

Example 3-20. Using cvs release
bash-2.05a$ cvs release .
cvs server: warning: src/wizzard.h is not (any longer) pertinent
? src/test
? src/test.c
U src/config.h
U src/main.c
You have [0] altered files in this repository.
Are you sure you want to release directory `.': n
** `release' aborted by user choice.

As a response to the question Are you sure you want to release directory `directory', any line starting with Y or y is considered to be a yes; any other initial character is considered to be a no.


  Previous section   Next section
Top