Part of lp.codehosting.branchdistro View In Hierarchy
makeNewBranches
will create an official package branch in the new series
for every one in the old. checkNewBranches
will check that a previous
run of this script completed successfully -- this is only likely to be
really useful if a script run died halfway through or had to be killed.
Method | __init__ | Construct a DistroBrancher . |
Class Method | fromNames | Make a DistroBrancher from the names of a distro and two series. |
Method | checkConsistentOfficialPackageBranch | Check that db_branch is a consistent official package branch. |
Method | makeNewBranches | Make official branches in the new distroseries. |
Method | checkNewBranches | Check the branches in the new distroseries are present and correct. |
Method | checkOneBranch | Check a branch in the old distroseries has been copied to the new. |
Method | makeOneNewBranch | Copy a branch to the new distroseries. |
Method | _existingOfficialBranches | Return the collection of official branches in the old distroseries. |
DistroBrancher
.
The old and new distroseries must be from the same distribution, but not the same distroseries.
Parameters | logger | A Logger. Problems will be logged to this object at the WARNING level or higher; progress reports will be logged at the DEBUG level. |
old_distroseries | The distroseries that will be examined to find existing source package branches. | |
new_distroseries | The distroseries that will have new official source branches made for it. |
DistroBrancher
from the names of a distro and two series.db_branch
is a consistent official package branch.
'Consistent official package branch' means:
- It's a package branch (rather than a personal or junk branch).
- It's official for its SourcePackage and no other.
This function simply returns True or False -- any problems will be logged to self.logger.
Parameters | db_branch | The IBranch to check. |
Returns | True if the branch is a consistent official package branch, False otherwise. |
This function checks that every official package branch in the old distroseries has a matching branch in the new distroseries and that stacking is set up as we expect on disk.
Every branch will be checked, even if some fail.
This function simply returns True or False -- any problems will be logged to self.logger.
Returns | True if every branch passes the check, False otherwise. |
This function checks that old_db_branch
has a matching branch in the
new distroseries and that stacking is set up as we expect on disk.
This function simply returns True or False -- any problems will be logged to self.logger.
Parameters | old_db_branch | The branch to check. |
Returns | True if the branch passes the check, False otherwise. |
This function makes a new database branch for the same source package
as old_db_branch but in the new distroseries and then uses
switch_branches
to move the underlying bzr branch to the new series
and replace the old branch with a branch stacked on the new series'
branch.
Parameters | old_db_branch | The branch to copy into the new distroseries. |
Raises | BranchExists | This will be raised if old_db_branch has already been copied to the new distroseries (in the database, at least). |