##// END OF EJS Templates
Combined the two os_rcpath methods into a single one near rcpath in mercurial/util.py...
Shane Holloway -
r4097:403c4ddd default
parent child Browse files
Show More
@@ -799,13 +799,6 if os.name == 'nt':
799 799 except:
800 800 return [r'c:\mercurial\mercurial.ini']
801 801
802 def os_rcpath():
803 '''return default os-specific hgrc search path'''
804 path = system_rcpath()
805 path.extend(user_rcpath())
806 path = [os.path.normpath(f) for f in path]
807 return path
808
809 802 def user_rcpath():
810 803 '''return os-specific hgrc search path to the user dir'''
811 804 path = [os.path.join(os.path.expanduser('~'), 'mercurial.ini')]
@@ -898,13 +891,6 else:
898 891 pass
899 892 return rcs
900 893
901 def os_rcpath():
902 '''return default os-specific hgrc search path'''
903 path = system_rcpath()
904 path.extend(user_rcpath())
905 path = [os.path.normpath(f) for f in path]
906 return path
907
908 894 def system_rcpath():
909 895 path = []
910 896 # old mod_python does not set sys.argv
@@ -1391,6 +1377,13 def walkrepos(path):
1391 1377
1392 1378 _rcpath = None
1393 1379
1380 def os_rcpath():
1381 '''return default os-specific hgrc search path'''
1382 path = system_rcpath()
1383 path.extend(user_rcpath())
1384 path = [os.path.normpath(f) for f in path]
1385 return path
1386
1394 1387 def rcpath():
1395 1388 '''return hgrc search path. if env var HGRCPATH is set, use it.
1396 1389 for each item in path, if directory, use files ending in .rc,
General Comments 0
You need to be logged in to leave comments. Login now