[HOWTO] Import a Directory Tree in CVS

Let the directory tree you want to put under CVS control resides in /tmp/working, and you want it to appear in the repository as ${CVSROOT}/tools/mysources.


cd /tmp/working
cvs import -m "Imported sources" tools/mysources vendor start

*) Unless you supply a log message with the -m flag, CVS starts an editor and prompts for a message;
*) The string vendor is a vendor tag, and start is a release tag. They may fill no purpose in this context, but since CVS requires them they must be present;
*) working does not need to be under your local CVS directory structure at all. It can be anywhere on your hard disk. The only thing that matters is the CVSROOT- related path you specify to be used by the import command (tools/mysources, in this case);
*) cvs import does not change the directory in which you invoke it. In particular, it does not set up that directory as a cvs working directory. If you want to work with the sources, import them first and then check them out into a different directory;
*) The synopsis of the command is: import [-options] repository vendortag releasetag... This command imports everything under the current working directory. I didn’t find a way to specify particluar items to import;
*) If the mysources directory in the CVSROOT does not exist, it will be created and everything under /tmp/working/* will be added there. If mysources exists, everything under /tmp/working/* will be added there, preserving the original content that was there before;

See: this reference from ximbiot.com for more info on the topic.

This entry was posted in console and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s