~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Robert Collins
  • Date: 2005-10-11 03:27:29 UTC
  • Revision ID: robertc@robertcollins.net-20051011032729-a0ba11dfb9bee3a3
tests passing is a good idea - move the branch open in cmd_branch to ensure this, and remove noise from the test suite

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
import bzrlib.trace
23
23
from bzrlib.trace import mutter, note, log_error, warning
24
24
from bzrlib.errors import BzrError, BzrCheckError, BzrCommandError, NotBranchError
 
25
from bzrlib.errors import DivergedBranches
25
26
from bzrlib.branch import Branch
26
27
from bzrlib import BZRDIR
27
28
from bzrlib.commands import Command
341
342
                print "Using saved location: %s" % stored_loc
342
343
                location = stored_loc
343
344
        cache_root = tempfile.mkdtemp()
 
345
        br_from = Branch.open(location)
 
346
        br_from.lock_read()
344
347
        try:
345
 
            from bzrlib.errors import DivergedBranches
346
 
            br_from = Branch.open(location)
347
 
            br_from.lock_read()
348
348
            br_from.setup_caching(cache_root)
349
349
            location = br_from.base
350
350
            old_revno = br_to.revno()