Rev 3619: Show switch option values in help (Robert Widhopf-Fenk) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Mon Aug 11 09:33:13 BST 2008
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 3619
revision-id: pqm at pqm.ubuntu.com-20080811083307-tbibm26paa3r4hg8
parent: pqm at pqm.ubuntu.com-20080811033925-rwcu69eiq0zg0buv
parent: mbp at sourcefrog.net-20080811064349-hhk8464ratj2bjoz
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2008-08-11 09:33:07 +0100
message:
Show switch option values in help (Robert Widhopf-Fenk)
modified:
bzrlib/option.py option.py-20051014052914-661fb36e76e7362f
------------------------------------------------------------
revno: 3617.1.1
revision-id: mbp at sourcefrog.net-20080811064349-hhk8464ratj2bjoz
parent: pqm at pqm.ubuntu.com-20080809215057-4tnxs63ngab9gm8a
parent: hack at robf.de-20080722213718-ik0iezz5z5mz90it
committer: Martin Pool <mbp at sourcefrog.net>
branch nick: integration
timestamp: Mon 2008-08-11 16:43:49 +1000
message:
Show switch option values in help (Robert Widhopf-Fenk)
modified:
bzrlib/option.py option.py-20051014052914-661fb36e76e7362f
------------------------------------------------------------
revno: 3571.2.1
revision-id: hack at robf.de-20080722213718-ik0iezz5z5mz90it
parent: pqm at pqm.ubuntu.com-20080722103935-leq46n7723oi910e
committer: Robert Widhopf-Fenk <hack at robf.de>
branch nick: bzr-show-value-switch-help
timestamp: Tue 2008-07-22 23:37:18 +0200
message:
Add the help of values to the help of the option if there are no value switches.
modified:
bzrlib/option.py option.py-20051014052914-661fb36e76e7362f
=== modified file 'bzrlib/option.py'
--- a/bzrlib/option.py 2008-04-24 07:22:53 +0000
+++ b/bzrlib/option.py 2008-07-22 21:37:18 +0000
@@ -345,6 +345,10 @@
for name, switch_help in kwargs.iteritems():
name = name.replace('_', '-')
reg.register(name, name, help=switch_help)
+ if not value_switches:
+ help = help + ' "' + name + '": ' + switch_help
+ if not help.endswith("."):
+ help = help + "."
return RegistryOption(name_, help, reg, title=title,
value_switches=value_switches, enum_switch=enum_switch)
More information about the bazaar-commits
mailing list