mercurial/util.py
changeset 2280 09ed44225571
parent 2278 3711e23ab10a
child 2284 d6392a7c03dd
equal deleted inserted replaced
2279:51bfa0fd3a33 2280:09ed44225571
   533         except:
   533         except:
   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         return system_rcpath() + [os.path.join(os.path.expanduser('~'),
   538         path = system_rcpath()
   539                                                'mercurial.ini')]
   539         path.append(os.path.join(os.path.expanduser('~'), 'mercurial.ini'))
       
   540         userprofile = os.environ.get('USERPROFILE')
       
   541         if userprofile:
       
   542             path.append(os.path.join(userprofile, 'mercurial.ini'))
       
   543         return path
   540 
   544 
   541     def parse_patch_output(output_line):
   545     def parse_patch_output(output_line):
   542         """parses the output produced by patch and returns the file name"""
   546         """parses the output produced by patch and returns the file name"""
   543         pf = output_line[14:]
   547         pf = output_line[14:]
   544         if pf[0] == '`':
   548         if pf[0] == '`':