Part of lp.codehosting.puller.worker View In Hierarchy
It has a source URL, a destination URL, a database id, a unique name and a status client which is used to report on the mirror progress.
| Method | __init__ | Construct a PullerWorker. |
| Method | mirrorWithoutChecks | Mirror the source branch to the destination branch. |
| Method | mirror | Open source and destination branches and pull source into |
| Method | __eq__ | Undocumented |
| Method | __repr__ | Undocumented |
| Method | _checkerForBranchType | Return a BranchMirrorer with an appropriate policy. |
| Method | _record_oops | Record an oops for the current exception. |
| Method | _mirrorFailed | Undocumented |
BranchMirrorer with an appropriate policy.| Parameters | branch_type | A BranchType. The policy of the mirrorer will
be based on this. |
| Returns | A BranchMirrorer. | |
PullerWorker.| Parameters | src | The URL to pull from. |
| dest | The URL to pull into. | |
| branch_id | The database ID of the branch we're pulling. | |
| unique_name | The unique_name of the branch we're pulling (without the tilde). | |
| branch_type | A member of the BranchType enum. It is expected that tests that do not depend on its value will pass None. | |
| default_stacked_on_url | The unique name of the default stacked-on branch for the product of the branch we are mirroring. None or '' if there is no such branch. | |
| protocol | An instance of PullerWorkerProtocol. | |
| branch_mirrorer | An instance of BranchMirrorer. If not
passed, one will be chosen based on the value of branch_type. |
This must only be called while handling an exception.
| Parameters | message | custom explanatory error message. Do not use str(exception) to fill in this parameter, it should only be set when a human readable error has been explicitly generated. |
This method doesn't do any error handling or send any messages via the reporting protocol -- a "naked mirror", if you will. This is particularly useful for tests that want to mirror a branch and be informed immediately of any errors.
| Returns | (branch, revid_before), where branch is the destination branch and revid_before was the tip revision before the mirroring process ran. | |