[PATCH 2 of 3] move os_rcpath from util to scmutil

Adrian Buehlmann adrian at cadifra.com
Thu Apr 21 14:46:30 CDT 2011


# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1303412085 -7200
# Node ID c41e96d3c681a71f2044c92a3e4e3870aaa8c847
# Parent  2c685a3fbae5ded461c9cd5516c4ceb74b871b1a
move os_rcpath from util to scmutil

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -296,6 +296,13 @@
                         newdirs.append(d)
             dirs[:] = newdirs
 
+def os_rcpath():
+    '''return default os-specific hgrc search path'''
+    path = util.system_rcpath()
+    path.extend(util.user_rcpath())
+    path = [os.path.normpath(f) for f in path]
+    return path
+
 _rcpath = None
 
 def rcpath():
@@ -319,5 +326,5 @@
                 else:
                     _rcpath.append(p)
         else:
-            _rcpath = util.os_rcpath()
+            _rcpath = os_rcpath()
     return _rcpath
diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -1083,13 +1083,6 @@
     except (UnicodeDecodeError, UnicodeEncodeError):
         return _ellipsis(text, maxlength)[0]
 
-def os_rcpath():
-    '''return default os-specific hgrc search path'''
-    path = system_rcpath()
-    path.extend(user_rcpath())
-    path = [os.path.normpath(f) for f in path]
-    return path
-
 def bytecount(nbytes):
     '''return byte count formatted as readable string, with units'''
 


More information about the Mercurial-devel mailing list