mercurial/util.py
changeset 2284 d6392a7c03dd
parent 2280 09ed44225571
child 2308 cb520d961d6a
equal deleted inserted replaced
2283:e506c14382fd 2284:d6392a7c03dd
   534             return [r'c:\mercurial\mercurial.ini']
   534             return [r'c:\mercurial\mercurial.ini']
   535 
   535 
   536     def os_rcpath():
   536     def os_rcpath():
   537         '''return default os-specific hgrc search path'''
   537         '''return default os-specific hgrc search path'''
   538         path = system_rcpath()
   538         path = system_rcpath()
   539         path.append(os.path.join(os.path.expanduser('~'), 'mercurial.ini'))
   539         path.append(user_rcpath())
   540         userprofile = os.environ.get('USERPROFILE')
   540         userprofile = os.environ.get('USERPROFILE')
   541         if userprofile:
   541         if userprofile:
   542             path.append(os.path.join(userprofile, 'mercurial.ini'))
   542             path.append(os.path.join(userprofile, 'mercurial.ini'))
   543         return path
   543         return path
       
   544 
       
   545     def user_rcpath():
       
   546          '''return os-specific hgrc search path to the user dir'''
       
   547          return os.path.join(os.path.expanduser('~'), 'mercurial.ini')
   544 
   548 
   545     def parse_patch_output(output_line):
   549     def parse_patch_output(output_line):
   546         """parses the output produced by patch and returns the file name"""
   550         """parses the output produced by patch and returns the file name"""
   547         pf = output_line[14:]
   551         pf = output_line[14:]
   548         if pf[0] == '`':
   552         if pf[0] == '`':