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

login
register
mail settings
Submitter phabricator
Date Dec. 30, 2019, 5:43 a.m.
Message ID <differential-rev-PHID-DREV-5h3sbfe3u6vydql6tmpj-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/44118/
State Superseded
Headers show

Comments

phabricator - Dec. 30, 2019, 5:43 a.m.
mharbison72 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

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