diff mercurial/rcutil.py @ 43715:5be909dbe385

util: remove datapath and swith users over to resourceutil The util module no longer needs the datapath for injecting it into the i18n module, so we can remove it from there and update other users. Differential Revision: https://phab.mercurial-scm.org/D7436
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 14 Nov 2019 13:18:22 -0800
parents 02fe8dedab8c
children 86fe85364811
line wrap: on
line diff
--- a/mercurial/rcutil.py	Thu Nov 14 12:41:33 2019 -0800
+++ b/mercurial/rcutil.py	Thu Nov 14 13:18:22 2019 -0800
@@ -15,6 +15,8 @@
     util,
 )
 
+from .utils import resourceutil
+
 if pycompat.iswindows:
     from . import scmwindows as scmplatform
 else:
@@ -62,7 +64,7 @@
 def defaultrcpath():
     '''return rc paths in defaultrc'''
     path = []
-    defaultpath = os.path.join(util.datapath, b'defaultrc')
+    defaultpath = os.path.join(resourceutil.datapath, b'defaultrc')
     if os.path.isdir(defaultpath):
         path = _expandrcpath(defaultpath)
     return path