Commit Graph

39 Commits

Author SHA1 Message Date
Remy Roy
1ec1bfb70c Folding correction and missing import 2008-08-12 10:05:00 -04:00
Matt Mackall
59a536d380 util: disinfect lookup_reg strings (issue1126)
lookup_reg could return Unicode strings, which would infect other strings and
generate unexpected tracebacks. Spotted by Rémy Roy.

Fold in silly nested function while we're at it.
2008-08-10 22:55:00 -05:00
Joel Rosdahl
10088cb75f Add missing import of sys 2008-03-06 22:23:41 +01:00
Joel Rosdahl
4f8012378a Remove unused imports 2008-03-06 22:23:41 +01:00
Stefan Rank
e62243ce74 Also search for .hgrc if mercurial.ini not found on windows 2008-02-20 21:31:42 +01:00
Lee Cantey
2810a05ef6 util_win32: add missing valname param to query_val function 2008-02-03 23:08:16 -08:00
Matt Mackall
2c7d69802c merge: add registry look up bits to tool search 2008-02-03 19:29:05 -06:00
Matt Mackall
ba528333cb Merge with -stable 2008-01-31 14:44:00 -06:00
Matt Mackall
77a0b60046 win32: remove excessive flushing
Our Windows file code was flushing buffers from the operating system
to disk, rather than from the application to the operating system.
2008-01-30 17:30:34 -06:00
Patrick Mezard
37bb6e0440 util_win32: make os_link more robust (issue 761)
On mapped drives, os_link() manages to create links but nlink() does not report them.
2008-01-18 23:56:51 +01:00
Patrick Mezard
1fd102a610 Merge with crew-stable 2008-01-19 13:19:27 +01:00
Bryan O'Sullivan
6fcd086ced Merge with mpm 2008-01-11 16:51:54 -08:00
Patrick Mezard
9cefa1b27a util_win32: implement posixfile_nt.writelines()
Used by the keyword extension.
2008-01-11 21:20:27 +01:00
Matt Mackall
88e99c1e5f posixfile_nt: set closed early
Exceptions in __init__ may leave us with close undefined in __del__
2008-01-11 14:06:05 -06:00
Steve Borho
4b1652b29a win32: favor local mercurial.ini over registry key
Hopefully this is the best of both worlds. Multiple py2exe based
installers can coexist on one machine, while source and lib based
Mercurial users can still use a registry key in lieu of resorting to
HGRCPATH.
2007-12-05 22:57:35 -06:00
Patrick Mezard
8cbb871ee7 Merge with crew-stable 2007-12-04 23:28:10 +01:00
Patrick Mezard
a55f5fd7fe utils_win32: calling SHGetPathFromIDList under NT is useless and broken
The call was done under NT when running as a service (CGI script for instance) and always crash, even in interactive processes.
2007-12-04 23:10:13 +01:00
Steve Borho
6d589928ab win32: read system rcpath from registry
Using the module name was not always helpful.  It breaks down
when Mercurial is installed as source and when the Mercurial
libs are used by external applications.

This patch allows Mercurial installers to store the system wide
rcpath in the registry, where it can always be found.  HGRCPATH
is a poor option for storing the system wide rcpath, since it
overrides both the system and user rcpaths.
2007-12-02 17:15:03 +01:00
Shun-ichi GOTO
da82dc7d46 posixfile_nt: '+' should allow read access.
This fixes unexpected I/O error on committing many files
due to cset:f75d8ba770e0 (r4902 in crew).
2007-07-25 15:58:10 +09:00
Patrick Mezard
4a8150bcb8 posixfile_nt: '+' was understood as read mode instead of update. 2007-07-17 23:33:42 +02:00
Nathan Jones
8fc48b4f99 Fix serve on Windows without win32* modules. 2007-06-26 10:48:58 -04:00
Marcos Chaves
f5c072cbc9 Handle CTRL+C in serve under Windows. 2007-06-21 21:58:18 +02:00
Patrick Mezard
b4ca391b19 Move win32 find_in_files from util_win32 to util. 2007-05-06 16:40:53 +02:00
Patrick Mezard
5ec31f4a50 Fix find_in_path not including some file extension logic under win32.
Windows shell resolves utility path by combining PATH, the utility name and a set of file extensions from PATHEXT.
2007-04-28 11:43:31 +02:00
Alexis S. L. Carvalho
c235d44d85 util_win32.py: fix user_rcpath
Fixes issue504.
2007-02-16 05:53:03 -02:00
Matt Mackall
296d6a7cb8 Simplify i18n imports 2006-12-14 20:25:19 -06:00
Matt Mackall
f17a4e1934 Replace demandload with new demandimport 2006-12-13 13:27:09 -06:00
Benoit Boissinot
3bad25e752 only print a warning when no username is specified
- revert most of 8b55c0ba
- display the username during interactive commit
2006-11-28 21:16:05 +01:00
Benoit Boissinot
dc9483558a makes username mandatory 2006-10-18 22:24:03 +02:00
Vadim Gelfer
07de9b45fd fix windows username problem. 2006-07-24 09:11:26 -07:00
Vadim Gelfer
6144b74dd7 replace os.stat with os.lstat in some where. 2006-06-16 12:58:24 -07:00
Thomas Arendsen Hein
1d8afd83c1 Fixed typo (qshell instead of shell) in win98 code (see issue244). 2006-05-19 06:10:59 +02:00
Volker Kleinfeld
aa4b87446c win98: fall back to win32api.GetModuleFileName if needed. 2006-05-14 23:49:31 -07:00
Volker Kleinfeld
94db8d7fec On win98 os.path.expanuser('~') does not result in a useable directory.
The MSDN recommendation for user specific directories is the use of
shell.ShGetSpecialFolder, so use it.

For details see:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shgetspecialfolderpath.asp
2006-05-14 23:44:50 -07:00
Vadim Gelfer
20d2979fe8 windows: revlog.lazyparser not always safe to use.
can not use on windows < nt or if win32 api not available.
2006-05-10 11:10:18 -07:00
Christian Boos
58fa61b2c0 The posixfile implemented using the win32 API should be iterable. 2006-05-10 11:53:56 +02:00
Vadim Gelfer
fad839fb0b fix file handling bugs on windows.
add util.posixfile class that has posix semantics on windows.
fix util.rename so it works with stupid windows delete semantics.
2006-05-02 14:30:00 -07:00
Vadim Gelfer
acc87bc678 fix issue 217.
fall back to fixed path if windows >= nt function not present.
2006-04-25 08:37:05 -07:00
Vadim Gelfer
86b6b506c0 fix exception handling on windows.
move win32 code into util_win32.py.
2006-04-08 14:12:43 -07:00