/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: Carl Friedrich Bolz
  • Date: 2006-09-06 21:17:22 UTC
  • mfrom: (1977 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2026.
  • Revision ID: cfbolz@gmx.de-20060906211722-b04f9c3ad1f53ef1
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
        k_unsquished = _unsquish_command_name(k)
66
66
    else:
67
67
        k_unsquished = k
68
 
    if not plugin_cmds.has_key(k_unsquished):
 
68
    if k_unsquished not in plugin_cmds:
69
69
        plugin_cmds[k_unsquished] = cmd
70
70
        mutter('registered plugin command %s', k_unsquished)
71
71
        if decorate and k_unsquished in builtin_command_names():
130
130
    """
131
131
    from bzrlib.externalcommand import ExternalCommand
132
132
 
133
 
    cmd_name = str(cmd_name)            # not unicode
 
133
    # We want only 'ascii' command names, but the user may have typed
 
134
    # in a Unicode name. In that case, they should just get a
 
135
    # 'command not found' error later.
 
136
    # In the future, we may actually support Unicode command names.
134
137
 
135
138
    # first look up this command under the specified name
136
139
    cmds = _get_cmd_dict(plugins_override=plugins_override)
549
552
            alias_argv = [a.decode(bzrlib.user_encoding) for a in alias_argv]
550
553
            argv[0] = alias_argv.pop(0)
551
554
 
552
 
    cmd = str(argv.pop(0))
 
555
    cmd = argv.pop(0)
 
556
    # We want only 'ascii' command names, but the user may have typed
 
557
    # in a Unicode name. In that case, they should just get a
 
558
    # 'command not found' error later.
553
559
 
554
560
    cmd_obj = get_cmd_object(cmd, plugins_override=not opt_builtin)
555
561
    if not getattr(cmd_obj.run_argv, 'is_deprecated', False):