D7624: rcutil: don't check if defaultrc/ is a directory -- we know it is

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Thu Dec 12 18:44:34 EST 2019


martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D7624

AFFECTED FILES
  mercurial/rcutil.py

CHANGE DETAILS

diff --git a/mercurial/rcutil.py b/mercurial/rcutil.py
--- a/mercurial/rcutil.py
+++ b/mercurial/rcutil.py
@@ -63,11 +63,8 @@
 
 def defaultrcpath():
     '''return rc paths in defaultrc'''
-    path = []
     defaultpath = os.path.join(resourceutil.datapath, b'defaultrc')
-    if os.path.isdir(defaultpath):
-        path = _expandrcpath(defaultpath)
-    return path
+    return _expandrcpath(defaultpath)
 
 
 def rccomponents():



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


More information about the Mercurial-devel mailing list