/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: Robert Collins
  • Date: 2009-04-27 03:27:46 UTC
  • mto: This revision was merged to the branch mainline in revision 4304.
  • Revision ID: robertc@robertcollins.net-20090427032746-vqmcsfbsbvbm04sk
Fixup tests broken by cleaning up the layering.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3068
3068
            # hand off the request to the smart server
3069
3069
            client_medium = transport.get_smart_medium()
3070
3070
        except errors.NoSmartMedium:
 
3071
            do_vfs = True
 
3072
        else:
 
3073
            # Decline to open it if the server doesn't support our required
 
3074
            # version (3) so that the VFS-based transport will do it.
 
3075
            if client_medium.should_probe():
 
3076
                try:
 
3077
                    server_version = client_medium.protocol_version()
 
3078
                    if server_version != '2':
 
3079
                        do_vfs = True
 
3080
                    else:
 
3081
                        do_vfs = False
 
3082
                except errors.SmartProtocolError:
 
3083
                    # Apparently there's no usable smart server there, even though
 
3084
                    # the medium supports the smart protocol.
 
3085
                    do_vfs = True
 
3086
            else:
 
3087
                do_vfs = False
 
3088
        if not do_vfs:
 
3089
            client = _SmartClient(client_medium)
 
3090
            path = client.remote_path_from_transport(transport)
 
3091
            if client_medium._is_remote_before((1, 15)):
 
3092
                do_vfs = True
 
3093
        if do_vfs:
3071
3094
            # TODO: lookup the local format from a server hint.
3072
3095
            local_dir_format = BzrDirMetaFormat1()
3073
3096
            self._supply_sub_formats_to(local_dir_format)
3075
3098
                use_existing_dir=use_existing_dir, create_prefix=create_prefix,
3076
3099
                force_new_repo=force_new_repo, stacked_on=stacked_on,
3077
3100
                stack_on_pwd=stack_on_pwd, repo_format_name=repo_format_name,
3078
 
                make_working_trees=make_working_trees, shared_repo=shared_repo)
3079
 
        client = _SmartClient(client_medium)
3080
 
        path = client.remote_path_from_transport(transport)
3081
 
        if client_medium._is_remote_before((1, 15)):
3082
 
            local_dir_format = BzrDirMetaFormat1()
3083
 
            self._supply_sub_formats_to(local_dir_format)
3084
 
            return local_dir_format.initialize_on_transport_ex(transport,
3085
 
                use_existing_dir=use_existing_dir, create_prefix=create_prefix,
3086
 
                force_new_repo=force_new_repo, stacked_on=stacked_on,
3087
 
                stack_on_pwd=stack_on_pwd, repo_format_name=repo_format_name,
3088
3101
                make_working_trees=make_working_trees, shared_repo=shared_repo,
3089
3102
                vfs_only=True)
3090
3103
        args = []