Mercurial > hg
changeset 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 | ab595920de0e |
files | mercurial/rcutil.py tests/test-config-env.py |
diffstat | 2 files changed, 1 insertions(+), 8 deletions(-) [+] |
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
--- a/tests/test-config-env.py Sun Dec 29 21:06:34 2019 -0500 +++ b/tests/test-config-env.py Sun Dec 29 21:10:04 2019 -0500 @@ -36,7 +36,6 @@ return [join(b'userrc')] -extensions.wrapfunction(rcutil, 'defaultrcpath', lambda orig: []) extensions.wrapfunction(rcutil, 'default_rc_resources', lambda orig: []) rcutil.systemrcpath = systemrcpath