Part of lp.code.interfaces.codehosting View In Hierarchy
Known implementations: lp.code.xmlrpc.codehosting.BranchPuller
Published at 'branch_puller' on the private XML-RPC server.
Method | acquireBranchToPull | Return a Branch to pull and mark it as mirror-started. |
Method | startMirroring | Notify Launchpad that the given branch has started mirroring. |
Method | mirrorComplete | Notify Launchpad that the branch has been successfully mirrored. |
Method | mirrorFailed | Notify Launchpad that the branch could not be mirrored. |
Method | recordSuccess | Notify Launchpad that a mirror script has successfully completed. |
Method | setStackedOn | Mark a branch as being stacked on another branch. |
Parameters | branch_type_names | Only consider branches of these type names. An empty list means consider HOSTED, MIRRORED and IMPORTED branches. |
Returns | A 5-tuple:
(branch_id, pull_url, unique_name, default_branch, branch_type) where:
or (), the empty tuple, if there is no branch to pull. |
The last_mirror_attempt field of the given branch record will be updated appropriately.
Parameters | branchID | The database ID of the given branch. |
Returns | True if the branch status was successfully updated.
NoBranchWithID fault if there's no branch with the given id. |
In the Launchpad database, the last_mirrored field will be updated to match the last_mirror_attempt value, the mirror_failures counter will be reset to zero and the next_mirror_time will be set to NULL.
Parameters | branchID | The database ID of the given branch. |
lastRevisionID | The last revision ID mirrored. | |
Returns | True if the branch status was successfully updated.
NoBranchWithID fault if there's no branch with the given id. |
The mirror_failures counter for the given branch record will be incremented and the next_mirror_time will be set to NULL.
Parameters | branchID | The database ID of the given branch. |
reason | A string giving the reason for the failure. | |
Returns | True if the branch status was successfully updated.
NoBranchWithID fault if there's no branch with the given id. |
Create an entry in the ScriptActivity table with the provided data.
Parameters | name | Name of the script. |
hostname | Where the script was running. | |
date_started | When the script started, as an UTC time tuple. | |
date_completed | When the script completed (now), as an UTC time tuple. | |
Returns | True if the ScriptActivity record was successfully inserted. |
Parameters | branch_id | The database ID of the stacked branch. |
stacked_on_location | The location of the stacked-on branch. For hosted branches, this is normally '/~foo/bar/baz' where '~foo/bar/baz' is the unique name of another branch. | |
Returns | True if the stacked branch information was set successfully.
NoBranchWithID fault if there's no branch with the given id.
NoSuchBranch fault if there's no branch matching
'stacked_on_location'. |