[PATCH 2 of 3] obsolete: append new markers to obsstore file instead of rewriting everything

Adrian Buehlmann adrian at cadifra.com
Mon Jul 16 01:58:05 CDT 2012


On 2012-07-16 02:09, Pierre-Yves David wrote:
> 
> On 16 juil. 2012, at 00:13, Adrian Buehlmann wrote:
> 
>> On 2012-07-16 00:01, Eduard-Cristian Stefan wrote:
>>> On 2012-07-16 00:12, Adrian Buehlmann wrote:
>>>> Yeah. Windows fun again.
>>>>
>>>> It turns out that file objects on Windows [1] seem to behave strangely,
>>>> compared to Linux: after f = open(..., 'ab'), f.tell() returns 0L on
>>>> Windows for nonzero (!) files, whereas on Linux, it returns the size of
>>>> the file.
>>>>
>>>> [1] as seen here with Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC
>>>> v.1500 64 bit (AMD64)] on win32)
>>>>
>>>> This hack lets test-obsolete.t pass for me on Windows:
>>>> ...
>>>
>>> With this patch test-obsolete.t passes on my PC too.
>>>
>>
>> Thanks. Tracking this at http://bz.selenic.com/show_bug.cgi?id=3543
> 
> Thanks for tracking this bug. Can you patchbomb a proper patch once you stabilized a generic fix ?
> 

Yes, that was my intention. I've thus assigned the bug to myself.

Matt made an excellent, important comment here:
http://bz.selenic.com/show_bug.cgi?id=3543#c2

Quoting one sentence of Matt's quoting:

"If no I/O operation has yet occurred on a file opened for appending,
the file position is the beginning of the file."

I've cc'ed you on that bugtracker entry. I propose we keep the
discussion there. Proposals for definitve patches will be sent to the
mailing list, of course.



More information about the Mercurial-devel mailing list