C# Class SourceControl.PerforceBase

Implements the base class for all perforce-type source control systems.
Inheritance: ISourceControl, ILogControl
Afficher le fichier Open project: daptiv/Malevich

Méthodes publiques

Méthode Description
Connect ( ) : bool

Connects to the depot.

Disconnect ( ) : void

Disconnects from the depot.

GetChange ( string changeListId, bool includeBranchedFiles ) : Change

Gets the change from the source control system. The change must be pending. Returns null if any error occurs, or the change is not pending.

GetFile ( string depotFileName, int revision, System.DateTime &fileTime ) : string

Reads a file from the source control system.

SetLogLevel ( LogOptions level ) : void

Control the log output. Implemented here primarily to allow dumping the IO from the client utility.

Méthodes protégées

Méthode Description
PerforceBase ( string clientExe, ISourceControlSystem sourceControl ) : System

Constructor.

RunClient ( string commandLine, bool eatFirstLine ) : string

Runs the client exe, returns the output in a string. If error happens, prints stderr and returns null.

Private Methods

Méthode Description
BugOut ( string output ) : void

A customer-friendly way to fail if we cannot parse the output of client exe.

FillInFileData ( Change change, bool includeBranchedFiles ) : void

For every file in the change list, fill in its local path and either diff if it is an edit, or the file itself if it is an add.

Method Details

Connect() public méthode

Connects to the depot.
public Connect ( ) : bool
Résultat bool

Disconnect() public méthode

Disconnects from the depot.
public Disconnect ( ) : void
Résultat void

GetChange() public méthode

Gets the change from the source control system. The change must be pending. Returns null if any error occurs, or the change is not pending.
public GetChange ( string changeListId, bool includeBranchedFiles ) : Change
changeListId string Incude the text of branched and integrated files.
includeBranchedFiles bool
Résultat Change

GetFile() public méthode

Reads a file from the source control system.
public GetFile ( string depotFileName, int revision, System.DateTime &fileTime ) : string
depotFileName string The server name of the file.
revision int The revision of the file to get.
fileTime System.DateTime
Résultat string

PerforceBase() protected méthode

Constructor.
protected PerforceBase ( string clientExe, ISourceControlSystem sourceControl ) : System
clientExe string The location of source depot client (e.g. sd.exe).
sourceControl ISourceControlSystem The Source Control - must be either Source Depot or Perforce.
Résultat System

RunClient() protected méthode

Runs the client exe, returns the output in a string. If error happens, prints stderr and returns null.
protected RunClient ( string commandLine, bool eatFirstLine ) : string
commandLine string Command line to execute.
eatFirstLine bool Whether the first line should be swallowed.
Résultat string

SetLogLevel() public méthode

Control the log output. Implemented here primarily to allow dumping the IO from the client utility.
public SetLogLevel ( LogOptions level ) : void
level LogOptions The level of logging.
Résultat void