monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] verbosity options


From: Timothy Brownawell
Subject: Re: [Monotone-devel] verbosity options
Date: Sun, 13 Jun 2010 09:06:07 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100515 Icedove/3.0.4

On 06/13/2010 07:18 AM, Stephen Leake wrote:
In starting work on negatable options, I looked thru all of the current
boolean options. These are all related, at least in the English meaning
of their names:

OPT(full, "full", bool, false,
GOPT(quiet, "quiet", bool, false,
GOPT(reallyquiet, "reallyquiet", bool, false,
OPT(verbose, "verbose", bool, false,

We could change them to a single verbosity integer, where 0 = normal,<
0 is progressively quieter,>  0 is progressively noisier:

<default>    = 0
quiet       = -1
reallyquiet = -2
verbose     = 1
full        = 2

However, these options are used rarely, or not at all:

"full" is used by:
CMD_NO_WORKSPACE(version, "version", "", CMD_REF(informative), "",
CMD(db_info, "info", "", CMD_REF(db), "",

"verbose" is used by:
CMD(complete, "complete", "", CMD_REF(informative),

Probably --full could be replaced with --verbose, or they could be made identical.

"quiet" and "reallyquiet" are not used at all. Compiling with those
options deleted from options_list.hh confirms that.

Those are used. They're global options, and instead of directly setting a variable they just call a function on the sanity object.

...hm, giving '--quiet' or '--reallyquiet' over remote_stdio has persistent effects on the server. That's not good.

So we could keep 'full' and 'verbose' as booleans, and just live with
the --no- forms.

I think an integer verbosity is more flexible in the long run. Some
other tools I've used allow incrementing the integer by repeating -v;
that's a simple interface. But that should be done in another branch,
separate from the negatable options work.

That could be reasonable, replace all four with a global
"--verbosity=<-2,-1,0,1>". Probably this should be part of resettable options, since --quiet and --reallyquiet need to be fixed anyway and can be made resettable along the way.

For now, any objections to deleting "quiet" and "reallyquiet" from nvm?

They turn off tickers and P() messages, and --reallyquiet also turns off W() messages. We probably want to keep them.


--
Timothy

Free public monotone hosting: http://mtn-host.prjek.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]