2

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?

Zoe
  • 27,060
  • 21
  • 118
  • 148
RichH
  • 6,108
  • 1
  • 37
  • 61
  • `$ CVS_RSH=ssh cvs -d anoncvs@anoncvs.jp.openbsd.org:/cvs/src/usr.bin/ssh checkout -P .` That is what I used to fetch just the content of `src/usr.bin/ssh` to the current directory. I'm not sure how your CSV repository is structured but maybe you could try `cvs checkout -d workspace/module/a/b/c/d/e/f .`. You can view the repository used in my example at https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/. – Daniel Le Apr 14 '18 at 12:34

3 Answers3

2

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 .

user610184
  • 21
  • 2
  • I've tried switching to that cvs.exe (I was using CVSNT) and changing to forward slashes. I still get the same behavior with the full a/b/c/de/f hierarchy. – RichH Feb 09 '11 at 19:52
1

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.

Sagar
  • 9,456
  • 6
  • 54
  • 96
  • Unfortunately I don't have control over defining new modules. I'd need lots of them too (as lots of folders need mapping in this way). I was hoping to find an alternative solution, but this is still a good answer. – RichH Feb 04 '11 at 19:18
  • Hmm..unforunately, I'm not sure why Hudson is doing that. If you try the same command from the command line ( I just did ), you should get all the files & folders from "f" directly under the "workspace" directly... – Sagar Feb 07 '11 at 21:20
  • It looks like there might be something different about your configuration, because vanilla CVS should not be behaving like that. Can you try this on another computer? – Sagar Feb 09 '11 at 22:11
0

More in General:

Go up 1 level above where you checked out

cvs co -r "TAG"

liegebeest
  • 39
  • 4