~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/option.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-08-11 08:33:07 UTC
  • mfrom: (3617.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20080811083307-tbibm26paa3r4hg8
Show switch option values in help (Robert Widhopf-Fenk)

Show diffs side-by-side

added added

removed removed

Lines of Context:
345
345
        for name, switch_help in kwargs.iteritems():
346
346
            name = name.replace('_', '-')
347
347
            reg.register(name, name, help=switch_help)
 
348
            if not value_switches:
 
349
                help = help + '  "' + name + '": ' + switch_help
 
350
                if not help.endswith("."):
 
351
                    help = help + "."
348
352
        return RegistryOption(name_, help, reg, title=title,
349
353
            value_switches=value_switches, enum_switch=enum_switch)
350
354