diff mercurial/util.py @ 1292:141951276ba1

Use platform-appropriate rc file names.
author Bryan O'Sullivan <bos@serpentine.com>
date Wed, 21 Sep 2005 09:56:30 -0700
parents 1546c2aa6b30
children a6ffcebd3315
line wrap: on
line diff
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -45,7 +45,7 @@ def patch(strip, patchname, ui):
     if code:
         raise Abort("patch command failed: exit status %s " % code)
     return files.keys()
-    
+
 def binary(s):
     """return true if a string is binary data using diff's heuristic"""
     if s and '\0' in s[:4096]:
@@ -331,6 +331,9 @@ else:
 if os.name == 'nt':
     nulldev = 'NUL:'
 
+    rcpath = (r'c:\mercurial\mercurial.ini',
+              os.path.join(os.path.expanduser('~'), 'mercurial.ini'))
+
     def parse_patch_output(output_line):
         """parses the output produced by patch and returns the file name"""
         pf = output_line[14:]
@@ -383,6 +386,9 @@ if os.name == 'nt':
 else:
     nulldev = '/dev/null'
 
+    rcpath = map(os.path.normpath,
+                 ('/etc/mercurial/hgrc', os.path.expanduser('~/.hgrc')))
+
     def parse_patch_output(output_line):
         """parses the output produced by patch and returns the file name"""
         return output_line[14:]