l.c.c.w.CodeImportBranchOpenPolicy(BranchOpenPolicy) : class documentation

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

Branch open policy for code imports.

In summary:
  • follow references,
  • only open non-Launchpad URLs for imports from Bazaar to Bazaar or from Git to Git
  • only open the allowed schemes
Method __init__ Undocumented
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.
def __init__(self, rcstype, target_rcstype):
Undocumented
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 Bazaar branches from Launchpad, or any branches from a ssh-like or file URL.

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