eliminate win32.user_rcpath_win32()
authorAdrian Buehlmann <adrian@cadifra.com>
Mon, 14 Feb 2011 11:13:05 +0100
changeset 13379 67743d5f49b6
parent 13378 244772f67ac1
child 13380 d11405848abd
eliminate win32.user_rcpath_win32()
mercurial/win32.py
mercurial/windows.py
--- a/mercurial/win32.py	Mon Feb 14 11:12:57 2011 +0100
+++ b/mercurial/win32.py	Mon Feb 14 11:13:05 2011 +0100
@@ -222,12 +222,6 @@
         raise ctypes.WinError(_ERROR_INSUFFICIENT_BUFFER)
     return buf.value
 
-def user_rcpath_win32():
-    '''return os-specific hgrc search path to the user dir'''
-    userdir = os.path.expanduser('~')
-    return [os.path.join(userdir, 'mercurial.ini'),
-            os.path.join(userdir, '.hgrc')]
-
 def getuser():
     '''return name of current user'''
     adv = ctypes.windll.advapi32
--- a/mercurial/windows.py	Mon Feb 14 11:12:57 2011 +0100
+++ b/mercurial/windows.py	Mon Feb 14 11:13:05 2011 +0100
@@ -107,12 +107,9 @@
 
 def user_rcpath():
     '''return os-specific hgrc search path to the user dir'''
-    try:
-        path = user_rcpath_win32()
-    except:
-        home = os.path.expanduser('~')
-        path = [os.path.join(home, 'mercurial.ini'),
-                os.path.join(home, '.hgrc')]
+    home = os.path.expanduser('~')
+    path = [os.path.join(home, 'mercurial.ini'),
+            os.path.join(home, '.hgrc')]
     userprofile = os.environ.get('USERPROFILE')
     if userprofile:
         path.append(os.path.join(userprofile, 'mercurial.ini'))