rbtools.utils.commands¶
Utilities for commands.
Module Attributes
The format string used to specify a URL to a review request in commits. |
Functions
|
Generates a list of command line arguments from parsed command options. |
|
Returns a commit message based on the review request. |
|
Amend the tip revision message to include review_request_url. |
Exceptions
An error indicating the change has already been stamped. |
- rbtools.utils.commands.STAMP_STRING_FORMAT = 'Reviewed at %s'[source]¶
The format string used to specify a URL to a review request in commits.
Commands that prepare a commit message for pushing, such as rbt stamp, rbt patch, and rbt land, must use this format to indicate the URL to the matching review request. Review Board will parse the commit messages when executing any post-receive hooks, looking for this string and a valid URL.
- exception rbtools.utils.commands.AlreadyStampedError[source]¶
Bases:
Exception
An error indicating the change has already been stamped.
- rbtools.utils.commands.extract_commit_message(review_request)[source]¶
Returns a commit message based on the review request.
The commit message returned contains the Summary, Description, Bugs, and Testing Done fields from the review request, if available.
- rbtools.utils.commands.build_rbtools_cmd_argv(options, options_map={'api_token': '--api-token', 'debug': '--debug', 'disable_ssl_verification': '--disable-ssl-verification', 'enable_proxy': '--disable-proxy', 'password': '--password', 'repository_name': '--repository', 'repository_type': '--repository-type', 'repository_url': '--repository-url', 'server': '--server', 'username': '--username'})[source]¶
Generates a list of command line arguments from parsed command options.
Used for building command line arguments from existing options, when calling another RBTools command.
options_map
specifies the options and their corresponding argument names that need to be included.