~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/bzrdir.py

  • Committer: Vincent Ladeuil
  • Date: 2010-07-15 12:37:32 UTC
  • mto: This revision was merged to the branch mainline in revision 5347.
  • Revision ID: v.ladeuil+lp@free.fr-20100715123732-3d41ur2zrficjso3
Delete Revision.get_apparent_author.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
    BzrDir,
23
23
    BzrDirFormat,
24
24
    BzrDirMetaFormat1,
25
 
    BzrProber,
26
 
    )
27
 
from bzrlib.controldir import (
28
25
    network_format_registry,
29
26
    )
30
27
from bzrlib.smart.request import (
47
44
            # clients that don't anticipate errors from this method.
48
45
            answer = 'no'
49
46
        else:
50
 
            bzr_prober = BzrProber()
 
47
            default_format = BzrDirFormat.get_default_format()
 
48
            real_bzrdir = default_format.open(t, _found=True)
51
49
            try:
52
 
                bzr_prober.probe_transport(t)
 
50
                real_bzrdir._format.probe_transport(t)
53
51
            except (errors.NotBranchError, errors.UnknownFormatError):
54
52
                answer = 'no'
55
53
            else:
86
84
class SmartServerRequestBzrDir(SmartServerRequest):
87
85
 
88
86
    def do(self, path, *args):
89
 
        """Open a BzrDir at path, and return `self.do_bzrdir_request(*args)`."""
 
87
        """Open a BzrDir at path, and return self.do_bzrdir_request(*args)."""
90
88
        try:
91
89
            self._bzrdir = BzrDir.open_from_transport(
92
90
                self.transport_from_client_path(path))
150
148
        control_format = self._bzrdir.cloning_metadir(
151
149
            require_stacking=require_stacking)
152
150
        control_name = control_format.network_name()
153
 
        if not control_format.fixed_components:
 
151
        # XXX: There should be a method that tells us that the format does/does
 
152
        # not have subformats.
 
153
        if isinstance(control_format, BzrDirMetaFormat1):
154
154
            branch_name = ('branch',
155
155
                control_format.get_branch_format().network_name())
156
156
            repository_name = control_format.repository_format.network_name()
179
179
 
180
180
        :param path: The path to the bzrdir.
181
181
        :param network_name: The network name of the branch type to create.
182
 
        :return: ('ok', branch_format, repo_path, rich_root, tree_ref,
183
 
            external_lookup, repo_format)
 
182
        :return: (ok, network_name)
184
183
        """
185
184
        bzrdir = BzrDir.open_from_transport(
186
185
            self.transport_from_client_path(path))