comparison mercurial/util_win32.py @ 6153:09a8be3e5bfb

Also search for .hgrc if mercurial.ini not found on windows
author Stefan Rank <strank(AT)strank(DOT)info>
date Wed, 20 Feb 2008 21:31:42 +0100
parents e45de0f47215
children e75aab656f46
comparison
equal deleted inserted replaced
6152:c050548307a4 6153:09a8be3e5bfb
253 # We are on win < nt: fetch the APPDATA directory location and use 253 # We are on win < nt: fetch the APPDATA directory location and use
254 # the parent directory as the user home dir. 254 # the parent directory as the user home dir.
255 appdir = shell.SHGetPathFromIDList( 255 appdir = shell.SHGetPathFromIDList(
256 shell.SHGetSpecialFolderLocation(0, shellcon.CSIDL_APPDATA)) 256 shell.SHGetSpecialFolderLocation(0, shellcon.CSIDL_APPDATA))
257 userdir = os.path.dirname(appdir) 257 userdir = os.path.dirname(appdir)
258 return os.path.join(userdir, 'mercurial.ini') 258 return [os.path.join(userdir, 'mercurial.ini'),
259 os.path.join(userdir, '.hgrc')]
259 260
260 class posixfile_nt(object): 261 class posixfile_nt(object):
261 '''file object with posix-like semantics. on windows, normal 262 '''file object with posix-like semantics. on windows, normal
262 files can not be deleted or renamed if they are open. must open 263 files can not be deleted or renamed if they are open. must open
263 with win32file.FILE_SHARE_DELETE. this flag does not exist on 264 with win32file.FILE_SHARE_DELETE. this flag does not exist on