CVS checkout: Checking out project to a directory other than the one you are currently in


Currently I issue the following command: cvs -d /path/cvsroot checkout -P directory/powers_npg/

However, this checks out the entire directory structure that is above the directory to the location I am in when I issue this command.

I am trying to check out this tree, but I want it checked out to a different directory than my PWD.

I would like something like this command:

cvs -d /wv/path/cvsroot checkout -P directory/powers_npg/ /home/me/Desktop/

So whatever would be checked out to my current location would be checked out to /home/me/Desktop/ instead.

I am accomplishing this right now by having a script that just moves the tree when I'm done checking out, but I imagine there's a better way to accomplish this.

Best Solution

I think what you want is the -d option to cvs checkout, something like

cvs checkout -d place-you-want-it module

From the CVS man page in "checkout options":

-d dir

Create a directory called dir for the working files, instead of using the module name. In general, using this flag is equivalent to using mkdir dir; cd dir followed by the checkout command without the -d flag.


$ cvs checkout -d /stuff/cvs/baz -P baz/another
cvs checkout: Updating /stuff/cvs/baz
U /stuff/cvs/baz/some
$ ls /stuff/cvs/baz
CVS/  some
Related Question