monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] [bug #29576] mtn tries to rewrite options file eve


From: Derek Scherger
Subject: Re: [Monotone-devel] [bug #29576] mtn tries to rewrite options file every time
Date: Sat, 17 Apr 2010 16:53:50 -0600


On Sat, Apr 17, 2010 at 1:27 AM, Thomas Keller <address@hidden> wrote:

1) Save any given options back to _MTN/options at the very end of the
execution (f.e. in monotone.cc) _after_ it has been clear that no exception
occurred - so we don't remember possibly harmful settings.

2) Only save those options back to _MTN/options which have actually been
given by the user on the command line - this would probably need a little
fiddling with the <someopt>_given flag we set even for options from
_MTN/options (or we leave that alone and find another way to determine which
options have been given by the user and which not). Note that there is also a
hook which returns default command options for a command.
Alternatively we could always save back the options to _MTN/options unless
another global command line option is given, f.e. --skip-options-saving or
something similar.

How about something simple:just before writing out a new _MTN/options read in the current one and see if there is any difference between what is about to be written and what is already written, then only write out new options if there are *actual* changes. This should be entirely compatible with what we do now, but will avoid affecting the last modification time when nothing is actually changed.

Cheers,
Derek





reply via email to

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