[PATCH] issue 1364

Petr Kodl petrkodl at gmail.com
Mon Oct 27 12:39:08 CDT 2008


On Mon, Oct 27, 2008 at 12:49 PM, Andrei Vermel <andrei.vermel at gmail.com>wrote:

> > The patch posted works as far as 'it does not break' anything, but
> testing
> on the
> > actual machine that shows the original problem would definitely help.
>
> I confirm that Petr's patch fixes the problem on my kit.
> The patch appears to be corrupted by mailer though, I had to edit it to
> apply.


I looked through the fstat call variants in CRT source - they seem to be
'broken' the same way in both VC7 (2003) and VC9 (2008) - which covers the
compilation platforms used by current Python distributions from 2.3 -> 3.0.
In order to make the code behave the same way as they do we would have to
replicate their approach:

FILETIME -> LOCAL FILE TIME -> SYSTEM TIME -> custom conversion to UTC time

The code manipulates the timezone globals along the way by using several
undocumented internal functions - not very nice code to look at in general.
It also uses custom calculation of time conversions that
are different than NT kernel level versions.

Comparing to reimplementation of this mess both options bellow look very
clean ;-(.

1) do nothing and disable the fast osutil.c for Python <= 2.4
2) use the patch I submitted

pk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://selenic.com/pipermail/mercurial-devel/attachments/20081027/766cb02c/attachment.htm 


More information about the Mercurial-devel mailing list