# HG changeset patch # User Zbynek Winkler # Date 1129683447 25200 # Node ID 9a70776e355e0d200379e30a5c8a03da59d20ff0 # Parent 3f76ac60130d4dbebeaed8498165b2e049b370e1 Try to use ini-file in the same directory as the exe as the default on NT. diff -r 3f76ac60130d -r 9a70776e355e mercurial/util.py --- a/mercurial/util.py Tue Oct 18 17:56:50 2005 -0700 +++ b/mercurial/util.py Tue Oct 18 17:57:27 2005 -0700 @@ -370,8 +370,17 @@ # Platform specific variants if os.name == 'nt': nulldev = 'NUL:' + + try: + import win32api, win32process + filename = win32process.GetModuleFileNameEx(win32api.GetCurrentProcess(), 0) + systemrc = os.path.join(os.path.dirname(filename), 'mercurial.ini') + + except ImportError: + systemrc = r'c:\mercurial\mercurial.ini' + pass - rcpath = (r'c:\mercurial\mercurial.ini', + rcpath = (systemrc, os.path.join(os.path.expanduser('~'), 'mercurial.ini')) def parse_patch_output(output_line):