D7777: rcutil: drop the `defaultrcpath()` method (API)
mharbison72 (Matt Harbison)
phabricator at mercurial-scm.org
Wed Jan 8 19:51:54 UTC 2020
Closed by commit rHG2d4cad94d08a: rcutil: drop the `defaultrcpath()` method (API) (authored by mharbison72).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D7777?vs=19008&id=19106
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D7777/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D7777
AFFECTED FILES
mercurial/rcutil.py
tests/test-config-env.py
CHANGE DETAILS
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 @@
return [join(b'userrc')]
-extensions.wrapfunction(rcutil, 'defaultrcpath', lambda orig: [])
extensions.wrapfunction(rcutil, 'default_rc_resources', lambda orig: [])
rcutil.systemrcpath = systemrcpath
diff --git a/mercurial/rcutil.py b/mercurial/rcutil.py
--- a/mercurial/rcutil.py
+++ b/mercurial/rcutil.py
@@ -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
To: mharbison72, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list