mercurial/scmutil.py
changeset 16383 f5dd179bfa4a
parent 16379 5cbfbb838198
child 16390 4df76d5506a9
--- a/mercurial/scmutil.py	Sun Apr 08 22:17:51 2012 -0500
+++ b/mercurial/scmutil.py	Sun Apr 08 12:43:41 2012 -0700
@@ -436,15 +436,22 @@
 
     def systemrcpath():
         path = []
+        if sys.platform == 'plan9':
+            root = '/lib/mercurial'
+        else:
+            root = '/etc/mercurial'
         # old mod_python does not set sys.argv
         if len(getattr(sys, 'argv', [])) > 0:
             p = os.path.dirname(os.path.dirname(sys.argv[0]))
-            path.extend(rcfiles(os.path.join(p, 'etc/mercurial')))
-        path.extend(rcfiles('/etc/mercurial'))
+            path.extend(rcfiles(os.path.join(p, root)))
+        path.extend(rcfiles(root))
         return path
 
     def userrcpath():
-        return [os.path.expanduser('~/.hgrc')]
+        if sys.platform == 'plan9':
+            return [os.environ['home'] + '/lib/hgrc']
+        else:
+            return [os.path.expanduser('~/.hgrc')]
 
 else: