[MERGE] Verbosity levels and standard options

Ian Clatworthy ian.clatworthy at internode.on.net
Mon Sep 3 05:02:06 BST 2007


Martin Pool wrote:
> Here's a partial review:

All those suggestions look good. Changes made in attached bundle.

> At the moment we have the somewhat odd situation that some things are
> done by modifying global state in the trace module and some are passed
> to the commands.  It looks like this clears it up a bit, but I wonder
> if we would do better to just pass every thing to the commands and get
> rid of the globals altogether?

I think the globals make sense and are useful, particularly for the
quiet levels where consistent levels are meaningful, e.g.

* -1 does mean no infos, show warnings, show errors
* -2 might mean no infos, no warnings, show errors

Verbose is another story - I prefer a command specific parameter for it.
As the code reflects, I wanted to keep backwards compatibility as best I
could. Looking forward:

* One option is to progressively remove verbose as a boolean parameter
  to commands and replace it will verbose_level as an int.

* Another is to stick with verbose as a boolean - which is typically
  sufficient - and maybe introduce verbose=None to mean "use the global
  setting".

Can we get this change through as an incremental improvement and have
this discussion separately?

Ian C.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: verbosity-levels-and-std-options-2.patch
Type: text/x-patch
Size: 46779 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070903/fadea301/attachment-0001.bin 


More information about the bazaar mailing list