C# Класс SourceControl.PerforceBase

Implements the base class for all perforce-type source control systems.
Наследование: ISourceControl, ILogControl
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

Connect() публичный Метод

Connects to the depot.
public Connect ( ) : bool
Результат bool

Disconnect() публичный Метод

Disconnects from the depot.
public Disconnect ( ) : void
Результат void

GetChange() публичный Метод

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
Результат Change

GetFile() публичный Метод

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
Результат string

PerforceBase() защищенный Метод

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.
Результат System

RunClient() защищенный Метод

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.
Результат string

SetLogLevel() публичный Метод

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.
Результат void