b.b.cmd_merge(Command) : class documentation

Part of bzrlib.builtins View In Hierarchy

No class docstring
Method run Actually run the command.
Method sanity_check_merger Undocumented
Method get_merger_from_uncommitted Get a merger for uncommitted changes.
Method _get_preview Undocumented
Method _do_preview Undocumented
Method _do_merge Undocumented
Method _do_interactive Perform an interactive merge.
Method _get_merger_from_branch Produce a merger from a location, assuming it refers to a branch.
Method _select_branch_location Select a branch location, according to possible inputs.
Method _get_remembered Use tree.branch's parent if none was supplied.

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, revision=None, force=False, merge_type=None, show_base=False, reprocess=None, remember=None, uncommitted=False, pull=False, directory=None, preview=False, interactive=False):

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
def _get_preview(self, merger):
Undocumented
def _do_preview(self, merger):
Undocumented
def _do_merge(self, merger, change_reporter, allow_pending, verified):
Undocumented
def _do_interactive(self, merger):
Perform an interactive merge.

This works by generating a preview tree of the merge, then using Shelver to selectively remove the differences between the working tree and the preview tree.

def sanity_check_merger(self, merger):
Undocumented
def _get_merger_from_branch(self, tree, location, revision, remember, possible_transports, pb):
Produce a merger from a location, assuming it refers to a branch.
def get_merger_from_uncommitted(self, tree, location, pb):
Get a merger for uncommitted changes.
ParameterstreeThe tree the merger should apply to.
locationThe location containing uncommitted changes.
pbThe progress bar to use for showing progress.
def _select_branch_location(self, tree, user_location, revision=None, index=None):
Select a branch location, according to possible inputs.

If provided, branches from revision are preferred. (Both revision and index must be supplied.)

Otherwise, the location parameter is used. If it is None, then the submit or parent location is used, and a note is printed.

ParameterstreeThe working tree to select a branch for merging into
locationThe location entered by the user
revisionThe revision parameter to the command
indexThe index to use for the revision parameter. Negative indices are permitted.
Returns(selected_location, user_location). The default location will be the user-entered location.
def _get_remembered(self, tree, verb_string):
Use tree.branch's parent if none was supplied.

Report if the remembered location was used.

API Documentation for Bazaar, generated by pydoctor at 2019-10-20 00:34:54.