Commit Graph

15 Commits

Author SHA1 Message Date
Matt Mackall
a30eb02911 cmdutils: Take over glob expansion duties from util 2009-05-24 16:38:29 -05:00
Henrik Stuart
fa95cc9642 windows: make openhardlinks work
Despite the intention, openhardlinks would always evaluate to False.
2009-05-23 19:57:25 +02:00
Sune Foldager
adc90b2605 posixfile: remove posixfile_nt and fix import bug in windows.py
The posixfile_nt class has been superseded by posixfile in osutils.c,
which works on Windows NT and above. All other systems get the regular
python file class which is assigned to posixfile in posix.py (for POSIX)
and in the pure python version of osutils.py (for Win 9x or Windows NT
in pure mode).
2009-05-13 21:36:16 +02:00
Henrik Stuart
f69c330ac1 windows: avoid deleting non-empty reparse points
If a hg repository including working directory is a reparse point (directory
symlinked or a junction point), then using os.removedirs will remove the
reparse point erroneously. This is fixed by only removing directories if they
are empty.
2009-05-12 15:50:44 +02:00
Bryan O'Sullivan
3054118009 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.
2009-05-08 15:52:26 -07:00
Simon Heimberg
09ac1e6c92 separate import lines from mercurial and general python modules 2009-04-28 17:40:46 +02:00
Martin Geisler
8e4bc1e9ad put license and copyright info into comment blocks 2009-04-26 01:13:08 +02:00
Martin Geisler
750183bdad updated license to be explicit about GPL version 2 2009-04-26 01:08:54 +02:00
Matt Mackall
d60aaf81dc windows: get Abort from error 2009-04-03 14:52:03 -05:00
Martin Geisler
df38a73894 windows: break import cycle with util 2009-04-02 18:04:42 +02:00
Sune Foldager
a909400362 windows: fix missing import of util.Abort 2009-04-02 17:09:17 +02:00
Sune Foldager
9aaf69227a windows: fix import of win32.py (was util_win32.py) 2009-04-02 16:49:34 +02:00
Steve Borho
582e7e6612 windows: add various missing import 2009-03-26 23:02:21 -05:00
Steve Borho
67420334f3 windows: hoist expand_glob() back into util.py
The windows version of expand_glob() requires patkind(). To
avoid a circular dependency, move function back into util.py.
2009-03-26 22:07:01 -05:00
Matt Mackall
0952760f82 util: split out posix, windows, and win32 modules 2009-03-26 13:54:44 -05:00