##// 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 b" if os.name == 'nt':"
799 except:
799 except:
800 return [r'c:\mercurial\mercurial.ini']
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 def user_rcpath():
802 def user_rcpath():
810 '''return os-specific hgrc search path to the user dir'''
803 '''return os-specific hgrc search path to the user dir'''
811 path = [os.path.join(os.path.expanduser('~'), 'mercurial.ini')]
804 path = [os.path.join(os.path.expanduser('~'), 'mercurial.ini')]
@@ -898,13 +891,6 b' else:'
898 pass
891 pass
899 return rcs
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 def system_rcpath():
894 def system_rcpath():
909 path = []
895 path = []
910 # old mod_python does not set sys.argv
896 # old mod_python does not set sys.argv
@@ -1391,6 +1377,13 b' def walkrepos(path):'
1391
1377
1392 _rcpath = None
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 def rcpath():
1387 def rcpath():
1395 '''return hgrc search path. if env var HGRCPATH is set, use it.
1388 '''return hgrc search path. if env var HGRCPATH is set, use it.
1396 for each item in path, if directory, use files ending in .rc,
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