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 should_follow_references See BranchOpenPolicy.should_follow_references.
Method transform_fallback_location See BranchOpenPolicy.transform_fallback_location.
Method check_one_url See BranchOpenPolicy.check_one_url.

Inherited from BranchMirrorerPolicy:

Method createDestinationBranch Create a destination branch for 'source_branch'.
def __init__(self, stacked_on_url=None):
Undocumented
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 should_follow_references(self):
See BranchOpenPolicy.should_follow_references.

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 transform_fallback_location(self, branch, url):
See BranchOpenPolicy.transform_fallback_location.

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

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

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

API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.