l.c.p.w.MirroredBranchPolicy(BranchMirrorerPolicy) : class documentation

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

Mirroring policy for MIRRORED branches.

In summary:

Method __init__ Undocumented
Method getStackedOnURLForDestinationBranch Return the stacked on URL for the destination branch.
Method shouldFollowReferences See BranchOpenPolicy.shouldFollowReferences.
Method transformFallbackLocation See BranchOpenPolicy.transformFallbackLocation.
Method checkOneURL See BranchOpenPolicy.checkOneURL.

Inherited from BranchMirrorerPolicy:

Method createDestinationBranch Create a destination branch for 'source_branch'.
def __init__(self, stacked_on_url=None):
def getStackedOnURLForDestinationBranch(self, source_branch, destination_url):
Return the stacked on URL for the destination branch.

Mirrored branches are stacked on the default stacked-on branch of their product, except when we're mirroring the default stacked-on branch itself.

def shouldFollowReferences(self):
See BranchOpenPolicy.shouldFollowReferences.

We traverse branch references for MIRRORED branches because they provide a useful redirection mechanism and we want to be consistent with the bzr command line.

def transformFallbackLocation(self, branch, url):
See BranchOpenPolicy.transformFallbackLocation.

For mirrored branches, we stack on whatever the remote branch claims to stack on, but this URL still needs to be checked.

def checkOneURL(self, url):
See BranchOpenPolicy.checkOneURL.

We refuse to mirror from Launchpad or a ssh-like or file URL.

API Documentation for Launchpad, generated by pydoctor at 2018-05-24 00:00:11.