Patchwork D7777: rcutil: drop the `defaultrcpath()` method (API)

login
register
mail settings
Submitter phabricator
Date Jan. 8, 2020, 7:51 p.m.
Message ID <fa913cd804fda5c3d5070f2214a97a3b@localhost.localdomain>
Download mbox | patch
Permalink /patch/44209/
State Not Applicable
Headers show

Comments

phabricator - Jan. 8, 2020, 7:51 p.m.
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




To: mharbison72, #hg-reviewers
Cc: mercurial-devel

Patch

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