mercurial/util.py
changeset 6153 09a8be3e5bfb
parent 6140 47e6d5d5913a
child 6166 f857eac30cd5
equal deleted inserted replaced
6152:c050548307a4 6153:09a8be3e5bfb
   966             return [r'c:\mercurial\mercurial.ini']
   966             return [r'c:\mercurial\mercurial.ini']
   967 
   967 
   968     def user_rcpath():
   968     def user_rcpath():
   969         '''return os-specific hgrc search path to the user dir'''
   969         '''return os-specific hgrc search path to the user dir'''
   970         try:
   970         try:
   971             userrc = user_rcpath_win32()
   971             path = user_rcpath_win32()
   972         except:
   972         except:
   973             userrc = os.path.join(os.path.expanduser('~'), 'mercurial.ini')
   973             home = os.path.expanduser('~')
   974         path = [userrc]
   974             path = [os.path.join(home, 'mercurial.ini'),
       
   975                     os.path.join(home, '.hgrc')]
   975         userprofile = os.environ.get('USERPROFILE')
   976         userprofile = os.environ.get('USERPROFILE')
   976         if userprofile:
   977         if userprofile:
   977             path.append(os.path.join(userprofile, 'mercurial.ini'))
   978             path.append(os.path.join(userprofile, 'mercurial.ini'))
       
   979             path.append(os.path.join(userprofile, '.hgrc'))
   978         return path
   980         return path
   979 
   981 
   980     def parse_patch_output(output_line):
   982     def parse_patch_output(output_line):
   981         """parses the output produced by patch and returns the file name"""
   983         """parses the output produced by patch and returns the file name"""
   982         pf = output_line[14:]
   984         pf = output_line[14:]