tests/test-issue842
author Bryan O'Sullivan <bos@serpentine.com>
Fri, 08 May 2009 15:52:26 -0700
changeset 8330 7de68012f86e
parent 6336 4b0c9c674707
child 8452 cb93eee1fbcd
permissions -rwxr-xr-x
Windows: improve performance via buffered I/O The posixfile_nt code hits the win32 file API directly, which essentially amounts to performing a system call for every read and write. This is slow. We add a C extension that lets us use a Python file object instead, but preserve our desired POSIX-like semantics (the ability to rename or delete a file that is being accessed). If the C extension is not available (e.g. in a VPS environment without a compiler), we fall back to the posixfile_nt code.

hg init test
cd test
echo foo > a
hg ci -Ama

hg up -r0000
echo bar > a
echo % should issue warning
hg ci -Amb

hg up -r0000
echo stuffy > a
echo % should not issue warning
hg ci -q -Amc

hg up -r0000
echo crap > a
hg branch testing
echo % should not issue warning
hg ci -q -Amd