CVS checkout without all of extra folders

3k views Asked by At

I want to checkout a specific folder from deep within a CVS module into my Hudson / Jenkins workspace. Stripping off the other options (such as pruning, branch, etc) the CVS command is ...

cvs checkout -d workspace module\a\b\c\d\e\f

This causes my folder to contain a child folder 'a' and that contains 'b' and that contains ... well you get the idea. All of them are empty until you get down to folder 'f'.

What I'd really like is for myfolder to contain the contents of f. Does CVS support this functionality (without defining f as a module)?

And for bonus karma ... Can I get Jenkins to use this option with a .cvsrc or some other mechanism?

3

There are 3 answers

3
Sagar On

There is a file called "modules", under your CVSROOT folder. You can edit it, and a line like the following:

###shortcut name                            actual path########     
f                                         /a/b/c/d/e/f

Check this file back in. Once it sets in, you can just use

cvs checkout -d workspace f

Also, in Hudson, you can (in the Modules(s) ) box, just put f, and it should directly download only f, instead of the entire structure. Once that is down, you could rename it using a shell/command.

1
user610184 On

I don't get the behaviour you describe. When I move to an empty directory and do

cvs checkout -d fox modules/a/quick/brown/fox

I just get a new directory called fox containing the contents of the directory I requested. (Note the forward slashes.)

However, if I do

cvs checkout modules/a/quick/brown/fox

then I get what you describe.

I'm using the latest FSF build of CVS on windows, http://ftp.gnu.org/non-gnu/cvs/binary/feature/x86-woe/cvs-1-12-13a.zip .

0
liegebeest On

More in General:

Go up 1 level above where you checked out

cvs co -r "TAG"