b.b.RepositoryAcquisitionPolicy(object) : class documentation

Part of bzrlib.bzrdir View In Hierarchy

Known subclasses: bzrlib.bzrdir.CreateRepository, bzrlib.bzrdir.UseExistingRepository

Abstract base class for repository acquisition policies.

A repository acquisition policy decides how a BzrDir acquires a repository for a branch that is being created. The most basic policy decision is whether to create a new repository or use an existing one.

Method __init__ Constructor.
Method configure_branch Apply any configuration data from this policy to the branch.
Method requires_stacking Return True if this policy requires stacking.
Method acquire_repository Acquire a repository for this bzrdir.
Method _get_full_stack_on Get a fully-qualified URL for the stack_on location.
Method _add_fallback Add a fallback to the supplied repository, if stacking is set.
def __init__(self, stack_on, stack_on_pwd, require_stacking):
Constructor.
Parametersstack_onA location to stack on
stack_on_pwdIf stack_on is relative, the location it is relative to.
require_stackingIf True, it is a failure to not stack.
def configure_branch(self, branch):
Apply any configuration data from this policy to the branch.

Default implementation sets repository stacking.

def requires_stacking(self):
Return True if this policy requires stacking.
def _get_full_stack_on(self):
Get a fully-qualified URL for the stack_on location.
def _add_fallback(self, repository, possible_transports=None):
Add a fallback to the supplied repository, if stacking is set.
def acquire_repository(self, make_working_trees=None, shared=False):
Acquire a repository for this bzrdir.

Implementations may create a new repository or use a pre-exising repository.

Parametersmake_working_treesIf creating a repository, set make_working_trees to this value (if non-None)
sharedIf creating a repository, make it shared if True
ReturnsA repository, is_new_flag (True if the repository was created).
API Documentation for Bazaar, generated by pydoctor at 2019-10-16 00:36:43.