l.c.p.worker : module documentation

Part of lp.codehosting.puller

No module docstring
Class BadUrlSsh Tried to access a branch from sftp or bzr+ssh.
Class BadUrlLaunchpad Tried to access a branch from launchpad.net.
Class BadUrlScheme Found a URL with an untrusted scheme.
Function get_canonical_url_for_branch_name Custom implementation of canonical_url(branch) for error reporting.
Class PullerWorkerProtocol The protocol used to communicate with the puller scheduler.
Class BranchMirrorerPolicy The policy for what branches to open and how to stack them.
Class BranchMirrorer A BranchMirrorer safely makes mirrors of branches.
Class PullerWorker This class represents a single branch that needs mirroring.
Class PullerWorkerUIFactory An UIFactory that always says yes to breaking locks.
Function install_worker_ui_factory Install a special UIFactory for puller workers.
Class MirroredBranchPolicy Mirroring policy for MIRRORED branches.
Class ImportedBranchPolicy Mirroring policy for IMPORTED branches.
Function make_branch_mirrorer Create a BranchMirrorer with the appropriate BranchOpenerPolicy.
def get_canonical_url_for_branch_name(unique_name):
Custom implementation of canonical_url(branch) for error reporting.

The actual canonical_url function cannot be used because we do not have access to real content objects.

def install_worker_ui_factory(puller_worker_protocol):

Install a special UIFactory for puller workers.

Our factory does two things:

  1. Create progress bars that inform a PullerWorkerProtocol of progress.
  2. Break locks if and only if they appear to be stale locks created by another puller worker process.
def make_branch_mirrorer(branch_type, protocol=None, mirror_stacked_on_url=None):
Create a BranchMirrorer with the appropriate BranchOpenerPolicy.
Parametersbranch_typeA BranchType to select a policy by.
protocolOptional protocol for the mirrorer to work with. If given, its log will also be used.
mirror_stacked_on_urlFor mirrored branches, the default URL to stack on. Ignored for other branch types.
ReturnsA BranchMirrorer.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.