l.c.u.Upgrader : class documentation

Part of lp.codehosting.upgrade View In Hierarchy

Upgrades branches to 2a-based formats if possible.
Method __init__ Undocumented
Method get_bzrdir Return the target_subdir bzrdir.
Method get_target_format Return the format to upgrade a branch to.
Class Method iter_upgraders Iterate through Upgraders given a target and logger.
Class Method start_all_upgrades Upgrade listed branches to a target directory.
Class Method finish_all_upgrades Upgrade listed branches to a target directory.
Method finish_upgrade Create an upgraded version of self.branch in self.target_dir.
Method add_upgraded_branch Add an upgraded branch to the target_subdir.
Method start_upgrade Do the slow part of the upgrade process.
Method create_upgraded_repository Create a repository in an upgraded format.
Method swap_in Swap the upgraded branch into place.
Method has_tree_references Determine whether the repository contains tree references.
Method mirror_branch Mirror the actual branch from a bzr_branch to a target bzrdir.
def __init__(self, branch, target_dir, logger, bzr_branch=None):
Undocumented
def get_bzrdir(self):
Return the target_subdir bzrdir.
def get_target_format(self):
Return the format to upgrade a branch to.

The repository format is always upgraded to a 2a format, but the branch format is left alone if the branch is a loom. :param branch: The bzr branch to upgrade :return: A Metadir format instance.

@classmethod
def iter_upgraders(cls, target_dir, logger):
Iterate through Upgraders given a target and logger.
@classmethod
def start_all_upgrades(cls, target_dir, logger):
Upgrade listed branches to a target directory.
ParametersbranchesThe Launchpad Branches to upgrade.
target_dirThe directory to store upgraded versions in.
@classmethod
def finish_all_upgrades(cls, target_dir, logger):
Upgrade listed branches to a target directory.
ParametersbranchesThe Launchpad Branches to upgrade.
target_dirThe directory to store upgraded versions in.
def finish_upgrade(self):
Create an upgraded version of self.branch in self.target_dir.
def add_upgraded_branch(self):
Add an upgraded branch to the target_subdir.

self.branch's branch (but not repository) is mirrored to the BzrDir and then the bzrdir is upgraded in the normal way.

def start_upgrade(self):
Do the slow part of the upgrade process.
def create_upgraded_repository(self):
Create a repository in an upgraded format.
Parametersupgrade_dirThe directory to create the repository in.
ReturnsThe created repository.
def swap_in(self):
Swap the upgraded branch into place.
def has_tree_references(self):
Determine whether the repository contains tree references.
ReturnsTrue if it contains tree references, False otherwise.
def mirror_branch(self, bzr_branch, target_bd):
Mirror the actual branch from a bzr_branch to a target bzrdir.
API Documentation for Launchpad, generated by pydoctor at 2020-11-28 00:00:02.