b.b.GenericInterBranch(InterBranch) : class documentation

Part of bzrlib.branch View In Hierarchy

Known subclasses: bzrlib.tests.test_foreign.InterToDummyVcsBranch

InterBranch implementation that uses public Branch functions.
Class Method is_compatible Undocumented
Class Method unwrap_format Undocumented
Method copy_content_into Copy the content of source into target
Method fetch Fetch revisions.
Method pull Pull from source into self, updating my master if any.
Method push See InterBranch.push.
Class Method _get_branch_formats_to_test Return an iterable of format tuples for testing.
Method _update_revisions Undocumented
Method _basic_push Basic implementation of push without bound branches or hooks.
Method _push_with_bound_branches Push from source into target, and into target's master if any.
Method _pull See Branch.pull.

Inherited from InterObject (via InterBranch):

Method __init__ Construct a default InterObject instance. Please use 'get'.
Class Method get Retrieve a Inter worker object for these objects.
Method lock_read Take out a logical read lock.
Method lock_write Take out a logical write lock.
Class Method register_optimiser Register an InterObject optimiser.
Method unlock Release the locks on source and target.
Class Method unregister_optimiser Unregister an InterObject optimiser.
Method _double_lock Take out two locks, rolling back the first if the second throws.
@classmethod
def is_compatible(klass, source, target):
Undocumented
@classmethod
def _get_branch_formats_to_test(klass):
Return an iterable of format tuples for testing.
ReturnsAn iterable of (from_format, to_format) to use when testing this InterBranch class. Each InterBranch class should define this method itself.
@classmethod
def unwrap_format(klass, format):
Undocumented
@needs_write_lock
def copy_content_into(self, revision_id=None):

Copy the content of source into target

revision_id: if not None, the revision history in the new branch will
be truncated to end with revision_id.
@needs_write_lock
def fetch(self, stop_revision=None, limit=None):
Fetch revisions.
Parametersstop_revisionLast revision to fetch
limitOptional rough limit of revisions to fetch
@needs_write_lock
def _update_revisions(self, stop_revision=None, overwrite=False, graph=None):
Undocumented
@needs_write_lock
def pull(self, overwrite=False, stop_revision=None, possible_transports=None, run_hooks=True, _override_hook_target=None, local=False):
Pull from source into self, updating my master if any.
Parametersrun_hooksPrivate parameter - if false, this branch is being called because it's the master of the primary branch, so it should not run its hooks.
def push(self, overwrite=False, stop_revision=None, lossy=False, _override_hook_source_branch=None):
See InterBranch.push.

This is the basic concrete implementation of push()

Parameters_override_hook_source_branchIf specified, run the hooks passing this Branch as the source, rather than self. This is for use of RemoteBranch, where push is delegated to the underlying vfs-based Branch.
def _basic_push(self, overwrite, stop_revision):
Basic implementation of push without bound branches or hooks.

Must be called with source read locked and target write locked.

def _push_with_bound_branches(self, operation, overwrite, stop_revision, _override_hook_source_branch=None):
Push from source into target, and into target's master if any.
def _pull(self, overwrite=False, stop_revision=None, possible_transports=None, _hook_master=None, run_hooks=True, _override_hook_target=None, local=False, merge_tags_to_master=True):
See Branch.pull.

This function is the core worker, used by GenericInterBranch.pull to avoid duplication when pulling source->master and source->local.

Parameters_hook_masterPrivate parameter - set the branch to be supplied as the master to pull hooks.
run_hooksPrivate parameter - if false, this branch is being called because it's the master of the primary branch, so it should not run its hooks. is being called because it's the master of the primary branch, so it should not run its hooks.
_override_hook_targetPrivate parameter - set the branch to be supplied as the target_branch to pull hooks.
localOnly update the local branch, and not the bound branch.
API Documentation for Bazaar, generated by pydoctor at 2022-06-16 00:25:16.