/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Adrian Wilkins
  • Date: 2008-08-04 15:05:15 UTC
  • mto: (3714.1.1 bzr.ab.integration)
  • mto: This revision was merged to the branch mainline in revision 3716.
  • Revision ID: adrian.wilkins@gmail.com-20080804150515-0kstr2dih843lzob
Tweaked as suggested to be more lightweight about opening branches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4482
4482
            to_branch = Branch.open(to_location)
4483
4483
        except errors.NotBranchError:
4484
4484
            this_branch = control_dir.open_branch()
 
4485
            this_url = this_branch.get_bound_location()
4485
4486
            # This might be a heavyweight checkout
4486
 
            if this_branch.get_bound_location() != None:
4487
 
                this_branch = Branch.open(this_branch.get_bound_location())
 
4487
            if this_url is None:
 
4488
                this_url = this_branch.base
4488
4489
            to_branch = Branch.open(
4489
 
                this_branch.base + '../' + to_location)
 
4490
                this_url + '../' + to_location)
4490
4491
        switch.switch(control_dir, to_branch, force)
4491
4492
        note('Switched to branch: %s',
4492
4493
            urlutils.unescape_for_display(to_branch.base, 'utf-8'))