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 12:57:58 -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 11:48 AM, Stephen Leake wrote:
Timothy Brownawell<address@hidden>  writes:

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

Because they don't get reset by 'app.opts = original_opts' in
automate_stdio_shared_body, I gather.

Yes.

--debug, --dump also affect global_sanity.

--log, --timestamps affect ui; that seems equally bad.

Thanks.

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

For the undesired affect on the server, you mean?

Yes.

and can be made resettable along the way.

Ok.

If we remove names, we need a deprecate mechanism. Or maybe not; we
could say "we're not at 1.0 yet". But we will after that.

This would mean... don't show it in the help output, and W() if it's used?

I don't see an easy way to make W use an option in app.opts; we
certainly don't want to change it to take an app argument.

One fix is to have automate_shared_body save and restore the value of
these global options (verbosity, debug, dump, log, and timestamps), as
it does app.opts.

But we need a cleaner way to do that, so if more global options are
added, they also get restored.

Make sure that *no* options call functions like that when set. Then have an RAII class that can save state and apply those options, and un-apply them when destructed. Some that should never be changed (log file location, dump file location, maybe others) can just be applied directly in commands::process.

--
Timothy

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



reply via email to

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