~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/branch.py

  • Committer: jelmer at samba
  • Date: 2011-10-11 12:01:51 UTC
  • mto: This revision was merged to the branch mainline in revision 6214.
  • Revision ID: jelmer@samba.org-20111011120151-l1aa35zasaocrev3
Fix tests and the like.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
    bencode,
22
22
    errors,
23
23
    )
24
 
from bzrlib.bzrdir import BzrDir
 
24
from bzrlib.controldir import ControlDir
25
25
from bzrlib.smart.request import (
26
26
    FailedSmartServerResponse,
27
27
    SmartServerRequest,
45
45
        :return: A SmartServerResponse from self.do_with_branch().
46
46
        """
47
47
        transport = self.transport_from_client_path(path)
48
 
        bzrdir = BzrDir.open_from_transport(transport)
49
 
        if bzrdir.get_branch_reference() is not None:
 
48
        controldir = ControlDir.open_from_transport(transport)
 
49
        if controldir.get_branch_reference() is not None:
50
50
            raise errors.NotBranchError(transport.base)
51
 
        branch = bzrdir.open_branch(ignore_fallbacks=True)
 
51
        branch = controldir.open_branch(ignore_fallbacks=True)
52
52
        return self.do_with_branch(branch, *args)
53
53
 
54
54