ToolChain.Git¶
Exceptions
GitException
: Base class for all tool specific exceptions
Classes
Configuration
: Base class for all tool Configuration classes.Git
: Undocumented.GitSCM
: Represent an executable.GitRevParse
: Represent an executable.GitRevList
: Represent an executable.GitDescribe
: Represent an executable.GitConfig
: Represent an executable.
-
exception
ToolChain.Git.
GitException
(message='')[source]¶ Inheritance
Members
-
__str__
()¶ Returns the exception’s message text.
-
args
¶
-
-
class
ToolChain.Git.
Configuration
(host)[source]¶ Inheritance
Members
-
_vendor
= 'Git SCM'¶ The name of the tools vendor.
-
_toolName
= 'Git'¶ The name of the tool.
-
_section
= 'INSTALL.Git'¶ The name of the configuration section. Pattern:
INSTALL.Vendor.ToolName
.
-
_template
= {'Windows': {'INSTALL.Git': {'Version': '2.8.2', 'BinaryDirectory': '${InstallationDirectory}/cmd', 'InstallationDirectory': 'C:/Program Files/Git'}}, 'Linux': {'INSTALL.Git': {'Version': '2.8.1', 'BinaryDirectory': '${InstallationDirectory}', 'InstallationDirectory': '/usr/bin'}}}¶ The template for the configuration sections represented as nested dictionaries.
-
CheckDependency
()[source]¶ Check if all vendor or tool dependencies are fulfilled to configure this tool.
-
ClearSection
(writeWarnings=False)[source]¶ Clear the configuration section associated to this Configuration class.
-
ConfigureForDarwin
()[source]¶ Start the configuration procedure for Darwin.
This method is a wrapper for
ConfigureForAll()
. Overwrite this method to implement a Darwin specific configuration routine.
-
ConfigureForLinux
()[source]¶ Start the configuration procedure for Linux.
This method is a wrapper for
ConfigureForAll()
. Overwrite this method to implement a Linux specific configuration routine.
-
ConfigureForWindows
()[source]¶ Start the configuration procedure for Windows.
This method is a wrapper for
ConfigureForAll()
. Overwrite this method to implement a Windows specific configuration routine.
-
Host
¶ Return the hosting object.
-
IsSupportedPlatform
()[source]¶ Return true if the given platform is supported by this configuration routine.
-
Log
(entry, condition=True)¶ Write an entry to the local logger.
-
LogDebug
(*args, condition=True, **kwargs)¶
-
LogDryRun
(*args, condition=True, **kwargs)¶
-
LogError
(*args, condition=True, **kwargs)¶
-
LogFatal
(*args, condition=True, **kwargs)¶
-
LogInfo
(*args, condition=True, **kwargs)¶
-
LogNormal
(*args, condition=True, **kwargs)¶
-
LogQuiet
(*args, condition=True, **kwargs)¶
-
LogVerbose
(*args, condition=True, **kwargs)¶
-
LogWarning
(*args, condition=True, **kwargs)¶
-
Logger
¶ Return the local logger instance.
-
PrepareVersionedSections
(writeWarnings=False)¶
-
SectionName
¶ Return the configuration’s section name.
-
State
¶ Return the configuration state.
-
_Ask
(question, default, beforeDefault='', afterDefault='', indent=1)¶
-
_AskYes_NoPass
(question, indent=1)¶ Ask a yes/NO/pass question.
-
_Ask_YesNoPass
(question, indent=1)¶ Ask a YES/no/pass question.
-
_Configuration__GetGitDirectory
()¶
-
_Configuration__InstallGitFilters
()¶
-
_Configuration__InstallGitHooks
()¶
-
_Configuration__IsUnderGitControl
()¶
-
_Configuration__UninstallGitFilters
()¶
-
_Configuration__UninstallGitHooks
()¶
-
_Configuration__WriteGitSection
(binPath)¶
-
_ConfigureBinaryDirectory
()¶ Updates section with value from
_template
and returns directory asPath
object.
-
_ConfigureEdition
(editions, defaultEdition)¶
-
_ConfigureInstallationDirectory
()[source]¶ Asks for installation directory and updates section. Checks if entered directory exists and returns Path object. If no installation directory was configured before, then _GetDefaultInstallationDir is called.
-
_ConfigureVersion
()¶ If no version was configured before, then _GetDefaultVersion is called. Asks for version and updates section. Returns version as string.
-
_GetDefaultEdition
()¶ Returns unresolved default edition (str) from template.
Overwrite this method in a sub-class for automatic search of editions.
-
_GetDefaultVersion
()¶ Returns unresolved default version (str) from template.
Overwrite this method in a sub-class for automatic search of version.
-
_PrintAvailableEditions
(editions, selectedEdition)¶ Print all available editions and return the selected index.
-
_TestDefaultInstallPath
(defaults)[source]¶ Helper function for automatic search of installation directory.
-
_TryLog
(*args, condition=True, **kwargs)¶
-
_multiVersionSupport
= False¶
-
-
class
ToolChain.Git.
Git
(platform, dryrun, binaryDirectoryPath, version, logger=None)[source]¶ Inheritance
Members
-
class
ToolChain.Git.
GitSCM
(toolchain: ToolChain.ToolMixIn)[source]¶ Inheritance
Members
-
GitSCM.
Parameters
= [<class 'ToolChain.Git.GitSCM.Executable'>, <class 'ToolChain.Git.GitSCM.Switch_Version'>]¶
-
GitSCM.
GetReader
()¶
-
GitSCM.
Log
(entry, condition=True)¶ Write an entry to the local logger.
-
GitSCM.
LogDebug
(*args, condition=True, **kwargs)¶
-
GitSCM.
LogDryRun
(*args, condition=True, **kwargs)¶
-
GitSCM.
LogError
(*args, condition=True, **kwargs)¶
-
GitSCM.
LogFatal
(*args, condition=True, **kwargs)¶
-
GitSCM.
LogInfo
(*args, condition=True, **kwargs)¶
-
GitSCM.
LogNormal
(*args, condition=True, **kwargs)¶
-
GitSCM.
LogQuiet
(*args, condition=True, **kwargs)¶
-
GitSCM.
LogVerbose
(*args, condition=True, **kwargs)¶
-
GitSCM.
LogWarning
(*args, condition=True, **kwargs)¶
-
GitSCM.
Logger
¶ Return the local logger instance.
-
GitSCM.
Path
¶
-
GitSCM.
ReadUntilBoundary
(indent=0)¶
-
GitSCM.
Send
(line, end='\n')¶
-
GitSCM.
SendBoundary
()¶
-
GitSCM.
StartProcess
(parameterList)¶
-
GitSCM.
Terminate
()¶
-
GitSCM.
_POC_BOUNDARY
= '====== POC BOUNDARY ======'¶
-
GitSCM.
_TryLog
(*args, condition=True, **kwargs)¶
-
-
class
ToolChain.Git.
GitRevParse
(toolchain: ToolChain.ToolMixIn)[source]¶ Inheritance
Members
-
GitRevParse.
RevParseParameters
= [<class 'ToolChain.Git.GitRevParse.Command'>, <class 'ToolChain.Git.GitRevParse.SwitchInsideWorkingTree'>, <class 'ToolChain.Git.GitRevParse.SwitchShowTopLevel'>, <class 'ToolChain.Git.GitRevParse.SwitchGitDir'>]¶
-
class
GitRevParse.
Executable
¶
-
GitRevParse.
GetReader
()¶
-
GitRevParse.
Log
(entry, condition=True)¶ Write an entry to the local logger.
-
GitRevParse.
LogDebug
(*args, condition=True, **kwargs)¶
-
GitRevParse.
LogDryRun
(*args, condition=True, **kwargs)¶
-
GitRevParse.
LogError
(*args, condition=True, **kwargs)¶
-
GitRevParse.
LogFatal
(*args, condition=True, **kwargs)¶
-
GitRevParse.
LogInfo
(*args, condition=True, **kwargs)¶
-
GitRevParse.
LogNormal
(*args, condition=True, **kwargs)¶
-
GitRevParse.
LogQuiet
(*args, condition=True, **kwargs)¶
-
GitRevParse.
LogVerbose
(*args, condition=True, **kwargs)¶
-
GitRevParse.
LogWarning
(*args, condition=True, **kwargs)¶
-
GitRevParse.
Logger
¶ Return the local logger instance.
-
GitRevParse.
Parameters
= [<class 'ToolChain.Git.GitSCM.Executable'>, <class 'ToolChain.Git.GitSCM.Switch_Version'>]¶
-
GitRevParse.
Path
¶
-
GitRevParse.
ReadUntilBoundary
(indent=0)¶
-
GitRevParse.
Send
(line, end='\n')¶
-
GitRevParse.
SendBoundary
()¶
-
GitRevParse.
StartProcess
(parameterList)¶
-
GitRevParse.
Terminate
()¶
-
GitRevParse.
_POC_BOUNDARY
= '====== POC BOUNDARY ======'¶
-
GitRevParse.
_TryLog
(*args, condition=True, **kwargs)¶
-
-
class
ToolChain.Git.
GitRevList
(toolchain: ToolChain.ToolMixIn)[source]¶ Inheritance
Members
-
GitRevList.
RevListParameters
= [<class 'ToolChain.Git.GitRevList.Command'>, <class 'ToolChain.Git.GitRevList.SwitchTags'>, <class 'ToolChain.Git.GitRevList.SwitchMaxCount'>]¶
-
class
GitRevList.
Executable
¶
-
GitRevList.
GetReader
()¶
-
GitRevList.
Log
(entry, condition=True)¶ Write an entry to the local logger.
-
GitRevList.
LogDebug
(*args, condition=True, **kwargs)¶
-
GitRevList.
LogDryRun
(*args, condition=True, **kwargs)¶
-
GitRevList.
LogError
(*args, condition=True, **kwargs)¶
-
GitRevList.
LogFatal
(*args, condition=True, **kwargs)¶
-
GitRevList.
LogInfo
(*args, condition=True, **kwargs)¶
-
GitRevList.
LogNormal
(*args, condition=True, **kwargs)¶
-
GitRevList.
LogQuiet
(*args, condition=True, **kwargs)¶
-
GitRevList.
LogVerbose
(*args, condition=True, **kwargs)¶
-
GitRevList.
LogWarning
(*args, condition=True, **kwargs)¶
-
GitRevList.
Logger
¶ Return the local logger instance.
-
GitRevList.
Parameters
= [<class 'ToolChain.Git.GitSCM.Executable'>, <class 'ToolChain.Git.GitSCM.Switch_Version'>]¶
-
GitRevList.
Path
¶
-
GitRevList.
ReadUntilBoundary
(indent=0)¶
-
GitRevList.
Send
(line, end='\n')¶
-
GitRevList.
SendBoundary
()¶
-
GitRevList.
StartProcess
(parameterList)¶
-
GitRevList.
Terminate
()¶
-
GitRevList.
_POC_BOUNDARY
= '====== POC BOUNDARY ======'¶
-
GitRevList.
_TryLog
(*args, condition=True, **kwargs)¶
-
-
class
ToolChain.Git.
GitDescribe
(toolchain: ToolChain.ToolMixIn)[source]¶ Inheritance
Members
-
GitDescribe.
DescribeParameters
= [<class 'ToolChain.Git.GitDescribe.Command'>, <class 'ToolChain.Git.GitDescribe.SwitchAbbrev'>, <class 'ToolChain.Git.GitDescribe.SwitchTags'>]¶
-
class
GitDescribe.
Executable
¶
-
GitDescribe.
GetReader
()¶
-
GitDescribe.
Log
(entry, condition=True)¶ Write an entry to the local logger.
-
GitDescribe.
LogDebug
(*args, condition=True, **kwargs)¶
-
GitDescribe.
LogDryRun
(*args, condition=True, **kwargs)¶
-
GitDescribe.
LogError
(*args, condition=True, **kwargs)¶
-
GitDescribe.
LogFatal
(*args, condition=True, **kwargs)¶
-
GitDescribe.
LogInfo
(*args, condition=True, **kwargs)¶
-
GitDescribe.
LogNormal
(*args, condition=True, **kwargs)¶
-
GitDescribe.
LogQuiet
(*args, condition=True, **kwargs)¶
-
GitDescribe.
LogVerbose
(*args, condition=True, **kwargs)¶
-
GitDescribe.
LogWarning
(*args, condition=True, **kwargs)¶
-
GitDescribe.
Logger
¶ Return the local logger instance.
-
GitDescribe.
Parameters
= [<class 'ToolChain.Git.GitSCM.Executable'>, <class 'ToolChain.Git.GitSCM.Switch_Version'>]¶
-
GitDescribe.
Path
¶
-
GitDescribe.
ReadUntilBoundary
(indent=0)¶
-
GitDescribe.
Send
(line, end='\n')¶
-
GitDescribe.
SendBoundary
()¶
-
GitDescribe.
StartProcess
(parameterList)¶
-
GitDescribe.
Terminate
()¶
-
GitDescribe.
_POC_BOUNDARY
= '====== POC BOUNDARY ======'¶
-
GitDescribe.
_TryLog
(*args, condition=True, **kwargs)¶
-
-
class
ToolChain.Git.
GitConfig
(toolchain: ToolChain.ToolMixIn)[source]¶ Inheritance
Members
-
GitConfig.
ConfigParameters
= [<class 'ToolChain.Git.GitConfig.Command'>, <class 'ToolChain.Git.GitConfig.SwitchUnset'>, <class 'ToolChain.Git.GitConfig.SwitchRemoveSection'>, <class 'ToolChain.Git.GitConfig.ValueFilterClean'>, <class 'ToolChain.Git.GitConfig.ValueFilterSmudge'>, <class 'ToolChain.Git.GitConfig.ValueFilterParameters'>]¶
-
class
GitConfig.
Executable
¶
-
GitConfig.
GetReader
()¶
-
GitConfig.
Log
(entry, condition=True)¶ Write an entry to the local logger.
-
GitConfig.
LogDebug
(*args, condition=True, **kwargs)¶
-
GitConfig.
LogDryRun
(*args, condition=True, **kwargs)¶
-
GitConfig.
LogError
(*args, condition=True, **kwargs)¶
-
GitConfig.
LogFatal
(*args, condition=True, **kwargs)¶
-
GitConfig.
LogInfo
(*args, condition=True, **kwargs)¶
-
GitConfig.
LogNormal
(*args, condition=True, **kwargs)¶
-
GitConfig.
LogQuiet
(*args, condition=True, **kwargs)¶
-
GitConfig.
LogVerbose
(*args, condition=True, **kwargs)¶
-
GitConfig.
LogWarning
(*args, condition=True, **kwargs)¶
-
GitConfig.
Logger
¶ Return the local logger instance.
-
GitConfig.
Parameters
= [<class 'ToolChain.Git.GitSCM.Executable'>, <class 'ToolChain.Git.GitSCM.Switch_Version'>]¶
-
GitConfig.
Path
¶
-
GitConfig.
ReadUntilBoundary
(indent=0)¶
-
GitConfig.
Send
(line, end='\n')¶
-
GitConfig.
SendBoundary
()¶
-
GitConfig.
StartProcess
(parameterList)¶
-
GitConfig.
Terminate
()¶
-
GitConfig.
_POC_BOUNDARY
= '====== POC BOUNDARY ======'¶
-
GitConfig.
_TryLog
(*args, condition=True, **kwargs)¶
-