36
46
source_repository = to_branch.repository
37
47
_set_branch_location(control_dir, to_branch, force)
38
48
tree = control_dir.open_workingtree()
49
_update(tree, source_repository, quiet, revision_id)
50
_run_post_switch_hooks(control_dir, to_branch, force, revision_id)
42
52
def _check_pending_merges(control, force=False):
43
53
"""Check that there are no outstanding pending merges before switching.