Logo Search packages:      
Sourcecode: nant version File versions  Download package

NAnt::SourceControl::Tasks::AbstractCvsTask Class Reference

Inheritance diagram for NAnt::SourceControl::Tasks::AbstractCvsTask:

NAnt::SourceControl::Tasks::AbstractSourceControlTask NAnt::Core::Tasks::ExternalProgramBase NAnt::Core::Task NAnt::Core::Element NAnt::SourceControl::Tasks::ChangeLogTask NAnt::SourceControl::Tasks::CheckoutTask NAnt::SourceControl::Tasks::CvsTask NAnt::SourceControl::Tasks::ExportTask NAnt::SourceControl::Tasks::RTagTask NAnt::SourceControl::Tasks::TagTask NAnt::SourceControl::Tasks::UpdateTask

List of all members.

Detailed Description

A base class for creating tasks for executing CVS client commands on a CVS repository.

Definition at line 42 of file AbstractCvsTask.cs.

Public Member Functions

void Execute ()
 Executes the task unless it is skipped.
void Initialize (XmlNode elementNode)
 Performs default initialization.
void InitializeTaskConfiguration ()
 Initializes the configuration of the task using configuration settings retrieved from the NAnt configuration file.
bool IsLogEnabledFor (Level messageLevel)
 Determines whether build output is enabled for the given Level.
override void Log (Level messageLevel, string message, params object[] args)
 Logs a formatted message with the given priority.
override void Log (Level messageLevel, string message)
 Logs a message with the given priority.

Static Public Member Functions

static Element InitializeBuildElement (Element parent, XmlNode childNode, Element buildElement, Type elementType)

Public Attributes

const int UnknownExitCode = -1000
 Defines the exit code that will be returned by ExitCode if the process could not be started, or did not exit (in time).

Protected Member Functions

 AbstractCvsTask ()
 Initializes a new instance of the AbstractCvsTask class.
void AddArg (String arg)
 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.
void AppendFiles ()
 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.
virtual void AppendSubCommandArgs ()
 Override to append any commands before the modele and files.
void CopyTo (Element clone)
 Copies all instance data of the Element to a given Element.
FileInfo DeriveVcsFromEnvironment ()
 Derive the location of the version control system from the environment variable
override void ExecuteTask ()
 Starts the external process and captures its output.
XmlNode GetAttributeConfigurationNode (FrameworkInfo framework, string attributeName)
 Locates the XML node for the specified attribute in the project configuration node.
override void InitializeElement (XmlNode elementNode)
 <note>Deprecated (to be deleted).</note>
virtual void InitializeTask (XmlNode taskNode)
 Initializes the task.
virtual void InitializeXml (XmlNode elementNode, PropertyDictionary properties, FrameworkInfo framework)
 Initializes all build attributes and child elements.
override void PrepareProcess (Process process)
 Build up the command line arguments, determine which executable is being used and find the path to that executable and set the working directory.
void SetCommandOption (String name, String value, bool on)
 Adds a new command option if none exists. If one does exist then the use switch is toggled on or of.
virtual void SetEnvironment (Process process)
 Set up the environment variables for a process.
void SetGlobalOption (String name, String value, bool on)
 Adds a new global option if none exists. If one does exist then the use switch is toggled on or of.
virtual Process StartProcess ()
 Starts the process and handles errors.

Protected Attributes

const string AppData = "APPDATA"
 Used on windows to specify the location of application data.
const string CvsExe = "cvs.exe"
 The name of the cvs executable.
const string CvsHome = "CVS_HOME"
 An environment variable that holds path information about where cvs is located.
const String CvsPassfile = ".cvspass"
 Name of the password file that cvs stores pserver cvsroot/ password pairings.
const string CvsPassFileVariable = "CVS_PASSFILE"
 The environment variable that holds the location of the .cvspass file.
const string CvsRsh = "CVS_RSH"
 Environment variable that holds the executable name that is used for ssh communication.
const int DefaultCompressionLevel = 3
 The default compression level to use for cvs commands.
const bool DefaultQuiet = false
 Default value for the quiet command.
const bool DefaultReallyQuiet = false
 Default value for the really quiet command.
const bool DefaultRecursive = false
 Default value for the recursive directive. The default is .
const bool DefaultUseSharpCvsLib = true
 The default use of binaries, defaults to use sharpcvs.
const String EnvHome = "HOME"
 Name of the environmental variable specifying a users' home in a *nix environment.
const String PathVariable = "PATH"
 The environment variable that holds path information.
const string PropExeName = "sourcecontrol.exename"
 Property name used to specify the source control executable. This is used as a readonly property.
const string SharpCvsExe = "scvs.exe"
 The temporary name of the sharpcvslib binary file, to avoid conflicts in the path variable.
const string UseSharpCvsLibProp = "sourcecontrol.usesharpcvslib"
 Property name used to specify on a project level whether sharpcvs is used or not.


virtual ArgumentCollection Arguments [get]
 The command-line arguments for the external program.
virtual DirectoryInfo BaseDirectory [get, set]
 Gets the working directory for the application.
string CommandLine [get]
 Gets the command-line arguments, separated by spaces.
string CommandLineArguments [get, set]
 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.
virtual string CommandName [get, set]
 The name of the command that is going to be executed.
Hashtable CommandOptions [get, set]
 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.
int CompressionLevel [get, set]
 Compression level to use for all net traffic. This should be a value from 1-9.

<bold>NOTE: This is not available on sharpcvslib.</bold>.
virtual bool CustomXmlProcessing [get]
 Gets a value indicating whether the element is performing additional processing using the XmlNode that was used to initialize the element.
CvsFileSet CvsFileSet [get, set]
 Used to specify the version control system (VCS) files that are going to be acted on.
FileInfo CvsFullPath [get, set]
 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.
virtual DirectoryInfo DestinationDirectory [get, set]
 Destination directory for the local sandbox. If destination is not specified then the current directory is used.
virtual TextWriter ErrorWriter [get, set]
 Gets or sets the TextWriter to which error output of the external program will be written.
override string ExeName [get]
 The name of the cvs executable.
int ExitCode [get]
 Gets the value that the process specified when it terminated.
bool FailOnError [get, set]
 Determines if task failure stops the build, or is just reported. The default is .
Hashtable GlobalOptions [get, set]
 Holds a collection of globally available options.
bool IfDefined [get, set]
 If then the task will be executed; otherwise, skipped. The default is .
virtual bool IsCvsRootNeeded [get]
 Specify if the cvs root should be used for this cvs command. It is only needed if there is no module information on the local file system, there fore is not needed for a cvs update.
virtual bool IsModuleNeeded [get]
 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.
virtual Location Location [get, set]
 Gets or sets the location in the build file where the element is defined.
string LogPrefix [get]
 The prefix used when sending messages to the log.
virtual string Module [get, set]
 The module to perform an operation on.
override string Name [get]
 The name of the task.
XmlNamespaceManager NamespaceManager [get, set]
 Gets or sets the XmlNamespaceManager.
virtual FileInfo Output [get, set]
 Gets the file to which the standard output should be redirected.
virtual bool OutputAppend [get, set]
 Gets a value indicating whether output will be appended to the Output.
virtual TextWriter OutputWriter [get, set]
 Gets or sets the TextWriter to which standard output messages of the external program will be written.
object Parent [get, set]
 Gets or sets the parent of the element.
virtual FileInfo PassFile [get, set]
 The full path to the cached password file. If not specified then the environment variables are used to try and locate the file.
override string PassFileName [get]
 The name of the pass file, or .cvspass at the time of this writing.
virtual string Password [get, set]
 The password for logging in to the repository.
override string ProgramArguments [get]
 Get the command line arguments for the task.
virtual string ProgramFileName [get]
 Gets the filename of the external program to start.
virtual Project Project [get, set]
 Gets or sets the Project to which this element belongs.
virtual PropertyDictionary Properties [get]
 Gets the properties local to this Element and the Project.
bool Quiet [get, set]
 Indicates if the output from the cvs command should be supressed. The default is .
bool ReadOnly [get, set]
 if the sandbox files should be checked out in read only mode. The default is .
bool ReadWrite [get, set]
 if the sandbox files should be checked out in read/write mode. The default is .
bool ReallyQuiet [get, set]
 Indicates if the output from the cvs command should be stopped. The default is .
override string Root [get, set]
 The cvs root variable has the following components:

[protocol]:[username]@[servername]:[server path]

override FileInfo Ssh [get, set]
 The executable to use for ssh communication.
override string SshEnv [get]
 The environment name for the ssh variable.
Level Threshold [get, set]
 Gets or sets the log threshold for this Task. By default the threshold of a task matches the threshold of the project.
int TimeOut [get, set]
 The maximum amount of time the application is allowed to execute, expressed in milliseconds. Defaults to no time-out.
bool UnlessDefined [get, set]
 Opposite of IfDefined. If then the task will be executed; otherwise, skipped. The default is .
virtual bool UseRuntimeEngine [get, set]
 Specifies whether the external program should be executed using a runtime engine, if configured. The default is .
virtual bool UseSharpCvsLib [get, set]
 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 .

<warn> If you choose not to use SharpCvsLib to checkout from cvs you will need to include a cvs.exe binary in your path. </warn>

override string VcsExeName [get]
 The name of the cvs binary, or cvs.exe at the time this was written.
override FileSet VcsFileSet [get]
 Get the cvs file set.
DirectoryInfo VcsHome [get]
 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.
override string VcsHomeEnv [get]
 The name of the version control system specific home environment variable.
bool Verbose [get, set]
 Determines whether the task should report detailed build log messages. The default is .
virtual XmlNode XmlNode [get, set]
 Gets or sets the XML node of the element.

Private Member Functions

void AppendCommandOptions ()
 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.
void AppendGlobalOptions ()

Private Attributes

CvsFileSet _cvsFileSet = new CvsFileSet()
FileInfo _cvsFullPath
bool _isUseSharpCvsLibSet = false
string _module
string _sharpcvslibExeName
bool _useSharpCvsLib = DefaultUseSharpCvsLib

Static Private Attributes

static readonly log4net.ILog Logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType)

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index