# HG changeset patch # User Matt Harbison # Date 2019-12-30 02:10:04 # Node ID 2d4cad94d08a706a080338a014da1f44fd9eff77 # Parent 1864efbe90d9f3d918e6aa234ad375a6eba5569c 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 diff --git a/mercurial/rcutil.py b/mercurial/rcutil.py --- a/mercurial/rcutil.py +++ b/mercurial/rcutil.py @@ -61,12 +61,6 @@ def envrcitems(env=None): 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 @@ def rccomponents(): 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 diff --git a/tests/test-config-env.py b/tests/test-config-env.py --- a/tests/test-config-env.py +++ b/tests/test-config-env.py @@ -36,7 +36,6 @@ def userrcpath(): return [join(b'userrc')] -extensions.wrapfunction(rcutil, 'defaultrcpath', lambda orig: []) extensions.wrapfunction(rcutil, 'default_rc_resources', lambda orig: []) rcutil.systemrcpath = systemrcpath