45
45
source_repository = control_dir.open_branch().repository
46
46
except errors.NotBranchError:
47
47
source_repository = to_branch.repository
49
53
tree = control_dir.open_workingtree()
50
54
_update(tree, source_repository, quiet, revision_id)
51
55
_run_post_switch_hooks(control_dir, to_branch, force, revision_id)