/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: Martin
  • Date: 2011-01-26 19:34:58 UTC
  • mto: (5609.10.1 2.3b5-dev)
  • mto: This revision was merged to the branch mainline in revision 5635.
  • Revision ID: gzlist@googlemail.com-20110126193458-o6mwxaymyinlzqjo
Blindly change all users of get_transport to address the function via the transport module

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
    remote,
50
50
    repository,
51
51
    revision as _mod_revision,
 
52
    transport as _mod_transport,
52
53
    ui,
53
54
    urlutils,
54
55
    versionedfile,
70
71
from bzrlib.transactions import WriteTransaction
71
72
from bzrlib.transport import (
72
73
    do_catching_redirections,
73
 
    get_transport,
74
74
    local,
75
75
    )
76
76
from bzrlib.weave import Weave
275
275
    # TODO: This should be given a Transport, and should chdir up; otherwise
276
276
    # this will open a new connection.
277
277
    def _make_tail(self, url):
278
 
        t = get_transport(url)
 
278
        t = _mod_transport.get_transport(url)
279
279
        t.ensure_base()
280
280
 
281
281
    @staticmethod
465
465
        """
466
466
        if force_new_tree:
467
467
            # check for non local urls
468
 
            t = get_transport(base, possible_transports)
 
468
            t = _mod_transport.get_transport(base, possible_transports)
469
469
            if not isinstance(t, local.LocalTransport):
470
470
                raise errors.NotLocalUrl(base)
471
471
        bzrdir = BzrDir.create(base, format, possible_transports)
493
493
        :param format: Override for the bzrdir format to create.
494
494
        :return: The WorkingTree object.
495
495
        """
496
 
        t = get_transport(base)
 
496
        t = _mod_transport.get_transport(base)
497
497
        if not isinstance(t, local.LocalTransport):
498
498
            raise errors.NotLocalUrl(base)
499
499
        bzrdir = BzrDir.create_branch_and_repo(base,
713
713
 
714
714
        :param _unsupported: a private parameter to the BzrDir class.
715
715
        """
716
 
        t = get_transport(base, possible_transports=possible_transports)
 
716
        t = _mod_transport.get_transport(base, possible_transports)
717
717
        return BzrDir.open_from_transport(t, _unsupported=_unsupported)
718
718
 
719
719
    @staticmethod
758
758
        :param url: url to search from.
759
759
        See open_containing_from_transport for more detail.
760
760
        """
761
 
        transport = get_transport(url, possible_transports)
 
761
        transport = _mod_transport.get_transport(url, possible_transports)
762
762
        return BzrDir.open_containing_from_transport(transport)
763
763
 
764
764
    @staticmethod
920
920
        if cls is not BzrDir:
921
921
            raise AssertionError("BzrDir.create always creates the"
922
922
                "default format, not one of %r" % cls)
923
 
        t = get_transport(base, possible_transports)
 
923
        t = _mod_transport.get_transport(base, possible_transports)
924
924
        t.ensure_base()
925
925
        if format is None:
926
926
            format = controldir.ControlDirFormat.get_default_format()
1843
1843
        return ConvertBzrDir5To6()
1844
1844
 
1845
1845
    def _initialize_for_clone(self, url):
1846
 
        return self.initialize_on_transport(get_transport(url), _cloning=True)
 
1846
        return self.initialize_on_transport(
 
1847
            _mod_transport.get_transport(url), _cloning=True)
1847
1848
 
1848
1849
    def initialize_on_transport(self, transport, _cloning=False):
1849
1850
        """Format 5 dirs always have working tree, branch and repository.
1903
1904
        return ConvertBzrDir6ToMeta()
1904
1905
 
1905
1906
    def _initialize_for_clone(self, url):
1906
 
        return self.initialize_on_transport(get_transport(url), _cloning=True)
 
1907
        return self.initialize_on_transport(
 
1908
            _mod_transport.get_transport(url), _cloning=True)
1907
1909
 
1908
1910
    def initialize_on_transport(self, transport, _cloning=False):
1909
1911
        """Format 6 dirs always have working tree, branch and repository.