[PATCH 3 of 5] Fix casing of Mercurial.ini
Mads Kiilerich
mads at kiilerich.com
Mon Oct 6 13:01:26 UTC 2008
# HG changeset patch
# User Mads Kiilerich <mads at kiilerich.com>
# Date 1223296883 -7200
# Node ID 3cbcd6409ea39af45e8859f237379a1b46418215
# Parent 2a6ba24d149bbfda03c5a60ba19e5af2b96f66d7
Fix casing of Mercurial.ini
Documentation says that Mercurial looks for C:\Mercurial\Mercurial.ini and
Mercurial.ini. But it didn't. Now it does.
In best case that was confusing and ugly, in worst case it could cause problems
on case sensitive file systems.
diff --git a/contrib/win32/mercurial.ini b/contrib/win32/Mercurial.ini
rename from contrib/win32/mercurial.ini
rename to contrib/win32/Mercurial.ini
diff --git a/contrib/win32/ReadMe.html b/contrib/win32/ReadMe.html
--- a/contrib/win32/ReadMe.html
+++ b/contrib/win32/ReadMe.html
@@ -52,7 +52,7 @@
<h4>Default editor</h4>
The default editor for commit messages is 'notepad'. You can set the EDITOR
(or HGEDITOR) environment variable to specify your preference or set it in
- mercurial.ini:
+ Mercurial.ini:
<pre>
[ui]
editor = whatever
@@ -63,7 +63,7 @@
Merge at the file level, neither does it make any attempt to Resolve the conflicts.
By default, Mercurial will use the merge program defined by the HGMERGE environment
- variable, or uses the one defined in the mercurial.ini file. (see <a href="http://www.selenic.com/mercurial/wiki/index.cgi/MergeProgram">MergeProgram</a> on the Mercurial Wiki for more information)
+ variable, or uses the one defined in the Mercurial.ini file. (see <a href="http://www.selenic.com/mercurial/wiki/index.cgi/MergeProgram">MergeProgram</a> on the Mercurial Wiki for more information)
<h1>Reporting problems</h1>
diff --git a/contrib/win32/mercurial.iss b/contrib/win32/mercurial.iss
--- a/contrib/win32/mercurial.iss
+++ b/contrib/win32/mercurial.iss
@@ -32,7 +32,7 @@
Source: contrib\vim\*.*; DestDir: {app}/Contrib/Vim
Source: contrib\zsh_completion; DestDir: {app}/Contrib
Source: contrib\win32\ReadMe.html; DestDir: {app}; Flags: isreadme
-Source: contrib\win32\mercurial.ini; DestDir: {app}; DestName: Mercurial.ini; Flags: confirmoverwrite
+Source: contrib\win32\Mercurial.ini; DestDir: {app}; DestName: Mercurial.ini; Flags: confirmoverwrite
Source: contrib\win32\postinstall.txt; DestDir: {app}; DestName: ReleaseNotes.txt
Source: dist\hg.exe; DestDir: {app}; AfterInstall: Touch('{app}\hg.exe.local')
Source: dist\library.zip; DestDir: {app}
diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -1036,7 +1036,7 @@
try:
return system_rcpath_win32()
except:
- return [r'c:\mercurial\mercurial.ini']
+ return [r'C:\Mercurial\Mercurial.ini']
def user_rcpath():
'''return os-specific hgrc search path to the user dir'''
@@ -1044,11 +1044,11 @@
path = user_rcpath_win32()
except:
home = os.path.expanduser('~')
- path = [os.path.join(home, 'mercurial.ini'),
+ path = [os.path.join(home, 'Mercurial.ini'),
os.path.join(home, '.hgrc')]
userprofile = os.environ.get('USERPROFILE')
if userprofile:
- path.append(os.path.join(userprofile, 'mercurial.ini'))
+ path.append(os.path.join(userprofile, 'Mercurial.ini'))
path.append(os.path.join(userprofile, '.hgrc'))
return path
diff --git a/mercurial/util_win32.py b/mercurial/util_win32.py
--- a/mercurial/util_win32.py
+++ b/mercurial/util_win32.py
@@ -222,8 +222,8 @@
filename = win32process.GetModuleFileNameEx(proc, 0)
except:
filename = win32api.GetModuleFileName(0)
- # Use mercurial.ini found in directory with hg.exe
- progrc = os.path.join(os.path.dirname(filename), 'mercurial.ini')
+ # Use Mercurial.ini found in directory with hg.exe
+ progrc = os.path.join(os.path.dirname(filename), 'Mercurial.ini')
if os.path.isfile(progrc):
return [progrc]
# else look for a system rcpath in the registry
@@ -251,7 +251,7 @@
appdir = shell.SHGetPathFromIDList(
shell.SHGetSpecialFolderLocation(0, shellcon.CSIDL_APPDATA))
userdir = os.path.dirname(appdir)
- return [os.path.join(userdir, 'mercurial.ini'),
+ return [os.path.join(userdir, 'Mercurial.ini'),
os.path.join(userdir, '.hgrc')]
class posixfile_nt(object):
More information about the Mercurial-devel
mailing list