Part of lp.codehosting.puller.worker View In Hierarchy
Mirroring policy for IMPORTED branches.
In summary:
- don't follow references,
- assert the URLs start with the prefix we expect for imported branches.
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 . |
BranchOpenPolicy.createDestinationBranch
.
Because we control the process that creates import branches, a vfs-level copy is safe and more efficient than a bzr fetch.
BranchOpenerPolicy.should_follow_references
.
We do not traverse references for IMPORTED branches because the code-import system should never produce branch references.