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

NAnt::SourceControl::Tasks::AbstractSourceControlTask Class Reference

Inheritance diagram for NAnt::SourceControl::Tasks::AbstractSourceControlTask:

NAnt::Core::Tasks::ExternalProgramBase NAnt::Core::Task NAnt::Core::Element NAnt::SourceControl::Tasks::AbstractCvsTask 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 38 of file AbstractSourceControlTask.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

 AbstractSourceControlTask ()
 Initializes a new instance of the AbstractCvsTask class.
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.
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 CvsPassFileVariable = "CVS_PASSFILE"
 The environment variable that holds the location of the .cvspass file.
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.


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.
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.
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, set]
 The name of the version control system 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 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.
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.
abstract string PassFileName [get]
 The name of the passfile, overriden for each version control system (VCS).
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.
virtual string Root [get, set]
 The root variable contains information on how to locate a repository. Although this information is in different formats it typically must define the following:
location protocol used to communicate with the repository repository location on the server project location in the repository
virtual FileInfo Ssh [get, set]
 The executable to use for ssh communication.
abstract 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 .
abstract string VcsExeName [get]
 The name of the version control system (VCS) executable file.
virtual FileSet VcsFileSet [get, set]
 Used to specify the version control system (VCS) files that are going to be acted on.
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.
abstract string VcsHomeEnv [get]
 The environment variable that defines where the version control system (VCS) home variable is kept.
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

FileInfo DeriveFullPathFromEnv (string environmentVar, string fileName)

Private Attributes

string _commandLine = null
string _commandLineArguments
string _commandName
Hashtable _commandOptions = new Hashtable()
DirectoryInfo _destinationDirectory
string _exeName
FileSet _fileset = new FileSet()
Hashtable _globalOptions = new Hashtable()
FileInfo _passFile
string _password
string _root
FileInfo _ssh

Static Private Attributes

static readonly log4net.ILog Logger

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

Generated by  Doxygen 1.6.0   Back to index