Bases: repobuddy.utils.RepoBuddyBaseException
Exception raised by ClientInfo.
Bases: object
Parses/Stores/Retrieves the client configuration.
Initializer.
Parameters: | config_file_name (str) – The name of the config file. If config_file_name is set to None, the configuration is just stored in-memory until write() is invoked. Instead if config_file_name is specified, the config file is opened, parsed and the instance represents the state of the config file. |
---|---|
Raises : | ClientInfoError when config_file_name is not None and any of the following conditions are met:
|
Set the client_spec in the config.
Parameters: | client_spec_name (str) – The value for client_spec in the config. |
---|---|
Returns: | None |
Raises : | ClientInfoError if the config does not already have the RepoBuddyClientInfo section. |
Set the manifest in the config.
Parameters: | manifest_xml (str) – The value for manifest in the config. |
---|---|
Returns: | None |
Raises : | ClientInfoError if the config does not have the RepoBuddyClientInfo section. |
Get the value of client_spec in the config.
Returns: | The value of client_spec in the config. |
---|---|
Return type: | str |
Raises : | ClientInfoError if the config does not have the client_spec option. |
Get the value of manifest in the config.
Returns: | The value of manifest in the config. |
---|---|
Return type: | str |
Raises : | ClientInfoError if the config does not have the manifest option. |
Write the config to a file.
If file_name is set to None, the filename passed during the class initialization is used instead. If there was a file name specified during both initialization, as well as in the parameter file_name, this method’s parameter takes precedece, and the file name specififed during initialization remains unmodified.
Parameters: | file_name (str) – The name of the file to write the config into. |
---|---|
Returns: | None |
Raises : | ClientInfoError when any of the following conditions are met:
|
Bases: repobuddy.utils.RepoBuddyBaseException
Exception raised by ArgParser.
Variables: | exit_prog_without_error – Set to True if ArgParser completed parsing the command line arguments without any errors, otherwise False. |
---|
Bases: object
Parses command line arguments for repobuddy.
Initializer.
Parameters: | handlers (dict) – A dictionary with command names as keys and the handler functions as values. |
---|---|
Returns: | None |
Parse the command line arguments to repobuddy.
Parameters: | args (list of strings) – List of command line arguments. |
---|---|
Returns: | None |
Raises : | ArgParserError on parsing errors. |
Bases: repobuddy.utils.RepoBuddyBaseException
Exception raised by CommandHandler.
Bases: object
Provides handlers for the repobuddy commands.
Get the command handlers.
Returns: | Dictionary with command names as keys and the methods as values. |
---|---|
Return type: | dict |
Handler for the init command.
Returns: | None |
---|---|
Raises : | CommandHandlerError on errors. |
Handler for the status command.
Returns: | None |
---|---|
Raises : | CommandHandlerError on errors. |
Bases: repobuddy.utils.RepoBuddyBaseException
Exception raised by GitWrapper.
Variables: | is_git_error – Set to True if GitWrapper got back a non-zero status after executing of any of the git commands, otherwise False. |
---|
Bases: object
Helper for invoking git.
Provides a way to access and/or control the state of a git repository. Internally, it executes git commands in the work-tree for various operations.
Initializer.
Parameters: | base_dir (str) – Absolute path of the git repository work-tree. |
---|---|
Returns: | None |
Raises : | GitWrapperError if base_dir is not an absolute path. |
Clone a repo.
Executes git clone -b branch remote_url dest_dir. At the end of the clone operation, the working directory is changed to dest_dir.
Parameters: | |
---|---|
Dest_dir : | Destination path to store the cloned repository. |
Returns: | None |
Raises : | GitWrapperError if the git clone command fails. |
Refresh the index.
Executes git update-index -q --ignore-submodules --refresh.
Returns: | None |
---|---|
Raises : | GitWrapperError if the git update-index command fails. |
Get a list of all untracked files in the repository.
Returns the files in git ls-files --exclude-standard --others -- as a list.
Returns: | List of untracked files. |
---|---|
Return type: | list of str |
Raises : | GitWrapperError if the git ls-files command fails. |
Get a list of all unstaged files in the repository.
Returns the files in git diff-files --name-status -r --ignore-submodules -- as a list.
Returns: | List of unstaged files. |
---|---|
Return type: | list of str |
Raises : | GitWrapperError if the git diff-files command fails. |
Get a list of all uncommitted but staged files.
Returns the files in git diff-index --cached --name-status -r --ignore-submodules.
Returns: | List of uncommitted files in the staging area. |
---|---|
Return type: | list of str |
Raises : | GitWrapperError if the git diff-index command fails. |
Get the currently checked out branch.
Returns: | Currently checked out Branch name if HEAD points to a branch, otherwise None |
---|---|
Return type: | str |
Raises : | GitWrapperError on errors. |
Get the currently checked out tag.
Returns: | The tag name which is currently checked out, None otherwise. If the commit pointed by HEAD contains more than one tag, the returned tag name could be any one of those tags. |
---|---|
Return type: | str |
Raises : | GitWrapperError on errors. |
Bases: repobuddy.utils.RepoBuddyBaseException
Exception raised by HelpStrings.
Definition of various strings used by the rest of repobuddy.
Bases: repobuddy.utils.RepoBuddyBaseException
Exception raised by ManifestParser.
Bases: repobuddy.utils.EqualityBase
Represents the Repository in the manifest.
Bases: repobuddy.utils.EqualityBase
Represents the Client Spec in the manifest.
Bases: repobuddy.utils.EqualityBase
Represents the manifest.
Initializer.
Parameters: |
|
---|