stestr init Command¶
Initialise a new repository.
-
class
stestr.commands.init.
Init
(app, app_args, cmd_name=None)[source]¶ -
get_description
()[source]¶ Return the command description.
The default is to use the first line of the class’ docstring as the description. Set the
_description
class attribute to a one-line description of a command to use a different value. This is useful for enabling translations, for example, with_description
set to a string wrapped with a gettext translation marker.
-
-
stestr.commands.init.
init
(repo_type='file', repo_url=None, stdout=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>)[source]¶ Initialize a new repository
This function will create initialize a new repostiory if one does not exist. If one exists the command will fail.
Note this function depends on the cwd for the repository if repo_type is set to file and repo_url is not specified it will use the repository located at CWD/.stestr
Parameters: - repo_type (str) – This is the type of repository to use. Valid choices are ‘file’ and ‘sql’.
- repo_url (str) – The url of the repository to use.
Return return_code: The exit code for the command. 0 for success and > 0 for failures.
Return type: int