~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/switch.py

  • Committer: Marco Pantaleoni
  • Date: 2010-03-25 14:22:41 UTC
  • mto: This revision was merged to the branch mainline in revision 5174.
  • Revision ID: panta@elasticworld.org-20100325142241-vtl1hshva7uiz3ap
Applied suggestions from merge reviewer (John A Meinel):

- removed duplication of checks for presence of hooks.
- adapted to bazaar style guideline
- simplified test cases callback

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
    _set_branch_location(control_dir, to_branch, force)
48
48
    tree = control_dir.open_workingtree()
49
49
    _update(tree, source_repository, quiet, revision_id)
50
 
    if Branch.hooks['post_switch']:
51
 
        _run_post_switch_hooks(control_dir, to_branch, force, revision_id)
 
50
    _run_post_switch_hooks(control_dir, to_branch, force, revision_id)
52
51
 
53
52
def _check_pending_merges(control, force=False):
54
53
    """Check that there are no outstanding pending merges before switching.