monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] verbosity options


From: Stephen Leake
Subject: Re: [Monotone-devel] verbosity options
Date: Sun, 13 Jun 2010 16:11:09 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (windows-nt)

Timothy Brownawell <address@hidden> writes:

> On 06/13/2010 11:48 AM, Stephen Leake wrote:

>> 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?

Yes. And the W() message should say what to use instead, or refer to the
manual if it's complicated.

>> 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,

So the actual option code just sets an intermediate variable. Commands
that want to use that option use the RAII class. That makes sense.

> 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.

Ok.

-- 
-- Stephe



reply via email to

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