Cernunnos Manual


<cvs-add>

Description:

Perfoms a CVS add operation.

WARNING: The netbeans javacvs API seems to be a bit finicky about path inputs. It's not hard to get a ResponseException with the message "The system cannot find the path specified." For best results, use the backslash ('\') character on Windows for both LOCAL_PATH and FILES; otherwise, use the slash ('/') character.

Reagents:

Name XPath Description Reagent Type Expected Type Required
CLIENT @client Optional Client object to use in performing this add. If omitted, the value of the 'CvsAttributes.CLIENT' request attribute will be used. PHRASE org.netbeans.lib.cvsclient.Client No
CVSROOT @cvsroot Optional CVSRoot string for preparing the GlobalOptions (e.g. ':pserver:user@host:/usr/local/cvsroot'). If omitted, the value of the 'CvsAttributes.CVSROOT' request attribute will be used. PHRASE java.lang.String No
LOCAL_PATH @local-path Path expression indicating the directory where the application is logically working from. PHRASE java.lang.String Yes
FILES @files Either a List of String objects or a single String indicating the files to add. If RECURSE is 'true' (default), each directory specified will also have its entire contents removed. PHRASE java.lang.Object Yes
RECURSE @recurse Optional Boolean expression specifying whether to add these FILES recursively or not. The default is Boolean.TRUE. PHRASE java.lang.Boolean No
BINARY_EXTENSIONS @binary-extensions Optional List of file extensions (e.g. 'gif', 'jar', etc.) that will be added as binary files using the '-kb' option applied. NB: specify extentions in *lower case* and *without* preceeding period characters ('.'); e.g. 'zip' not '.zip' PHRASE java.util.List No
MESSAGE @message Optional message to include for the CVS add. PHRASE java.lang.String No

Examples:

Adds 'some-file.txt' and the entire contents of 'another-sub-dir' to the 'myProject' CVS module:

 
       
        <cvs-client cvsroot=":pserver:user@host:/usr/local/cvsroot" encoded-password="change^me"> 
          <cvs-add local-path="C:\HOME\work\myProject"> 
            <file>some-sub-dir\some-file.txt</file>  
            <file>some-sub-dir\another-sub-dir</file> 
          </cvs-add> 
        </cvs-client>