~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

remove all trailing whitespace from bzr source

Show diffs side-by-side

added added

removed removed

Lines of Context:
138
138
            real_name = _unsquish_command_name(name)
139
139
            r[real_name] = builtins[name]
140
140
    return r
141
 
            
 
141
 
142
142
 
143
143
def builtin_command_names():
144
144
    """Return list of builtin command names."""
145
145
    return _builtin_commands().keys()
146
 
    
 
146
 
147
147
 
148
148
def plugin_command_names():
149
149
    return plugin_cmds.keys()
156
156
        d.update(plugin_cmds.iteritems())
157
157
    return d
158
158
 
159
 
    
 
159
 
160
160
def get_all_cmds(plugins_override=True):
161
161
    """Return canonical name and class for all registered commands."""
162
162
    for k, v in _get_cmd_dict(plugins_override=plugins_override).iteritems():
216
216
        except errors.NoPluginAvailable:
217
217
            pass
218
218
        else:
219
 
            raise errors.CommandAvailableInPlugin(cmd_name, 
 
219
            raise errors.CommandAvailableInPlugin(cmd_name,
220
220
                                                  plugin_metadata, provider)
221
221
 
222
222
    raise KeyError
286
286
    encoding_type = 'strict'
287
287
 
288
288
    hidden = False
289
 
    
 
289
 
290
290
    def __init__(self):
291
291
        """Construct an instance of this command."""
292
292
        if self.__doc__ == Command.__doc__:
296
296
 
297
297
    def _maybe_expand_globs(self, file_list):
298
298
        """Glob expand file_list if the platform does not do that itself.
299
 
        
 
299
 
300
300
        :return: A possibly empty list of unicode paths.
301
301
 
302
302
        Introduced in bzrlib 0.18.
328
328
    def get_help_text(self, additional_see_also=None, plain=True,
329
329
                      see_also_as_links=False):
330
330
        """Return a text string with help for this command.
331
 
        
 
331
 
332
332
        :param additional_see_also: Additional help topics to be
333
333
            cross-referenced.
334
334
        :param plain: if False, raw help (reStructuredText) is
455
455
 
456
456
    def get_see_also(self, additional_terms=None):
457
457
        """Return a list of help topics that are related to this command.
458
 
        
 
458
 
459
459
        The list is derived from the content of the _see_also attribute. Any
460
460
        duplicates are removed and the result is in lexical order.
461
461
        :param additional_terms: Additional help topics to cross-reference.
575
575
 
576
576
def parse_args(command, argv, alias_argv=None):
577
577
    """Parse command line.
578
 
    
 
578
 
579
579
    Arguments and options are parsed at this level before being passed
580
580
    down to specific command handlers.  This routine knows, from a
581
581
    lookup table, something about the available options, what optargs
630
630
                               % (cmd, argname.upper()))
631
631
            else:
632
632
                argdict[argname] = args.pop(0)
633
 
            
 
633
 
634
634
    if args:
635
635
        raise errors.BzrCommandError("extra argument to command %s: %s"
636
636
                                     % (cmd, args[0]))
719
719
       The command-line arguments, without the program name from argv[0]
720
720
       These should already be decoded. All library/test code calling
721
721
       run_bzr should be passing valid strings (don't need decoding).
722
 
    
 
722
 
723
723
    Returns a command status or raises an exception.
724
724
 
725
725
    Special master options: these must come before the command because
947
947
 
948
948
    def plugin_for_command(self, cmd_name):
949
949
        '''Takes a command and returns the information for that plugin
950
 
        
951
 
        :return: A dictionary with all the available information 
 
950
 
 
951
        :return: A dictionary with all the available information
952
952
        for the requested plugin
953
953
        '''
954
954
        raise NotImplementedError