Computer And Technologies

Computer And Technologies: Exporting a Module in CVS (Linux)

Wednesday, 6 May 2009

Exporting a Module in CVS (Linux)

The cvs export command can be used when you need to get a copy of the codebase to someone, but without the CVS administrative directories.

The syntax is:

cvs export -r tag module
In many cases, I will need to export the codebase of a module at the HEAD of the main trunk. Simply use the HEAD tag to perform this. The following example, will export the latest codebase for the TestCvsModule module:
cvs export -r HEAD TestCvsModule

NOTE: There is a bug in several versions of CVS that will prevent the developer from exporting a module if your CVSROOT variable has a trailing slash. It will give you this error:
% echo $CVSROOT
/var/lib/cvsroot/

% cvs export -r HEAD module
cvs [export aborted]: cannot export into working directory
To fix this, simply remove the trailing slash from your CVSROOT environment variable and issue the export command again:
% export CVSROOT=/var/lib/cvsroot

% echo $CVSROOT
/var/lib/cvsroot

% cvs export -r HEAD TestCvsModule

NOTE: There are versions of CVS that have reported, what I think is a bug, that when someone has exported a HEAD revision of a cvs module:
cvs export -r HEAD 
, that deleted files (files in the Attic) are also exported.

No comments:

Post a Comment