|Version Management with CVS - the CVS manual|
by Per Cederqvist et al.
Paperback (6"x9"), 216 pages, 8 figures
RRP £19.95 ($29.95)
7.5 Moving and renaming directories
The normal way to rename or move a directory is to rename or move each file within it as described in section 7.4.1 The normal way to rename. Then check out with the ‘-P’ option, as described in section 7.3 Removing directories.
If you really want to hack the repository to rename or delete a directory in the repository, you can do it like this:
- Inform everyone who has a checked out copy of the directory that the directory will be renamed. They should commit all their changes in all their copies of the project containing the directory to be removed, and remove all their working copies of said project, before you take the steps below.
Rename the directory inside the repository.
$ cd $CVSROOT/parent-dir $ mv old-dir new-dir
- Fix the CVS administrative files, if necessary (for instance if you renamed an entire module).
- Tell everyone that they can check out again and continue working.
If someone had a working copy the CVS commands will cease to work for them, until they remove the directory that disappeared inside the repository.
It is almost always better to move the files in the directory instead of moving the directory. If you move the directory you are unlikely to be able to retrieve old releases correctly, since they probably depend on the name of the directories.
|ISBN 0954161718||Version Management with CVS - the CVS manual||See the print edition|