diff mercurial/rcutil.py @ 32248:d74b0cff94a9

osutil: proxy through util (and platform) modules (API) See the previous commit for why. Marked as API change since osutil.listdir() seems widely used in third-party extensions. The win32mbcs extension is updated to wrap both util. and windows. aliases.
author Yuya Nishihara <yuya@tcha.org>
date Wed, 26 Apr 2017 22:26:28 +0900
parents bf5e13e38390
children 75979c8d4572
line wrap: on
line diff
--- a/mercurial/rcutil.py	Wed Apr 26 22:05:59 2017 +0900
+++ b/mercurial/rcutil.py	Wed Apr 26 22:26:28 2017 +0900
@@ -11,7 +11,6 @@
 
 from . import (
     encoding,
-    osutil,
     pycompat,
     util,
 )
@@ -30,7 +29,7 @@
     p = util.expandpath(path)
     if os.path.isdir(p):
         join = os.path.join
-        return [join(p, f) for f, k in osutil.listdir(p) if f.endswith('.rc')]
+        return [join(p, f) for f, k in util.listdir(p) if f.endswith('.rc')]
     return [p]
 
 def envrcitems(env=None):