Avoid 00changelog.i corruption
Benoit Boissinot
bboissin at gmail.com
Tue Jul 21 08:50:35 CDT 2009
On Tue, Jul 21, 2009 at 1:30 PM, Ingo Proetel<proetel at aicas.de> wrote:
> Matt Mackall wrote:
>>
>> There are lots of places we append to files, is this the only one
>> affected? Are the nuls at the end of the file or somewhere else?
>>
> Yes, there are several places where this could happen. So probably a more general solution is required:
> A new class 'appender' util.py could be used to create a copy of the original file and return a special sub class of
> posixfile. This subclass would forward the written data to the copy and on close() do the rename.
>
> In most of the other places opener(xxx , 'a') would be replaced with appender(xxx).
>
If it does really happen often, then perhaps a LD_PRELOAD solution
would be more suitable,
and portable to other apps.
regards,
Benoit
More information about the Mercurial
mailing list