cvs-usage revision 499b34cea04a46823d003d4c0520c8b03e8513cb
499b34cea04a46823d003d4c0520c8b03e8513cbBrian WellingtonCopyright (C) 2000, 2001 Internet Software Consortium.
816e576f77e2c46df3e3d97d65822aa8aded7c4bDavid LawrenceSee COPYRIGHT in the source root or http://isc.org/copyright.html for terms.
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas GustafssonNotes on CVS Usage
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas GustafssonAccessing the repository
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas GustafssonThe recommended way of accessing the BIND 9 CVS repository is by ssh
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas Gustafssonto rc.isc.org, using the following environment settings:
0fb14ebc61cd2e696f1195bdd1a7e590c2b4da3aAndreas GustafssonCreating a release branch
0fb14ebc61cd2e696f1195bdd1a7e590c2b4da3aAndreas GustafssonHere's how the 9.0 release branch was created:
0fb14ebc61cd2e696f1195bdd1a7e590c2b4da3aAndreas Gustafsson cvs rtag v9_0_base bind9
0fb14ebc61cd2e696f1195bdd1a7e590c2b4da3aAndreas Gustafsson cvs rtag -b -r v9_0_base v9_0 bind9
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas GustafssonRenaming files by respository copy
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas GustafssonWhen you need to rename or move a file that is under CVS control, use
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrencethe "repository copy" method as described in the following text
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas Gustafssonborrowed from an ancient CVS FAQ:
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas Gustafsson 2C.4 How do I rename a file?
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas Gustafsson CVS does not offer a way to rename a file in a way that CVS can
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas Gustafsson track later. See Section 4B for more information.
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas Gustafsson Here is the best way to get the effect of renaming, while
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas Gustafsson preserving the change log:
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas Gustafsson 1. Copy the RCS (",v") file directly in the Repository.
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas Gustafsson cp $CVSROOT/<odir>/<ofile>,v $CVSROOT/<ndir>/<nfile>,v
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas Gustafsson 2. Remove the old file using CVS.
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas Gustafsson By duplicating the file, you will preserve the change
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas Gustafsson history and the ability to retrieve earlier revisions of the
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas Gustafsson old file via the "-r <tag/rev>" or "-D <date>" options to
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas Gustafsson "checkout" and "update".
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas Gustafsson cd <working-dir>/<odir>
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas Gustafsson cvs remove <ofile>
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas Gustafsson cvs commit <ofile>
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas Gustafsson 3. Retrieve <newfile> and remove all the Tags from it.
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas Gustafsson By stripping off all the old Tags, the "checkout -r" and
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas Gustafsson "update -r" commands won't retrieve revisions Tagged before
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas Gustafsson cd <working-dir>/<ndir>
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas Gustafsson cvs update <nfile>
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas Gustafsson cvs log <nfile> # Save the list of Tags
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas Gustafsson cvs tag -d <tag1> <nfile>
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas Gustafsson cvs tag -d <tag2> <nfile>
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas Gustafsson This technique can be used to rename files within one directory or
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas Gustafsson across different directories. You can apply this idea to
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas Gustafsson directories too, as long as you apply the above to each file and
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas Gustafsson don't delete the old directory.
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas Gustafsson Of course, you have to change the build system (e.g. Makefile) in
7b0fae507e9ea70bda493aa01c77b7c36949d366Andreas Gustafsson your <working-dir> to know about the name change.
0fb14ebc61cd2e696f1195bdd1a7e590c2b4da3aAndreas GustafssonPulling up a newly added file to a release branch:
0fb14ebc61cd2e696f1195bdd1a7e590c2b4da3aAndreas GustafssonIn a mainline working tree, do something like this:
0fb14ebc61cd2e696f1195bdd1a7e590c2b4da3aAndreas Gustafsson cvs tag v9_0_base file
0fb14ebc61cd2e696f1195bdd1a7e590c2b4da3aAndreas Gustafsson cvs tag -b -r v9_0_base v9_0 file
499b34cea04a46823d003d4c0520c8b03e8513cbBrian Wellington$Id: cvs-usage,v 1.6 2001/01/09 21:47:00 bwelling Exp $