mercurial/util.py
changeset 1343 0f4e53e8c66b
parent 1329 8f06817bf266
child 1377 854775b27d1a
equal deleted inserted replaced
1342:5a42da1db402 1343:0f4e53e8c66b
   424         return "exited with status %d" % code, code
   424         return "exited with status %d" % code, code
   425 
   425 
   426 else:
   426 else:
   427     nulldev = '/dev/null'
   427     nulldev = '/dev/null'
   428 
   428 
   429     rcpath = map(os.path.normpath,
   429     hgrcd = '/etc/mercurial/hgrc.d'
   430                  ('/etc/mercurial/hgrc', os.path.expanduser('~/.hgrc')))
   430     hgrcs = []
       
   431     if os.path.isdir(hgrcd):
       
   432         hgrcs = [f for f in os.listdir(hgrcd) if f.endswith(".rc")]
       
   433     rcpath = map(os.path.normpath, hgrcs +
       
   434                  ['/etc/mercurial/hgrc', os.path.expanduser('~/.hgrc')])
   431 
   435 
   432     def parse_patch_output(output_line):
   436     def parse_patch_output(output_line):
   433         """parses the output produced by patch and returns the file name"""
   437         """parses the output produced by patch and returns the file name"""
   434         return output_line[14:]
   438         return output_line[14:]
   435 
   439