comparison mercurial/rcutil.py @ 43674: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
comparison
equal deleted inserted replaced
43673:f0bee3b1b847 43674:5be909dbe385
12 from . import ( 12 from . import (
13 encoding, 13 encoding,
14 pycompat, 14 pycompat,
15 util, 15 util,
16 ) 16 )
17
18 from .utils import resourceutil
17 19
18 if pycompat.iswindows: 20 if pycompat.iswindows:
19 from . import scmwindows as scmplatform 21 from . import scmwindows as scmplatform
20 else: 22 else:
21 from . import scmposix as scmplatform 23 from . import scmposix as scmplatform
60 62
61 63
62 def defaultrcpath(): 64 def defaultrcpath():
63 '''return rc paths in defaultrc''' 65 '''return rc paths in defaultrc'''
64 path = [] 66 path = []
65 defaultpath = os.path.join(util.datapath, b'defaultrc') 67 defaultpath = os.path.join(resourceutil.datapath, b'defaultrc')
66 if os.path.isdir(defaultpath): 68 if os.path.isdir(defaultpath):
67 path = _expandrcpath(defaultpath) 69 path = _expandrcpath(defaultpath)
68 return path 70 return path
69 71
70 72