return renames
-def upgrade_branch(branch, foreign_repository, new_mapping=None,
- allow_changes=False, verbose=False):
+def upgrade_branch(branch, foreign_repository, new_mapping,
+ mapping_registry, allow_changes=False, verbose=False):
"""Upgrade a branch to the current mapping version.
:param branch: Branch to upgrade.
revid = branch.last_revision()
renames = upgrade_repository(branch.repository, foreign_repository,
revision_id=revid, new_mapping=new_mapping,
+ mapping_registry=mapping_registry,
allow_changes=allow_changes, verbose=verbose)
if len(renames) > 0:
branch.generate_revision_history(renames[revid])