17

How do i check out a specific directory from CVS and omit the tree leading up to that directory?

EX.

Id like to checkout to this directory C:/WebHost/MyWebApp/www

My CVS Project directory structure is MyWebApp/Trunk/www

How do i omit the Trunk and MyWebApp directories?

Zoe
  • 23,712
  • 16
  • 99
  • 132
Bob_Gneu
  • 1,521
  • 1
  • 18
  • 30

3 Answers3

26

Use cvs -d/cvsroot checkout -d directory project/path/directory. The first -d can be omitted if you set the root with the environment. This is called "shortening the path" and can be avoided with the -N option to checkout.

Alex M
  • 2,420
  • 20
  • 15
  • eg: `cvs -d anoncvs@anoncvs.openbsd.org:/cvs co -d ls src/bin/ls` to checkout the [ls](http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/bin/ls/) remote repository directory to `ls` local repository directory (by creating it, if does not exist already) –  Feb 08 '19 at 05:57
  • and by exporting the `CVSROOT` environment variable (as `typeset -x CVSROOT=anoncvs@anoncvs.openbsd.org:/cvs`) the command can be shortened to just `cvs co -d ls src/bin/ls` –  Feb 08 '19 at 06:03
3

CVS is 'tied' to the repository by files in the .CVS folder. Each folder is 'tied' individually.

This means you can just check out the full thing (or if you already have the full thing), then cut/paste the www directory out to somewhere else, and it will remain linked to the correct CVS location.

Orion Edwards
  • 113,829
  • 60
  • 223
  • 307
1

[Oops, deleted some wrong crap.] yeah, co -d www is what you want.

You can also set up modules in the repository, which will let you check out just www as if it were a top-level directory, but you have to do it for every such directory.

user10392
  • 1,306
  • 8
  • 11
  • I am getting the MyWebApp/Trank directories. You are saying the solution is to make that a module and otherwise this is ot possible? – Bob_Gneu Sep 18 '08 at 01:37