~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: Vincent Ladeuil
  • Date: 2011-01-27 15:58:36 UTC
  • mfrom: (5609.2.5 2.3)
  • mto: This revision was merged to the branch mainline in revision 5635.
  • Revision ID: v.ladeuil+lp@free.fr-20110127155836-hoyxs53z42jh3ezm
Merge 2.3 into trunk

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 (
278
278
    # TODO: This should be given a Transport, and should chdir up; otherwise
279
279
    # this will open a new connection.
280
280
    def _make_tail(self, url):
281
 
        t = get_transport(url)
 
281
        t = _mod_transport.get_transport(url)
282
282
        t.ensure_base()
283
283
 
284
284
    @staticmethod
468
468
        """
469
469
        if force_new_tree:
470
470
            # check for non local urls
471
 
            t = get_transport(base, possible_transports)
 
471
            t = _mod_transport.get_transport(base, possible_transports)
472
472
            if not isinstance(t, local.LocalTransport):
473
473
                raise errors.NotLocalUrl(base)
474
474
        bzrdir = BzrDir.create(base, format, possible_transports)
496
496
        :param format: Override for the bzrdir format to create.
497
497
        :return: The WorkingTree object.
498
498
        """
499
 
        t = get_transport(base)
 
499
        t = _mod_transport.get_transport(base)
500
500
        if not isinstance(t, local.LocalTransport):
501
501
            raise errors.NotLocalUrl(base)
502
502
        bzrdir = BzrDir.create_branch_and_repo(base,
716
716
 
717
717
        :param _unsupported: a private parameter to the BzrDir class.
718
718
        """
719
 
        t = get_transport(base, possible_transports=possible_transports)
 
719
        t = _mod_transport.get_transport(base, possible_transports)
720
720
        return BzrDir.open_from_transport(t, _unsupported=_unsupported)
721
721
 
722
722
    @staticmethod
761
761
        :param url: url to search from.
762
762
        See open_containing_from_transport for more detail.
763
763
        """
764
 
        transport = get_transport(url, possible_transports)
 
764
        transport = _mod_transport.get_transport(url, possible_transports)
765
765
        return BzrDir.open_containing_from_transport(transport)
766
766
 
767
767
    @staticmethod
923
923
        if cls is not BzrDir:
924
924
            raise AssertionError("BzrDir.create always creates the"
925
925
                "default format, not one of %r" % cls)
926
 
        t = get_transport(base, possible_transports)
 
926
        t = _mod_transport.get_transport(base, possible_transports)
927
927
        t.ensure_base()
928
928
        if format is None:
929
929
            format = controldir.ControlDirFormat.get_default_format()
1846
1846
        return ConvertBzrDir5To6()
1847
1847
 
1848
1848
    def _initialize_for_clone(self, url):
1849
 
        return self.initialize_on_transport(get_transport(url), _cloning=True)
 
1849
        return self.initialize_on_transport(
 
1850
            _mod_transport.get_transport(url), _cloning=True)
1850
1851
 
1851
1852
    def initialize_on_transport(self, transport, _cloning=False):
1852
1853
        """Format 5 dirs always have working tree, branch and repository.
1906
1907
        return ConvertBzrDir6ToMeta()
1907
1908
 
1908
1909
    def _initialize_for_clone(self, url):
1909
 
        return self.initialize_on_transport(get_transport(url), _cloning=True)
 
1910
        return self.initialize_on_transport(
 
1911
            _mod_transport.get_transport(url), _cloning=True)
1910
1912
 
1911
1913
    def initialize_on_transport(self, transport, _cloning=False):
1912
1914
        """Format 6 dirs always have working tree, branch and repository.