C# Class CcNet.Labeller.SvnRevisionLabeller

Inheritance: ILabeller
Afficher le fichier Open project: neutmute/SvnRevisionLabeller

Private Properties

Свойство Type Description
CalculateElapsedDays int
CalculateMsRevision int
ParseAssemblyInfoVersion void

Méthodes publiques

Méthode Description
Generate ( IIntegrationResult resultFromLastBuild ) : string

Returns the label to use for the current build.

Run ( IIntegrationResult result ) : void

Runs the task, given the specified IIntegrationResult, in the specified IProject.

SvnRevisionLabeller ( ) : System

Initializes a new instance of the SvnRevisionLabeller class.

SvnRevisionLabeller ( ISystemClock systemClock ) : System

Initializes a new instance of the SvnRevisionLabeller class.

Méthodes protégées

Méthode Description
AppendCommonSwitches ( ThoughtWorks.CruiseControl.Core.Util.ProcessArgumentBuilder buffer ) : void

Appends the arguments required to authenticate against Subversion.

GetRevision ( ) : int

Gets the latest Subversion revision by checking the last log entry.

If an error occurs while parsing the Subversion log, the revision number will be returned as a 0.

ParseVersion ( int revision, IIntegrationResult resultFromLastBuild ) : System.Version

Parses a version string.

Quote ( string urlToBeQuoted ) : string

Ensures that the SVN URL is surrounded with quotation marks, so that paths with spaces in them do not cause an exception.

RunSvnProcess ( ThoughtWorks.CruiseControl.Core.Util.ProcessArgumentBuilder arguments ) : ProcessResult

Runs the Subversion process.

Private Methods

Méthode Description
CalculateElapsedDays ( string startDate, System.DateTime currentDate ) : int

Calculates the number of elapsed days.

CalculateMsRevision ( System.DateTime startDate, System.DateTime currentDate ) : int

Calculates the revision using the standard Microsoft format, being the number of seconds since midnight divided by 2.

ParseAssemblyInfoVersion ( ) : void

Instead of taking the major/minor from hard coded cc.net config, parse for it in the source code which is easily settable

Method Details

AppendCommonSwitches() protected méthode

Appends the arguments required to authenticate against Subversion.
protected AppendCommonSwitches ( ThoughtWorks.CruiseControl.Core.Util.ProcessArgumentBuilder buffer ) : void
buffer ThoughtWorks.CruiseControl.Core.Util.ProcessArgumentBuilder The argument builder.
Résultat void

Generate() public méthode

Returns the label to use for the current build.
Thrown when an error occurs while formatting the version number using the various formatting tokens. Thrown when an error occurs while formatting the version number and an argument has not been specified.
public Generate ( IIntegrationResult resultFromLastBuild ) : string
resultFromLastBuild IIntegrationResult IntegrationResult from last build used to determine the next label.
Résultat string

GetRevision() protected méthode

Gets the latest Subversion revision by checking the last log entry.
If an error occurs while parsing the Subversion log, the revision number will be returned as a 0.
protected GetRevision ( ) : int
Résultat int

ParseVersion() protected méthode

Parses a version string.
protected ParseVersion ( int revision, IIntegrationResult resultFromLastBuild ) : System.Version
revision int The current revision.
resultFromLastBuild IIntegrationResult The result from last build.
Résultat System.Version

Quote() protected méthode

Ensures that the SVN URL is surrounded with quotation marks, so that paths with spaces in them do not cause an exception.
protected Quote ( string urlToBeQuoted ) : string
urlToBeQuoted string The URL to be quoted.
Résultat string

Run() public méthode

Runs the task, given the specified IIntegrationResult, in the specified IProject.
public Run ( IIntegrationResult result ) : void
result IIntegrationResult The label for the current build.
Résultat void

RunSvnProcess() protected méthode

Runs the Subversion process.
protected RunSvnProcess ( ThoughtWorks.CruiseControl.Core.Util.ProcessArgumentBuilder arguments ) : ProcessResult
arguments ThoughtWorks.CruiseControl.Core.Util.ProcessArgumentBuilder The command-line arguments.
Résultat ProcessResult

SvnRevisionLabeller() public méthode

Initializes a new instance of the SvnRevisionLabeller class.
public SvnRevisionLabeller ( ) : System
Résultat System

SvnRevisionLabeller() public méthode

Initializes a new instance of the SvnRevisionLabeller class.
public SvnRevisionLabeller ( ISystemClock systemClock ) : System
systemClock ISystemClock The system clock implementation that will be used when calculating date-based /// revision numbers.
Résultat System