b.a.AddFromBaseAction(AddAction) : class documentation

Part of bzrlib.add View In Hierarchy

This class will try to extract file ids from another tree.
Method __init__ Initialize an action which prints added files to an output stream.
Method __call__ Add path to inventory.
Method _get_base_file_id Look for a file id in the base branch.

Inherited from AddAction:

Method skip_file Test whether the given file should be skipped or not.
def __init__(self, base_tree, base_path, to_file=None, should_print=None):
Initialize an action which prints added files to an output stream.
Parametersto_fileThe stream to write into. This is expected to take Unicode paths. If not supplied, it will default to sys.stdout.
should_printIf False, printing will be suppressed.
def __call__(self, inv, parent_ie, path, kind):
Add path to inventory.

The default action does nothing.

ParametersinvThe inventory we are working with.
pathThe FastPath being added
kindThe kind of the object being added.
def _get_base_file_id(self, path, parent_ie):
Look for a file id in the base branch.

First, if the base tree has the parent directory, we look for a file with the same name in that directory. Else, we look for an entry in the base tree with the same path.

API Documentation for Bazaar, generated by pydoctor at 2022-06-16 00:25:16.