changeset 44137:e4344e463c0c stable 5.3rc1

packaging: rename hgrc.d to defaultrc for Windows config files next to the exe The code and the help still says that it will read hgrc.d next to the executable. But this directory needs to exist to read the resource based config files. Otherwise even `hg version` errors out: $ /c/Program\ Files/Mercurial/hg.exe version Traceback (most recent call last): File "hg", line 43, in <module> File "mercurial\dispatch.pyc", line 110, in run File "mercurial\dispatch.pyc", line 226, in dispatch File "mercurial\ui.pyc", line 308, in load File "mercurial\rcutil.pyc", line 99, in rccomponents File "mercurial\rcutil.pyc", line 69, in default_rc_resources File "mercurial\utils\resourceutil.pyc", line 84, in contents WindowsError: [Error 3] The system cannot find the path specified: 'c:\\Program Files\\mercurial\\defaultrc\\*.*' Differential Revision: https://phab.mercurial-scm.org/D7981
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 24 Jan 2020 01:37:18 -0500
parents a90039b07343
children a53aa9eb7710
files contrib/packaging/hgpackaging/py2exe.py contrib/packaging/hgpackaging/wix.py contrib/packaging/inno/mercurial.iss contrib/packaging/wix/mercurial.wxs
diffstat 4 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/packaging/hgpackaging/py2exe.py	Fri Jan 24 01:11:19 2020 -0500
+++ b/contrib/packaging/hgpackaging/py2exe.py	Fri Jan 24 01:37:18 2020 -0500
@@ -45,7 +45,7 @@
     ('doc/*.html', 'doc/'),
     ('doc/style.css', 'doc/'),
     ('mercurial/helptext/**/*.txt', 'helptext/'),
-    ('mercurial/defaultrc/*.rc', 'hgrc.d/'),
+    ('mercurial/defaultrc/*.rc', 'defaultrc/'),
     ('mercurial/locale/**/*', 'locale/'),
     ('mercurial/templates/**/*', 'Templates/'),
     ('COPYING', 'Copying.txt'),
@@ -232,7 +232,7 @@
 
     # Write out a default editor.rc file to configure notepad as the
     # default editor.
-    with (staging_dir / 'hgrc.d' / 'editor.rc').open(
+    with (staging_dir / 'defaultrc' / 'editor.rc').open(
         'w', encoding='utf-8'
     ) as fh:
         fh.write('[ui]\neditor = notepad\n')
--- a/contrib/packaging/hgpackaging/wix.py	Fri Jan 24 01:11:19 2020 -0500
+++ b/contrib/packaging/hgpackaging/wix.py	Fri Jan 24 01:37:18 2020 -0500
@@ -37,7 +37,7 @@
 
 EXTRA_INSTALL_RULES = [
     ('contrib/packaging/wix/COPYING.rtf', 'COPYING.rtf'),
-    ('contrib/win32/mercurial.ini', 'hgrc.d/mercurial.rc'),
+    ('contrib/win32/mercurial.ini', 'defaultrc/mercurial.rc'),
 ]
 
 STAGING_REMOVE_FILES = [
--- a/contrib/packaging/inno/mercurial.iss	Fri Jan 24 01:11:19 2020 -0500
+++ b/contrib/packaging/inno/mercurial.iss	Fri Jan 24 01:37:18 2020 -0500
@@ -51,7 +51,7 @@
 
 [UninstallDelete]
 Type: files; Name: {app}\Mercurial.url
-Type: filesandordirs; Name: {app}\hgrc.d
+Type: filesandordirs; Name: {app}\defaultrc
 
 [Icons]
 Name: {group}\Uninstall Mercurial; Filename: {uninstallexe}
--- a/contrib/packaging/wix/mercurial.wxs	Fri Jan 24 01:11:19 2020 -0500
+++ b/contrib/packaging/wix/mercurial.wxs	Fri Jan 24 01:37:18 2020 -0500
@@ -99,7 +99,7 @@
         <ComponentRef Id='MainExecutable' />
         <ComponentRef Id='ProgramMenuDir' />
         <ComponentGroupRef Id="hg.group.ROOT" />
-        <ComponentGroupRef Id="hg.group.hgrc.d" />
+        <ComponentGroupRef Id="hg.group.defaultrc" />
         <ComponentGroupRef Id="hg.group.helptext" />
         <ComponentGroupRef Id="hg.group.lib" />
         <ComponentGroupRef Id="hg.group.templates" />