[MERGE] RegistryOption

Martin Pool mbp at canonical.com
Tue Jan 9 01:37:00 GMT 2007

Martin Pool has voted +1.
Status is now: Approved
That looks like a nice simplification.

+ RegistryOption('format',
help='Specify a format for this branch. Current'
  ' formats are: default, knit, metaweave and' ' weave. Default is knit; 
metaweave and' ' weave are deprecated',

It would be nice if the list of possible values was generated 
automatically (maybe into a separate field from the regular help)

+ +class BadOptionParam(BzrError):
+ + _fmt = """Bad parameter "%(value)s" for option "%(name)s"."""
+ + def __init__(self, name, value):
+ BzrError.__init__(self, name=name, value=value)

I'd suggest not abbreviating in class names because there can be 
inconsistency if other people use the full name.

Anyhow I think the correct name for the bit after the = is "option 
value", at least in optparse.

+    """Option based on a registry"""

Could do with a little more text:

   The values for the options correspond to entries in the registry...

For details, see: 

More information about the bazaar mailing list