cvs-usage revision dafcb997e390efa4423883dafd100c975c4095d6
0709cd166604645c5511b892413b44ad6bce6b64Satyen DesaiCopyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
0709cd166604645c5511b892413b44ad6bce6b64Satyen DesaiCopyright (C) 2000, 2001 Internet Software Consortium.
0709cd166604645c5511b892413b44ad6bce6b64Satyen DesaiSee COPYRIGHT in the source root or http://isc.org/copyright.html for terms.
0709cd166604645c5511b892413b44ad6bce6b64Satyen DesaiNotes on CVS Usage
0709cd166604645c5511b892413b44ad6bce6b64Satyen DesaiAccessing the repository
0709cd166604645c5511b892413b44ad6bce6b64Satyen DesaiThe recommended way of accessing the BIND 9 CVS repository is by ssh
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desaito rc.isc.org, using the following environment settings:
0709cd166604645c5511b892413b44ad6bce6b64Satyen DesaiCreating a release branch
0709cd166604645c5511b892413b44ad6bce6b64Satyen DesaiHere's how the 9.0 release branch was created:
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai cvs rtag v9_0_base bind9
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai cvs rtag -b -r v9_0_base v9_0 bind9
0709cd166604645c5511b892413b44ad6bce6b64Satyen DesaiRenaming files by respository copy
0709cd166604645c5511b892413b44ad6bce6b64Satyen DesaiWhen you need to rename or move a file that is under CVS control, use
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desaithe "repository copy" method as described in the following text
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desaiborrowed from an ancient CVS FAQ:
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai 2C.4 How do I rename a file?
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai CVS does not offer a way to rename a file in a way that CVS can
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai track later. See Section 4B for more information.
1bb9ba7f0e700971d0c04fca23820699348cfd49Satyen Desai Here is the best way to get the effect of renaming, while
1bb9ba7f0e700971d0c04fca23820699348cfd49Satyen Desai preserving the change log:
1bb9ba7f0e700971d0c04fca23820699348cfd49Satyen Desai 1. Copy the RCS (",v") file directly in the Repository.
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai cp $CVSROOT/<odir>/<ofile>,v $CVSROOT/<ndir>/<nfile>,v
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai 2. Remove the old file using CVS.
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai By duplicating the file, you will preserve the change
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai history and the ability to retrieve earlier revisions of the
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai old file via the "-r <tag/rev>" or "-D <date>" options to
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai "checkout" and "update".
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai cd <working-dir>/<odir>
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai cvs remove <ofile>
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai cvs commit <ofile>
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai 3. Retrieve <newfile> and remove all the Tags from it.
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai By stripping off all the old Tags, the "checkout -r" and
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai "update -r" commands won't retrieve revisions Tagged before
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai the renaming.
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai cd <working-dir>/<ndir>
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai cvs update <nfile>
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai cvs log <nfile> # Save the list of Tags
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai cvs tag -d <tag1> <nfile>
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai cvs tag -d <tag2> <nfile>
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai This technique can be used to rename files within one directory or
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai across different directories. You can apply this idea to
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai directories too, as long as you apply the above to each file and
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai don't delete the old directory.
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai Of course, you have to change the build system (e.g. Makefile) in
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai your <working-dir> to know about the name change.
0709cd166604645c5511b892413b44ad6bce6b64Satyen DesaiPulling up a newly added file to a release branch:
0709cd166604645c5511b892413b44ad6bce6b64Satyen DesaiIn a mainline working tree, do something like this:
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai cvs tag v9_0_base file
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai cvs tag -b -r v9_0_base v9_0 file
0709cd166604645c5511b892413b44ad6bce6b64Satyen DesaiImporting contrib source from vendor release
0709cd166604645c5511b892413b44ad6bce6b64Satyen DesaiAs an example, here's how queryperf was imported:
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai cvs -d shell.nominum.com:/proj/cvs/nominum export -rHEAD queryperf
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai cd queryperf
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai cvs -d rc.isc.org:/proj/cvs/isc import bind9/contrib/queryperf \
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai NOMINUM NOMINUM_20010710
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai$Id: cvs-usage,v 1.8 2004/03/05 05:04:50 marka Exp $