C# Class Mercurial.PersistentClient

This class implements IClient by spinning up an instance when first instantiated, and keeping the instance around and communicating with it over standard input and output, using the new "command server mode" introduced in Mercurial 1.9.
Inheritance: IClient, IDisposable
Mostrar archivo Open project: TargetProcess/Mercurial-Plugin Class Usage Examples

Public Methods

Method Description
CancelExecuting ( ) : void

Stops command executing.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Execute ( IMercurialCommand command ) : void

Executes the given IMercurialCommand command against the Mercurial repository.

IsSupported ( string repositoryPath ) : bool

Determine if this class is supported by the given repository and current Mercurial client version.

PersistentClient ( string repositoryPath ) : System

Initializes a new instance of the PersistentClient class.

Private Methods

Method Description
DecodeInitialBlock ( ) : void

Decodes the initial block that Mercurial outputs when it is spun up.

StartPersistentMercurialClient ( ) : void

This spins up a Mercurial client in command server mode for the repository.

StopPersistentMercurialClient ( ) : void

This spins down the Mercurial client that was spun up by StartPersistentMercurialClient.

Method Details

CancelExecuting() public method

Stops command executing.
public CancelExecuting ( ) : void
return void

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

Execute() public method

Executes the given IMercurialCommand command against the Mercurial repository.
/// is null. /// /// HG did not complete within the allotted time. ///
public Execute ( IMercurialCommand command ) : void
command IMercurialCommand /// The command to execute. ///
return void

IsSupported() public static method

Determine if this class is supported by the given repository and current Mercurial client version.
/// is null or empty. ///
public static IsSupported ( string repositoryPath ) : bool
repositoryPath string /// The path to the repository to check supportability for. ///
return bool

PersistentClient() public method

Initializes a new instance of the PersistentClient class.
/// is null or empty. /// /// The is not supported for the specified repository path, /// or the current Mercurial client. ///
public PersistentClient ( string repositoryPath ) : System
repositoryPath string /// The path to the repository this will handle. ///
return System