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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-10-01 07:56:03 UTC
  • mfrom: (3224.5.40 faster-startup)
  • Revision ID: pqm@pqm.ubuntu.com-20081001075603-s9nynw8y85fmrprj
Reduce startup time by a small amount. (Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
    errors,
44
44
    option,
45
45
    osutils,
46
 
    registry,
47
46
    trace,
48
47
    win32utils,
49
48
    )
50
49
""")
51
50
 
52
 
from bzrlib.symbol_versioning import (
53
 
    deprecated_function,
54
 
    deprecated_method,
55
 
    )
 
51
from bzrlib import registry
56
52
# Compatibility
57
53
from bzrlib.option import Option
58
54
 
768
764
    if not opt_no_aliases:
769
765
        alias_argv = get_alias(argv[0])
770
766
        if alias_argv:
771
 
            alias_argv = [a.decode(bzrlib.user_encoding) for a in alias_argv]
 
767
            user_encoding = osutils.get_user_encoding()
 
768
            alias_argv = [a.decode(user_encoding) for a in alias_argv]
772
769
            argv[0] = alias_argv.pop(0)
773
770
 
774
771
    cmd = argv.pop(0)
832
829
        from bzrlib import symbol_versioning
833
830
        symbol_versioning.suppress_deprecation_warnings(override=False)
834
831
    try:
835
 
        argv = [a.decode(bzrlib.user_encoding) for a in argv[1:]]
 
832
        user_encoding = osutils.get_user_encoding()
 
833
        argv = [a.decode(user_encoding) for a in argv[1:]]
836
834
    except UnicodeDecodeError:
837
835
        raise errors.BzrError(("Parameter '%r' is unsupported by the current "
838
836
                                                            "encoding." % a))