Mercurial > hg
diff mercurial/rcutil.py @ 44032:2d4cad94d08a
rcutil: drop the `defaultrcpath()` method (API)
The resource based code can service py2, py3 and an oxidized executable, so
there's no reason to leave this around. It was flagged as an API change when it
was introduced, so flagging it again.
Differential Revision: https://phab.mercurial-scm.org/D7777
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 29 Dec 2019 21:10:04 -0500 |
parents | 1864efbe90d9 |
children | 238790674d69 |
line wrap: on
line diff
--- a/mercurial/rcutil.py Sun Dec 29 21:06:34 2019 -0500 +++ b/mercurial/rcutil.py Sun Dec 29 21:10:04 2019 -0500 @@ -61,12 +61,6 @@ return result -def defaultrcpath(): - '''return rc paths in defaultrc''' - defaultpath = os.path.join(resourceutil.datapath, b'defaultrc') - return _expandrcpath(defaultpath) - - def default_rc_resources(): """return rc resource IDs in defaultrc""" rsrcs = resourceutil.contents(b'mercurial.defaultrc') @@ -107,7 +101,7 @@ normpaths = lambda paths: [ (b'path', os.path.normpath(p)) for p in paths ] - _rccomponents.extend(normpaths(defaultrcpath() + systemrcpath())) + _rccomponents.extend(normpaths(systemrcpath())) _rccomponents.append(envrc) _rccomponents.extend(normpaths(userrcpath())) return _rccomponents