b.b.cmd_remove_branch(Command) : class documentation

Part of bzrlib.builtins View In Hierarchy

Undocumented
Method run Actually run the command.

Inherited from Command:

Method __init__ Construct an instance of this command.
Method add_cleanup Register a function to call after self.run returns or raises.
Method cleanup_now Execute and empty pending cleanup functions immediately.
Method get_help_text Return a text string with help for this command.
Method get_help_topic Return the commands help topic - its name.
Method get_see_also Return a list of help topics that are related to this command.
Method options Return dict of valid options for this command.
Method run_argv_aliases Parse the command line and run with extra aliases in alias_argv.
Method help Return help message for this class.
Method gettext Returns the gettext function used to translate this command's help.
Method name Return the canonical name for this command.
Method plugin_name Get the name of the plugin that provides this command.
Method _usage Return single-line grammar for this command.
Static Method _get_help_parts Split help text into a summary and named sections.
Method _setup_outf Return a file linked to stdout, which has proper encoding.
Method _setup_run Wrap the defined run method on self with a cleanup.
def run(self, location=None):

Actually run the command.

This is invoked with the options and arguments bound to keyword parameters.

Return 0 or None if the command was successful, or a non-zero shell error code if not. It's OK for this method to allow an exception to raise up.

This method is automatically wrapped by Command.__init__ with a cleanup operation, stored as self._operation. This can be used via self.add_cleanup to perform automatic cleanups at the end of run().

The argument for run are assembled by introspection. So for instance, if your command takes an argument files, you would declare:

def run(self, files=None):
    pass
API Documentation for Bazaar, generated by pydoctor at 2022-06-16 00:25:16.