diff mercurial/scmposix.py @ 22583:23c995ed466b

config: don't read the same config file twice In some cases some config files would be read twice and shown twice in showconfig --debug.
author Mads Kiilerich <madski@unity3d.com>
date Thu, 04 Sep 2014 21:36:35 +0200
parents 4c6f7f0dadab
children 39087ee88835
line wrap: on
line diff
--- a/mercurial/scmposix.py	Mon Sep 29 23:23:44 2014 -0700
+++ b/mercurial/scmposix.py	Thu Sep 04 21:36:35 2014 +0200
@@ -21,7 +21,8 @@
     # 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, root)))
+        if p != '/':
+            path.extend(_rcfiles(os.path.join(p, root)))
     path.extend(_rcfiles('/' + root))
     return path