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

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

Mirroring policy for IMPORTED branches.

In summary:

Method createDestinationBranch See BranchOpenPolicy.createDestinationBranch.
Method should_follow_references See BranchOpenerPolicy.should_follow_references.
Method transform_fallback_location See BranchOpenerPolicy.transform_fallback_location.
Method check_one_url See BranchOpenerPolicy.check_one_url.

Inherited from BranchMirrorerPolicy:

Method getStackedOnURLForDestinationBranch Get the stacked on URL for source_branch.
def createDestinationBranch(self, source_branch, destination_url):
See BranchOpenPolicy.createDestinationBranch.

Because we control the process that creates import branches, a vfs-level copy is safe and more efficient than a bzr fetch.

def should_follow_references(self):
See BranchOpenerPolicy.should_follow_references.

We do not traverse references for IMPORTED branches because the code-import system should never produce branch references.

def transform_fallback_location(self, branch, url):
See BranchOpenerPolicy.transform_fallback_location.

Import branches should not be stacked, ever.

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

If the URL we are mirroring from does not start how we expect the pull URLs of import branches to start, something has gone badly wrong, so we raise AssertionError if that's happened.

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