Show More
@@ -801,7 +801,11 b" if os.name == 'nt':" | |||||
801 |
|
801 | |||
802 | def user_rcpath(): |
|
802 | def user_rcpath(): | |
803 | '''return os-specific hgrc search path to the user dir''' |
|
803 | '''return os-specific hgrc search path to the user dir''' | |
804 | path = [os.path.join(os.path.expanduser('~'), 'mercurial.ini')] |
|
804 | try: | |
|
805 | userrc = user_rcpath_win32() | |||
|
806 | except: | |||
|
807 | userrc = os.path.join(os.path.expanduser('~'), 'mercurial.ini') | |||
|
808 | path = [userrc] | |||
805 | userprofile = os.environ.get('USERPROFILE') |
|
809 | userprofile = os.environ.get('USERPROFILE') | |
806 | if userprofile: |
|
810 | if userprofile: | |
807 | path.append(os.path.join(userprofile, 'mercurial.ini')) |
|
811 | path.append(os.path.join(userprofile, 'mercurial.ini')) |
@@ -187,7 +187,7 b' def system_rcpath_win32():' | |||||
187 | filename = win32api.GetModuleFileName(0) |
|
187 | filename = win32api.GetModuleFileName(0) | |
188 | return [os.path.join(os.path.dirname(filename), 'mercurial.ini')] |
|
188 | return [os.path.join(os.path.dirname(filename), 'mercurial.ini')] | |
189 |
|
189 | |||
190 | def user_rcpath(): |
|
190 | def user_rcpath_win32(): | |
191 | '''return os-specific hgrc search path to the user dir''' |
|
191 | '''return os-specific hgrc search path to the user dir''' | |
192 | userdir = os.path.expanduser('~') |
|
192 | userdir = os.path.expanduser('~') | |
193 | if userdir == '~': |
|
193 | if userdir == '~': |
General Comments 0
You need to be logged in to leave comments.
Login now