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

2010-04-19 Thread Thomas Keller
Am 19.04.2010 03:22, schrieb Derek Scherger: On Sun, Apr 18, 2010 at 2:40 PM, Thomas Keller m...@thomaskeller.biz mailto:m...@thomaskeller.biz wrote: Heh, very cool, thanks Derek! Does this code change also fix the problem that _MTN/options is written out even if the command does

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

2010-04-18 Thread Derek Scherger
On Sat, Apr 17, 2010 at 4:53 PM, Derek Scherger de...@echologic.com wrote: 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

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

2010-04-18 Thread Thomas Keller
Am 18.04.10 21:14, schrieb Derek Scherger: On Sat, Apr 17, 2010 at 4:53 PM, Derek Scherger de...@echologic.com mailto:de...@echologic.com wrote: How about something simple:just before writing out a new _MTN/options read in the current one and see if there is any difference

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

2010-04-18 Thread Derek Scherger
On Sun, Apr 18, 2010 at 2:40 PM, Thomas Keller m...@thomaskeller.biz wrote: Heh, very cool, thanks Derek! Does this code change also fix the problem that _MTN/options is written out even if the command does not succeed? I don't think so. This change was to the set_options function in

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

2010-04-17 Thread Stephen Leake
Thomas Keller invalid.nore...@gnu.org writes: Follow-up Comment #1, bug #29576 (project monotone): I understand where you're heading - but the problem is the underlying architecture of this feature. _MTN/options is supposed to save options which the user entered on command line to avoid that

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

2010-04-17 Thread Thomas Keller
Am 17.04.10 13:09, schrieb Stephen Leake: 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

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

2010-04-17 Thread Stephen Leake
Thomas Keller m...@thomaskeller.biz writes: Am 17.04.10 13:09, schrieb Stephen Leake: 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

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

2010-04-17 Thread Derek Scherger
On Sat, Apr 17, 2010 at 6:34 AM, Thomas Keller m...@thomaskeller.biz wrote: This is only partially a problem of the hook. The options system simply has no general code to accept --no-something options which would switch the default of the --something value to the opposite. Allowing a

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

2010-04-17 Thread Derek Scherger
On Sat, Apr 17, 2010 at 1:27 AM, Thomas Keller invalid.nore...@gnu.orgwrote: 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

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

2010-04-17 Thread Thomas Keller
Am 18.04.10 00:48, schrieb Derek Scherger: On Sat, Apr 17, 2010 at 6:34 AM, Thomas Keller m...@thomaskeller.biz wrote: This is only partially a problem of the hook. The options system simply has no general code to accept --no-something options which would switch the default of the

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

2010-04-17 Thread Thomas Keller
Am 18.04.10 00:53, schrieb Derek Scherger: On Sat, Apr 17, 2010 at 1:27 AM, Thomas Keller invalid.nore...@gnu.orgwrote: 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

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

2010-04-17 Thread Thomas Keller
Am 18.04.10 00:57, schrieb Thomas Keller: Am 18.04.10 00:48, schrieb Derek Scherger: On Sat, Apr 17, 2010 at 6:34 AM, Thomas Keller m...@thomaskeller.biz wrote: This is only partially a problem of the hook. The options system simply has no general code to accept --no-something options which