~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/bzrdir.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-08-24 23:20:14 UTC
  • mfrom: (5365.5.29 2.3-btree-chk-leaf)
  • Revision ID: pqm@pqm.ubuntu.com-20100824232014-nu9owzel2zym2jk2
(jam) Use a custom C type for CHK index entries, saves memory

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
    BzrDir,
23
23
    BzrDirFormat,
24
24
    BzrDirMetaFormat1,
 
25
    BzrProber,
25
26
    network_format_registry,
26
27
    )
27
28
from bzrlib.smart.request import (
44
45
            # clients that don't anticipate errors from this method.
45
46
            answer = 'no'
46
47
        else:
47
 
            default_format = BzrDirFormat.get_default_format()
48
 
            real_bzrdir = default_format.open(t, _found=True)
 
48
            bzr_prober = BzrProber()
49
49
            try:
50
 
                real_bzrdir._format.probe_transport(t)
 
50
                bzr_prober.probe_transport(t)
51
51
            except (errors.NotBranchError, errors.UnknownFormatError):
52
52
                answer = 'no'
53
53
            else:
429
429
            # It is returned locked, but we need to do the lock to get the lock
430
430
            # token.
431
431
            repo.unlock()
432
 
            repo_lock_token = repo.lock_write() or ''
 
432
            repo_lock_token = repo.lock_write().repository_token or ''
433
433
            if repo_lock_token:
434
434
                repo.leave_lock_in_place()
435
435
            repo.unlock()