l.c.p.w.PullerWorker : class documentation

Part of lp.codehosting.puller.worker View In Hierarchy

This class represents a single branch that needs mirroring.

It has a source URL, a destination URL, a database id, a unique name and a status client which is used to report on the mirror progress.

Method __init__ Construct a PullerWorker.
Method mirrorWithoutChecks Mirror the source branch to the destination branch.
Method mirror Open source and destination branches and pull source into
Method __eq__ Undocumented
Method __repr__ Undocumented
Method _checkerForBranchType Return a BranchMirrorer with an appropriate policy.
Method _record_oops Record an oops for the current exception.
Method _mirrorFailed Undocumented
def _checkerForBranchType(self, branch_type):
Return a BranchMirrorer with an appropriate policy.
Parametersbranch_typeA BranchType. The policy of the mirrorer will be based on this.
ReturnsA BranchMirrorer.
def __init__(self, src, dest, branch_id, unique_name, branch_type, default_stacked_on_url, protocol, branch_mirrorer=None):
Construct a PullerWorker.
ParameterssrcThe URL to pull from.
destThe URL to pull into.
branch_idThe database ID of the branch we're pulling.
unique_nameThe unique_name of the branch we're pulling (without the tilde).
branch_typeA member of the BranchType enum. It is expected that tests that do not depend on its value will pass None.
default_stacked_on_urlThe unique name of the default stacked-on branch for the product of the branch we are mirroring. None or '' if there is no such branch.
protocolAn instance of PullerWorkerProtocol.
branch_mirrorerAn instance of BranchMirrorer. If not passed, one will be chosen based on the value of branch_type.
def _record_oops(self, message=None):
Record an oops for the current exception.

This must only be called while handling an exception.

Parametersmessagecustom explanatory error message. Do not use str(exception) to fill in this parameter, it should only be set when a human readable error has been explicitly generated.
def _mirrorFailed(self, error):
Undocumented
def mirrorWithoutChecks(self):
Mirror the source branch to the destination branch.

This method doesn't do any error handling or send any messages via the reporting protocol -- a "naked mirror", if you will. This is particularly useful for tests that want to mirror a branch and be informed immediately of any errors.

Returns(branch, revid_before), where branch is the destination branch and revid_before was the tip revision before the mirroring process ran.
def mirror(self):
Open source and destination branches and pull source into destination.
def __eq__(self, other):
Undocumented
def __repr__(self):
Undocumented
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.