CVS checkout based only on tags

0 votes
asked Dec 28, 2010 by greg

I have a file containing a number of tags contained in a a CVS repository. Is there a way I can checkout all the files and their associated directories using only these tags without checking out the whole repository?

I don't have a list of the directories in the repository so I can't run cvs co -r baz_1_0_0_0 foo/bar/baz since I don't know where baz is actually located.

I am running CVS 1.11 so I don't have commands like rls available.

2 Answers

0 votes
answered Dec 22, 2012 by koral

If you do a:

   cvs history -T

it will give you tags and associated modules (assuming you have CVSROOT defined). You can then grep for the TAG you are looking for and checkout only those modules.


mods=`cvs history -T | grep $TAG | awk '{print $6}'`
for mod in $mods; do
   cvs co -r $TAG $mod
0 votes
answered Sep 15, 2017 by gilles

Check out .. That gives you all the files in the repository. With -r, that checks out all the files with that revision or tag.

Note that checking out . populates the current directory, so you may want to create a toplevel directory first.

mkdir baz
cd baz
cvs co -r baz_1_0_0_0 .
Welcome to Q&A, where you can ask questions and receive answers from other members of the community.
Website Online Counter