/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/builtins.py

  • Committer: Vincent Ladeuil
  • Date: 2008-10-02 06:18:42 UTC
  • mfrom: (3757 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3759.
  • Revision ID: v.ladeuil+lp@free.fr-20081002061842-4ctag1pkr7ua9gu2
Fix conflict. Related to moved lines, nice use case

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
"""builtin bzr commands"""
18
18
 
19
19
import os
20
 
from StringIO import StringIO
21
20
 
22
21
from bzrlib.lazy_import import lazy_import
23
22
lazy_import(globals(), """
24
23
import codecs
 
24
import cStringIO
25
25
import sys
26
26
import time
27
27
 
34
34
    config,
35
35
    errors,
36
36
    globbing,
37
 
    ignores,
38
37
    log,
39
38
    merge as _mod_merge,
40
39
    merge_directive,
56
55
 
57
56
from bzrlib.commands import Command, display_command
58
57
from bzrlib.option import ListOption, Option, RegistryOption, custom_help
59
 
from bzrlib.trace import mutter, note, warning, is_quiet, info
 
58
from bzrlib.trace import mutter, note, warning, is_quiet
60
59
 
61
60
 
62
61
def tree_files(file_list, default_branch=u'.'):
1304
1303
         RegistryOption('format',
1305
1304
                help='Specify a format for this branch. '
1306
1305
                'See "help formats".',
1307
 
                registry=bzrdir.format_registry,
1308
 
                converter=bzrdir.format_registry.make_bzrdir,
 
1306
                lazy_registry=('bzrlib.bzrdir', 'format_registry'),
 
1307
                converter=lambda name: bzrdir.format_registry.make_bzrdir(name),
1309
1308
                value_switches=True,
1310
1309
                title="Branch Format",
1311
1310
                ),
1393
1392
    takes_options = [RegistryOption('format',
1394
1393
                            help='Specify a format for this repository. See'
1395
1394
                                 ' "bzr help formats" for details.',
1396
 
                            registry=bzrdir.format_registry,
1397
 
                            converter=bzrdir.format_registry.make_bzrdir,
 
1395
                            lazy_registry=('bzrlib.bzrdir', 'format_registry'),
 
1396
                            converter=lambda name: bzrdir.format_registry.make_bzrdir(name),
1398
1397
                            value_switches=True, title='Repository format'),
1399
1398
                     Option('no-trees',
1400
1399
                             help='Branches in the repository will default to'
2326
2325
            if my_message is None and not file:
2327
2326
                t = make_commit_message_template_encoded(tree,
2328
2327
                        selected_list, diff=show_diff,
2329
 
                        output_encoding=bzrlib.user_encoding)
 
2328
                        output_encoding=osutils.get_user_encoding())
2330
2329
                my_message = edit_commit_message_encoded(t)
2331
2330
                if my_message is None:
2332
2331
                    raise errors.BzrCommandError("please specify a commit"
2336
2335
                    "please specify either --message or --file")
2337
2336
            if file:
2338
2337
                my_message = codecs.open(file, 'rt',
2339
 
                                         bzrlib.user_encoding).read()
 
2338
                                         osutils.get_user_encoding()).read()
2340
2339
            if my_message == "":
2341
2340
                raise errors.BzrCommandError("empty commit message specified")
2342
2341
            return my_message
2442
2441
                    RegistryOption('format',
2443
2442
                        help='Upgrade to a specific format.  See "bzr help'
2444
2443
                             ' formats" for details.',
2445
 
                        registry=bzrdir.format_registry,
2446
 
                        converter=bzrdir.format_registry.make_bzrdir,
 
2444
                        lazy_registry=('bzrlib.bzrdir', 'format_registry'),
 
2445
                        converter=lambda name: bzrdir.format_registry.make_bzrdir(name),
2447
2446
                        value_switches=True, title='Branch format'),
2448
2447
                    ]
2449
2448
 
2706
2705
            first=False, list_only=False,
2707
2706
            randomize=None, exclude=None, strict=False,
2708
2707
            load_list=None, debugflag=None, starting_with=None):
2709
 
        import bzrlib.ui
2710
2708
        from bzrlib.tests import selftest
2711
2709
        import bzrlib.benchmarks as benchmarks
2712
2710
        from bzrlib.benchmarks import tree_creator
4207
4205
        from bzrlib.revision import NULL_REVISION
4208
4206
        branch = Branch.open_containing(from_)[0]
4209
4207
        if output is None:
4210
 
            outfile = StringIO()
 
4208
            outfile = cStringIO.StringIO()
4211
4209
        elif output == '-':
4212
4210
            outfile = self.outf
4213
4211
        else: