~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: John Arbash Meinel
  • Date: 2006-08-23 18:22:08 UTC
  • mto: This revision was merged to the branch mainline in revision 1953.
  • Revision ID: john@arbash-meinel.com-20060823182208-4a50f792bedbee8f
Simplify changes to command.py

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
    """
62
62
    global plugin_cmds
63
63
    k = cmd.__name__
64
 
 
65
64
    if k.startswith("cmd_"):
66
65
        k_unsquished = _unsquish_command_name(k)
67
66
    else:
131
130
    """
132
131
    from bzrlib.externalcommand import ExternalCommand
133
132
 
134
 
    try:
135
 
        cmd_name = str(cmd_name)
136
 
    except UnicodeError:
137
 
        pass 
138
 
        # We want only 'ascii' command names, but the user may have typed
139
 
        # in a Unicode name. In that case, they should just get a
140
 
        # 'command not found' error later.
141
 
        # In the future, we may actually support Unicode command names.
 
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.
142
137
 
143
138
    # first look up this command under the specified name
144
139
    cmds = _get_cmd_dict(plugins_override=plugins_override)
558
553
            argv[0] = alias_argv.pop(0)
559
554
 
560
555
    cmd = argv.pop(0)
561
 
    try:
562
 
        cmd = cmd.encode('ascii')
563
 
    except UnicodeError:
564
 
        pass 
565
 
        # We want only 'ascii' command names, but the user may have typed
566
 
        # in a Unicode name. In that case, they should just get a
567
 
        # 'command not found' error later.
 
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.
568
559
 
569
560
    cmd_obj = get_cmd_object(cmd, plugins_override=not opt_builtin)
570
561
    if not getattr(cmd_obj.run_argv, 'is_deprecated', False):