~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: John Arbash Meinel
  • Date: 2007-07-13 02:23:34 UTC
  • mfrom: (2592 +trunk) (2612 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2614.
  • Revision ID: john@arbash-meinel.com-20070713022334-qb6ewgo6v4251yd9
[merge] bzr.dev 2612

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
    option,
45
45
    osutils,
46
46
    trace,
 
47
    win32utils,
47
48
    )
48
49
""")
49
50
 
240
241
        if self.__doc__ == Command.__doc__:
241
242
            warn("No help message set for %r" % self)
242
243
 
 
244
    def _maybe_expand_globs(self, file_list):
 
245
        """Glob expand file_list if the platform does not do that itself.
 
246
        
 
247
        :return: A possibly empty list of unicode paths.
 
248
 
 
249
        Introduced in bzrlib 0.18.
 
250
        """
 
251
        if not file_list:
 
252
            file_list = []
 
253
        if sys.platform == 'win32':
 
254
            file_list = win32utils.glob_expand(file_list)
 
255
        return list(file_list)
 
256
 
243
257
    def _usage(self):
244
258
        """Return single-line grammar for this command.
245
259
 
318
332
 
319
333
        Maps from long option name to option object."""
320
334
        r = dict()
321
 
        r['help'] = option.Option.OPTIONS['help']
 
335
        r['help'] = option._help_option
322
336
        for o in self.takes_options:
323
337
            if isinstance(o, basestring):
324
338
                o = option.Option.OPTIONS[o]