Patchwork D7426: defaults: rename default.d to defaultrc to make it a valid package name

login
register
mail settings
Submitter phabricator
Date Nov. 15, 2019, 5:05 a.m.
Message ID <differential-rev-PHID-DREV-nspuyrra3y6n43s7mbnj-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/43264/
State Superseded
Headers show

Comments

phabricator - Nov. 15, 2019, 5:05 a.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  "default.d" is not a valid Python package name, and it needs to be a
  valid package name if we want to be able to load the files from here
  as resources.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/default.d/mergetools.rc
  mercurial/defaultrc/mergetools.rc
  mercurial/rcutil.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel
phabricator - Nov. 16, 2019, 7:02 p.m.
This revision is now accepted and ready to land.
indygreg added a comment.
indygreg accepted this revision.


  Presumably we'll need a new `__init__.py` and corresponding package entry in `setup.py`. But that can come later.

REPOSITORY
  rHG Mercurial

BRANCH
  default

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7426/new/

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

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

Patch

diff --git a/mercurial/rcutil.py b/mercurial/rcutil.py
--- a/mercurial/rcutil.py
+++ b/mercurial/rcutil.py
@@ -60,9 +60,9 @@ 
 
 
 def defaultrcpath():
-    '''return rc paths in default.d'''
+    '''return rc paths in defaultrc'''
     path = []
-    defaultpath = os.path.join(util.datapath, b'default.d')
+    defaultpath = os.path.join(util.datapath, b'defaultrc')
     if os.path.isdir(defaultpath):
         path = _expandrcpath(defaultpath)
     return path
diff --git a/mercurial/default.d/mergetools.rc b/mercurial/defaultrc/mergetools.rc
rename from mercurial/default.d/mergetools.rc
rename to mercurial/defaultrc/mergetools.rc