~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

(vila) Provide a config section matcher respecting the file order. (Vincent
 Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
import bzrlib.bzrdir
24
24
 
25
 
from bzrlib.lazy_import import lazy_import
26
 
lazy_import(globals(), """
 
25
from bzrlib import lazy_import
 
26
lazy_import.lazy_import(globals(), """
27
27
import cStringIO
28
28
import errno
29
29
import sys
2086
2086
            location = '.'
2087
2087
 
2088
2088
        to_transport = transport.get_transport(location)
2089
 
        to_transport.ensure_base()
2090
2089
 
2091
 
        newdir = format.initialize_on_transport(to_transport)
2092
 
        repo = newdir.create_repository(shared=True)
2093
 
        repo.set_make_working_trees(not no_trees)
 
2090
        (repo, newdir, require_stacking, repository_policy) = (
 
2091
            format.initialize_on_transport_ex(to_transport,
 
2092
            create_prefix=True, make_working_trees=not no_trees,
 
2093
            shared_repo=True, force_new_repo=True,
 
2094
            use_existing_dir=True,
 
2095
            repo_format_name=format.repository_format.get_format_string()))
2094
2096
        if not is_quiet():
2095
2097
            from bzrlib.info import show_bzrdir_info
2096
 
            show_bzrdir_info(repo.bzrdir, verbose=0, outfile=self.outf)
 
2098
            show_bzrdir_info(newdir, verbose=0, outfile=self.outf)
2097
2099
 
2098
2100
 
2099
2101
class cmd_diff(Command):
4002
4004
            load_list=None, debugflag=None, starting_with=None, subunit=False,
4003
4005
            parallel=None, lsprof_tests=False,
4004
4006
            sync=False):
 
4007
 
 
4008
        # During selftest, disallow proxying, as it can cause severe
 
4009
        # performance penalties and is only needed for thread
 
4010
        # safety. The selftest command is assumed to not use threads
 
4011
        # too heavily. The call should be as early as possible, as
 
4012
        # error reporting for past duplicate imports won't have useful
 
4013
        # backtraces.
 
4014
        lazy_import.disallow_proxying()
 
4015
 
4005
4016
        from bzrlib import tests
4006
4017
 
4007
4018
        if testspecs_list is not None:
4721
4732
 
4722
4733
    @display_command
4723
4734
    def run(self, context=None):
4724
 
        import shellcomplete
 
4735
        from bzrlib import shellcomplete
4725
4736
        shellcomplete.shellcomplete(context)
4726
4737
 
4727
4738