188Chapter6 • Introduction to CVS
Additionally, if you have not yet issued the
remove
command, you can retrieve a copy of
the file from the repository by issuing an
update
command.
# rm index.html
# cvs update index.html
U index.html
6.4.10Renaming Files within a Project
There is no direct method of renaming files within the CVS repository. In order to rename
a file, you must remove the old name and add in the new one. Here is an example of renaming a
file from
oldfile
to
newfile
.
# cvs status oldfile
============================================================
File: oldfile Status: Up-to-date
Working revision: 1.1
Repository revision: 1.1 /usr/local/cvsroot/fuzion/
oldfile,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)
# mv oldfile newfile
# cvs remove oldfile
cvs server: scheduling `oldfile' for removal
cvs server: use 'cvs commit' to remove this file permanently
# cvs add newfile
cvs server: scheduling file `newfile' for addition
cvs server: use 'cvs commit' to add this file permanently
# cvs commit -m "Ren oldfile newfile" oldfile newfile
Removing oldfile;
/usr/local/cvsroot/fuzion/oldfile,v <-- oldfile
new revision: delete; previous revision: 1.1
done
RCS file: /usr/local/cvsroot/fuzion/newfile,v
done
Checking in newfile;
/usr/local/cvsroot/fuzion/newfile,v <-- newfile
initial revision: 1.1
done
6.4.11Removing your Working Copy
Once you have committed your changes to the repository, or if you wish to abandon your
changes, you can release the working copy prior to deleting it. If you have any files checked out
Next Page >>
<< Previous Page
Back to the Table of Contents