C# Class GitScc.Blinkbox.SccHelperService

Wrapper for Source control functionality.
Datei anzeigen Open project: blinkbox/Git-Source-Control-Provider Class Usage Examples

Private Properties

Property Type Description

Public Methods

Method Description
BranchAheadOrBehind ( string from, string to ) : AheadBehind

Determines how many commits the from branch is ahead and/or behind the toBranch.

CheckOutBranch ( string branch, bool createNew = false ) : void

Checks out a branch.

DiffBranches ( string from, string to ) : IEnumerable

Diffs the two branches.

DiffFileInTortoise ( string fileName, string endRevision = null, string startRevision = null ) : void

Diffs the file.

DiffFileWithGit ( string fileName, string revision ) : string

Diffs a file against the specified revision using git.

GetAbsolutePath ( string path ) : string

Converts a relative path to an absolute path relative to the solution.

GetCurrentBranch ( ) : string

Gets the current branch clean of any operation status.

GetHeadRevisionHash ( string branchName = null ) : string

Gets the latest revision for the specified branch (defaults to current branch).

GetLastCommitMessage ( ) : string

Gets the last commit message.

GetWorkingDirectory ( ) : string

Gets the current working directory.

IsMerging ( ) : bool

Determines whether this branch is merging.

ParseGitStatus ( string status ) : IList

Parses git status into a list of files.

RunGitCommand ( string command, bool wait = false, bool silent = false ) : GitCommand

Runs a tortoiseGit command.

RunGitTfs ( string command, bool wait = false, bool silent = false ) : string

Runs a command in the git tfs commandline environment.

RunTortoise ( string command ) : void

Runs a tortoiseGit command.

SccHelperService ( SccProviderService sccProvider ) : System

Initializes a new instance of the SccHelperService class.

WorkingDirectoryClean ( ) : bool

Gets the current working directory.

Method Details

BranchAheadOrBehind() public static method

Determines how many commits the from branch is ahead and/or behind the toBranch.
public static BranchAheadOrBehind ( string from, string to ) : AheadBehind
from string From branch.
to string To branch.
return GitScc.Blinkbox.Data.AheadBehind

CheckOutBranch() public method

Checks out a branch.
public CheckOutBranch ( string branch, bool createNew = false ) : void
branch string The branch.
createNew bool if set to true creates a new branch.
return void

DiffBranches() public static method

Diffs the two branches.
public static DiffBranches ( string from, string to ) : IEnumerable
from string From branch.
to string To branch.
return IEnumerable

DiffFileInTortoise() public method

Diffs the file.
public DiffFileInTortoise ( string fileName, string endRevision = null, string startRevision = null ) : void
fileName string Name of the file.
endRevision string To revision.
startRevision string From revision.
return void

DiffFileWithGit() public method

Diffs a file against the specified revision using git.
public DiffFileWithGit ( string fileName, string revision ) : string
fileName string Name of the file.
revision string The revision.
return string

GetAbsolutePath() public static method

Converts a relative path to an absolute path relative to the solution.
public static GetAbsolutePath ( string path ) : string
path string The path.
return string

GetCurrentBranch() public method

Gets the current branch clean of any operation status.
public GetCurrentBranch ( ) : string
return string

GetHeadRevisionHash() public method

Gets the latest revision for the specified branch (defaults to current branch).
public GetHeadRevisionHash ( string branchName = null ) : string
branchName string Name of the branch.
return string

GetLastCommitMessage() public method

Gets the last commit message.
public GetLastCommitMessage ( ) : string
return string

GetWorkingDirectory() public method

Gets the current working directory.
public GetWorkingDirectory ( ) : string
return string

IsMerging() public method

Determines whether this branch is merging.
public IsMerging ( ) : bool
return bool

ParseGitStatus() public method

Parses git status into a list of files.
public ParseGitStatus ( string status ) : IList
status string The status.
return IList

RunGitCommand() public static method

Runs a tortoiseGit command.
public static RunGitCommand ( string command, bool wait = false, bool silent = false ) : GitCommand
command string The command.
wait bool if set to true [wait].
silent bool if set to true output is not sent to the notification window.
return GitCommand

RunGitTfs() public static method

Runs a command in the git tfs commandline environment.
public static RunGitTfs ( string command, bool wait = false, bool silent = false ) : string
command string The command.
wait bool waits for the process to exit before continuing execution.
silent bool if set to true [silent].
return string

RunTortoise() public method

Runs a tortoiseGit command.
public RunTortoise ( string command ) : void
command string The command.
return void

SccHelperService() public method

Initializes a new instance of the SccHelperService class.
public SccHelperService ( SccProviderService sccProvider ) : System
sccProvider SccProviderService The SCC provider.
return System

WorkingDirectoryClean() public method

Gets the current working directory.
public WorkingDirectoryClean ( ) : bool
return bool