~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:08:50 UTC
  • Revision ID: robertc@robertcollins.net-20051011030850-fef51d00c2eb82bf
fix a prior bad merge of cmd_pull, which had resulted in double opens of remote branches

Show diffs side-by-side

added added

removed removed

Lines of Context:
341
341
                print "Using saved location: %s" % stored_loc
342
342
                location = stored_loc
343
343
        cache_root = tempfile.mkdtemp()
344
 
        from bzrlib.errors import DivergedBranches
345
 
        br_from = Branch.open_containing(location)
346
 
        location = br_from.base
347
 
        old_revno = br_to.revno()
348
344
        try:
349
345
            from bzrlib.errors import DivergedBranches
350
346
            br_from = Branch.open(location)
 
347
            br_from.lock_read()
351
348
            br_from.setup_caching(cache_root)
352
349
            location = br_from.base
353
350
            old_revno = br_to.revno()
361
358
            if stored_loc is None or remember:
362
359
                br_to.set_parent(location)
363
360
        finally:
 
361
            br_from.unlock()
364
362
            rmtree(cache_root)
365
363
 
366
364