[MERGE] Make value_switches=True the default for RegistryOption.

Robert Widhopf-Fenk hack at robf.de
Tue Jul 22 22:45:41 BST 2008


On Monday, April 28, 2008 at 10:55:36, Martin Pool wrote:
> On Mon, Apr 28, 2008 at 10:33 AM, Ian Clatworthy
> <ian.clatworthy at internode.on.net> wrote:
> > Ian Clatworthy has voted tweak.
> >  Status is now: Semi-approved Comment: Keeping in mind that the
> >  current behaviour is assumed by existing plugins,
> > this needs to be clearly documented in the CHANGES section of
> > NEWS.  Otherwise, this is OK by me.
>
> Looking at this again, I am really not convinced it is an
> appropriate default, or should be on in any case.  The essential
> problem here seems to be that we do not give any help about switch
> values.  Robert, could you make a patch which adds that help
> directly?

Finally I did ;-) and "bzr tags -h" and others show a tidy
help ...

Robert.

-------------- next part --------------
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: hack at robf.de-20080722213718-ik0iezz5z5mz90it
# target_branch: file:///home/fenk/download/bzr.repo/bzr.dev/
# testament_sha1: ec12cab5ffbf96ad66308057c69771fea8e346c7
# timestamp: 2008-07-22 23:41:09 +0200
# base_revision_id: pqm at pqm.ubuntu.com-20080722103935-leq46n7723oi910e
# 
# Begin patch
=== modified file 'bzrlib/option.py'
--- bzrlib/option.py	2008-04-24 07:22:53 +0000
+++ 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)
 

# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWYFQQzYAAap/gABUQABR6///
cwAQgL////BQA6yeAtm6Bi8JJCE0yankxMjKZTyI9NTRspptJtT0nqDShpNPUaHkQ0yB6E0aDINM
TCA1PUnpqaj1MhoaI9ATCepgABNG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