NAnt.SourceControlTasks A base class for creating tasks for executing CVS client commands on a CVS repository. A base class for creating tasks for executing CVS client commands on a CVS repository. Name of the environmental variable specifying a users' home in a *nix environment. Used on windows to specify the location of application data. The environment variable that holds path information. The environment variable that holds the location of the .cvspass file. Property name used to specify the source control executable. This is used as a readonly property. Initializes a new instance of the class. Build up the command line arguments, determine which executable is being used and find the path to that executable and set the working directory. The process to prepare. Adds a new global option if none exists. If one does exist then the use switch is toggled on or of. The common name of the option. The option value or command line switch of the option. true if the option should be appended to the commandline, otherwise false. Adds a new command option if none exists. If one does exist then the use switch is toggled on or of. The common name of the option. The option value or command line switch of the option. true if the option should be appended to the commandline, otherwise false. Set up the environment variables for a process. A process to setup. Append the files specified in the fileset to the command line argument. Files are changed to use a relative path from the working directory that the task is spawned in. Derive the location of the version control system from the environment variable PATH. The file information of the version control system, or null if this cannot be found. The name of the passfile, overriden for each version control system (VCS). The path to the specific home directory of the version control system, this can be where the binary files are kept, or other app information. The environment variable that defines where the version control system (VCS) home variable is kept. The name of the version control system (VCS) executable file. The root variable contains information on how to locate a repository. Although this information is in different formats it typically must define the following: server location protocol used to communicate with the repository repository location on the server project location in the repository Destination directory for the local sandbox. If destination is not specified then the current directory is used. Root path of the local sandbox. Root path of the local sandbox. The password for logging in to the repository. The password for logging in to the repository. The full path to the cached password file. If not specified then the environment variables are used to try and locate the file. Holds a collection of globally available options. A collection of options that can be used to modify the default behavoir of the version control commands. See the sub-tasks for implementation specifics. Command-line arguments for the program. The command line arguments are used to specify any cvs command options that are not available as attributes. These are appended after the command itself and are additive to whatever attributes are currently specified. <cvs-checkout cvsroot=":pserver:anonymous@cvs.sourceforge.net:/cvsroot/nant" module="nant" destination="e:\test\merillcornish\working" readonly="true" quiet="true" commandline="-n" cvsfullpath="C:\Program Files\TortoiseCVS\cvs.exe" />
Produces the cvs command: c:\Program Files\TortoiseCVS\cvs.exe -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/nant -q checkout -n nant
The name of the command that is going to be executed. Used to specify the version control system (VCS) files that are going to be acted on. The executable to use for ssh communication. The environment name for the ssh variable. The name of the version control system executable. Get the command line arguments for the task. Default value for the recursive directive. The default is . Default value for the quiet command. Default value for the really quiet command. An environment variable that holds path information about where cvs is located. Name of the password file that cvs stores pserver cvsroot/ password pairings. The default compression level to use for cvs commands. The default use of binaries, defaults to use sharpcvs. The name of the cvs executable. The temporary name of the sharpcvslib binary file, to avoid conflicts in the path variable. Environment variable that holds the executable name that is used for ssh communication. Property name used to specify on a project level whether sharpcvs is used or not. Initializes a new instance of the class. Converts a value to a representation that can be interpreted by cvs. to convert. interpretation of . Build up the command line arguments, determine which executable is being used and find the path to that executable and set the working directory. The process to prepare. Override to append any commands before the modele and files. Append the command line options or commen names for the options to the generic options collection. This is then piped to the command line as a switch. Add the given argument to the command line options. Note that are not explicitly quoted are split into seperate arguments. This is to resolve a recent issue with quoting command line arguments. The environment name for the ssh variable. The name of the cvs binary, or cvs.exe at the time this was written. The name of the pass file, or .cvspass at the time of this writing. The name of the version control system specific home environment variable. Specify if the module is needed for this cvs command. It is only needed if there is no module information on the local file system. Used to specify the version control system (VCS) files that are going to be acted on. Get the cvs file set. The name of the cvs executable. The full path to the cvs binary used. The cvs tasks will attempt to "guess" the location of your cvs binary based on your path. If the task is unable to resolve the location, or resolves it incorrectly this can be used to manually specify the path. A full path (i.e. including file name) of your cvs binary: On Windows: c:\vcs\cvs\cvs.exe On *nix: /usr/bin/cvs The cvs root variable has the following components: [protocol]:[username]@[servername]:[server path]
  • protocol: ext, pserver, ssh (sharpcvslib); if you are not using sharpcvslib consult your cvs documentation.
  • username: [username]
  • servername: cvs.sourceforge.net
  • server path: /cvsroot/nant
NAnt anonymous cvsroot: :pserver:anonymous@cvs.sourceforge.net:/cvsroot/nant
The module to perform an operation on. The module to perform an operation on. This is a normal file/folder name without path information. In NAnt the module name would be: nant if the SharpCvsLib binaries that come bundled with NAnt should be used to perform the cvs commands, otherwise. You may also specify an override value for all cvs tasks instead of specifying a value for each. To do this set the property sourcecontrol.usesharpcvslib to . If you choose not to use SharpCvsLib to checkout from cvs you will need to include a cvs.exe binary in your path. To use a cvs client in your path instead of sharpcvslib specify the property: >property name="sourcecontrol.usesharpcvslib" value="false"< The default settings is to use sharpcvslib and the setting closest to the task execution is used to determine which value is used to execute the process. For instance if the attribute usesharpcvslib was set to false and the global property was set to true, the usesharpcvslib is closes to the point of execution and would be used and is false. Therefore the sharpcvslib binary would NOT be used. The executable to use for ssh communication. Indicates if the output from the cvs command should be supressed. The default is . Indicates if the output from the cvs command should be stopped. The default is . if the sandbox files should be checked out in read only mode. The default is . if the sandbox files should be checked out in read/write mode. The default is . Compression level to use for all net traffic. This should be a value from 1-9.

NOTE: This is not available on sharpcvslib.
Produces an XML report that represents the cvs changes from the given start day, to a given end date. Report changes in NAnt from 1st of June 2004 until 25th of July 2004. ]]> The command being executed. Name of the xml file that will contain the cvs log information. The earliest change to use in the cvs log command. The latest date to use in the cvs log command. The cvs command to execute. Override use of sharpcvslib, needs to be true. The cvs root variable has the following components: [protocol]:[username]@[servername]:[server path]
  • protocol: ext, pserver, ssh (sharpcvslib); if you are not using sharpcvslib consult your cvs documentation.
  • username: [username]
  • servername: cvs.sourceforge.net
  • server path: /cvsroot/nant
If the cvsroot is not specified then the directory specified by the attribute is searched for CVS\Root.
NAnt anonymous cvsroot: :pserver:anonymous@cvs.sourceforge.net:/cvsroot/nant
Checks out a CVS module to the required directory. Checkout NAnt. ]]> Checkout NAnt revision named 0_85 to the folder c:\src\nant\v0.85. ]]> So the nant module tagged with revision 0_85 will be checked out in the folder v0.85 under the working/ destination directory.
This could be used to work on different branches of a repository at the same time.
Checkout NAnt with specified revision date to the folder c:\src\nant\2003_08_16. ]]>
The command being executed. Initializes a new instance of the class. Specify the revision to checkout. This corresponds to the "sticky-tag" of the file. Sticky tag or revision to checkout. Specify the revision date to checkout. The date specified is validated and then passed to the cvs binary in a standard format recognized by cvs. Specify a directory name to replace the module name. Valid names include any valid filename, excluding path information. Specify a directory name to replace the module name. Valid names include any valid filename, excluding path information. The name of the cvs command that is going to be executed. Executes the cvs login command which appends or updates an entry to the specified .cvspass file. Update .cvspass file to include the NAnt anonymous login. ]]> Ensures all information is available to execute the . Update the .cvspass file with the given password. If the passfile is not specified then the default search locations are used: CVS_PASSFILE/.cvspass HOME/.cvspass USERPROFILE/.cvspass TODO: Confirm that this is valid behavior or if it is going to give problems with the cvsnt implementation. Password to append or update to the .cvspass file. The full path to the .cvspass file. The default is ~/.cvspass. The current working directory. The repository root string. Executes the cvs command specified by the command attribute. Checkout NAnt. ]]> The cvs command to execute. Specify if the module is needed for this cvs command. Exports a cvs module in preperation for a release (i.e. the CVS version folders are not exported). Export the most recent NAnt sources from cvs. ]]> Export NAnt revision named your_favorite_revision_here to the folder c:\src\nant\replacement_for_module_directory_name. **NOTE**: filesets names for the export task must be prefixed with the module name. This is different than other tasks. ]]> The command being executed. Create a new instance of the . The following values are set by default:
  • Recursive:
No shortening. Do not shorten module paths if -d specified. Indicates whether the head revision should be used if the revison specified by or the tags are not found. The default is . if the specified tag should be moved; otherwise, . The default is . If a directory is specified indicates whether sub-directories should also be processed. if the sub-directories should be tagged; otherwise, . The default is . Specify the revision to update the file to. This corresponds to the "sticky-tag" of the file. Specify the revision date to update to. The version of the file that existed at the date specified is retrieved. A valid date time value, which is then converted to a format that cvs can parse. Specify a directory name to replace the module name. Valid names include any valid filename, excluding path information. The export command name for the cvs client. Tags all sources in the remote repository with a given tag. Unlike tag, the rtag command acts only on sources that are in the repository. Any modified sources on the local file system will NOT be tagged with this command, so a commit should be performed before an rtag is done. NOTE: Although a working directory is not necessary to perform the command one must be specified in order to remain in compliance with the cvs library. Tag NAnt sources remotely. ]]> Remove a tag from the remote repository. ]]> Initializes a new instance of the class. Append the tag information to the commandline. The name of the tag to assign or remove. The name of the tag to assign or remove. Indicates whether the tag specified in should be removed or not. if the specified tag should be removed; otherwise, . The default is . Indicates whether the tag specified in should be moved to the current file revision. If the tag does not exist then it is created. if the specified tag should be moved; otherwise, . The default is . If a directory is specified indicates whether sub-directories should also be processed. if the sub-directories should be tagged; otherwise, . The default is . Indicates the repository that is acted on for the tag command. Note if is then the tag specified is moved to the revision of the file on the HEAD of the branch specified. The tag (or more likely) branch that should be used to apply the new tag. Indicates the revision date of the file that the tag should be applied to. A valid date which specifies the revision point that the tag will be applied to. Indicates whether the head revision should be used if the or the tags are not found. if the specified tag should be moved; otherwise, . The default is . The name of the cvs command that is going to be executed. Tags all local sources with the specified tag. This differs from the in that it acts on references to the cvs files contained in your local filesystem. As such the sticky tags and local revisions can be considered in commits. It also allows you to verify that all local files have been checked in before a tag is performed. Tag NAnt sources remotely. ]]> Remove a tag from the remote repository. ]]> Cvs command to be executed. Initializes a new instance of the class. Append the tag information to the commandline. The name of the tag to assign or remove. The name of the tag to assign or remove. Indicates whether the tag specified in should be removed or not. if the specified tag should be removed; otherwise, . The default is . Indicates whether the tag specified in should be moved to the current file revision. If the tag does not exist then it is created. if the specified tag should be moved; otherwise, . The default is . If a directory is specified indicates whether sub-directories should also be processed. if the sub-directories should be tagged; otherwise, . The default is . Indicates the repository that is acted on for the tag command. Note if is then the tag specified is moved to the revision of the file on the HEAD of the branch specified. The tag (or more likely) branch that should be used to apply the new tag. Indicates the revision date of the file that the tag should be applied to. A valid date which specifies the revision point that the tag will be applied to. Indicates whether the head revision should be used if the revision specified by or the tags are not found. if the specified tag should be moved; otherwise, . The default is . Indicates whether the head revision should be used if the or the tags are not found. if the specified tag should be moved; otherwise, . The default is . The name of the cvs command that is going to be executed. Not used Specify if the module is needed for this cvs command. It is only needed if there is no module information on the local file system. Updates a CVS module in a local working directory. Update nant. ]]> Update your NAnt revision named your_favorite_revision_here in the folder c:\src\nant\replacement_for_module_directory_name. ]]> The command being executed. Initializes a new instance of the class. Sets the build directory and prune empty directory properties to . If . new directories will be created on the local sandbox. The default is . If empty directories copied down from the remote repository will be removed from the local sandbox. The default is . If the local copy of the file will be overwritten with the copy from the remote repository. The default is . Specifies if the command should be executed recursively. The default is . The -R option is on by default in cvs. Specify the revision to update the file to. This corresponds to the "sticky-tag" of the file. Sticky tag or revision to update the local file to. A valid cvs tag. Specify the revision date to update to. The version of the file that existed at the date specified is retrieved. A valid date time value, which is then converted to a format that cvs can parse. Specify if the module is needed for this cvs command. It is only needed if there is no module information on the local file system. The name of the cvs command that is going to be executed. A is a with extra attributes useful in the context of the . Initialize the object and locate the .cvsignore files to add to the exclude list. Indicates whether the entires in the .cvsignore should be used to limit the file list; to exclude files in .cvsignore, otherwise . The default is .