# HG changeset patch # User Matt Harbison # Date 1577671804 18000 # 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 -r 1864efbe90d9 -r 2d4cad94d08a mercurial/rcutil.py --- 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 diff -r 1864efbe90d9 -r 2d4cad94d08a tests/test-config-env.py --- 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