[PATCH RFC] help: refer to user configuration file more consistently
Brodie Rao
brodie at bitheap.org
Sat Aug 28 02:38:43 UTC 2010
# HG changeset patch
# User Brodie Rao <brodie at bitheap.org>
# Date 1282962995 14400
# Node ID 3764a71cdb8c395b2cb02aaf34e1c2b240f8b2be
# Parent 6449be7b8a3b96f06e7376f983035efcb189c30e
help: refer to user configuration file more consistently
Currently, a number of commands and help topics mention the user hgrc
file in different ways. Among these are following:
1. .hgrc - "please specify your commit editor/username in your .hgrc
file", bookmarks, color, hgk, pager, hg help environment
2. $HOME/.hgrc - hg help paths, hgrc(5), hg(1)
3. ~/.hgrc - hgrc(5)
In addition to being inconsistent, none of these make sense on
Windows. This patch replaces the above with a more general term of
"[your] configuration file".
diff -r 6449be7b8a3b -r 3764a71cdb8c hgext/bookmarks.py
--- a/hgext/bookmarks.py Wed Aug 25 23:26:18 2010 +0100
+++ b/hgext/bookmarks.py Fri Aug 27 22:36:35 2010 -0400
@@ -18,7 +18,7 @@ It is possible to use bookmark names in
By default, when several bookmarks point to the same changeset, they
will all move forward together. It is possible to obtain a more
git-like experience by adding the following configuration option to
-your .hgrc::
+your configuration file::
[bookmarks]
track.current = True
diff -r 6449be7b8a3b -r 3764a71cdb8c hgext/color.py
--- a/hgext/color.py Wed Aug 25 23:26:18 2010 +0100
+++ b/hgext/color.py Fri Aug 27 22:36:35 2010 -0400
@@ -29,7 +29,7 @@ also available. Effects are rendered wit
function (aka ANSI escape codes). This module also provides the
render_text function, which can be used to add effects to any text.
-Default effects may be overridden from the .hgrc file::
+Default effects may be overridden from your configuration file::
[color]
status.modified = blue bold underline red_background
diff -r 6449be7b8a3b -r 3764a71cdb8c hgext/hgk.py
--- a/hgext/hgk.py Wed Aug 25 23:26:18 2010 +0100
+++ b/hgext/hgk.py Fri Aug 27 22:36:35 2010 -0400
@@ -19,7 +19,7 @@ repository, and needs to be enabled.
The :hg:`view` command will launch the hgk Tcl script. For this command
to work, hgk must be in your search path. Alternately, you can specify
-the path to hgk in your .hgrc file::
+the path to hgk in your configuration file::
[hgk]
path=/location/of/hgk
diff -r 6449be7b8a3b -r 3764a71cdb8c hgext/pager.py
--- a/hgext/pager.py Wed Aug 25 23:26:18 2010 +0100
+++ b/hgext/pager.py Fri Aug 27 22:36:35 2010 -0400
@@ -5,7 +5,7 @@
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
#
-# To load the extension, add it to your .hgrc file:
+# To load the extension, add it to your configuration file:
#
# [extension]
# pager =
@@ -46,7 +46,7 @@ paged.
If pager.attend is present, pager.ignore will be ignored.
To ignore global commands like :hg:`version` or :hg:`help`, you have
-to specify them in the global .hgrc
+to specify them in your user configuration file.
'''
import sys, os, signal, shlex, errno
diff -r 6449be7b8a3b -r 3764a71cdb8c mercurial/commands.py
--- a/mercurial/commands.py Wed Aug 25 23:26:18 2010 +0100
+++ b/mercurial/commands.py Fri Aug 27 22:36:35 2010 -0400
@@ -1335,7 +1335,8 @@ def debuginstall(ui):
if patchproblems:
if ui.config('ui', 'patch'):
ui.write(_(" (Current patch tool may be incompatible with patch,"
- " or misconfigured. Please check your .hgrc file)\n"))
+ " or misconfigured. Please check your configuration"
+ " file)\n"))
else:
ui.write(_(" Internal patcher failure, please report this error"
" to http://mercurial.selenic.com/bts/\n"))
@@ -1351,10 +1352,12 @@ def debuginstall(ui):
if not cmdpath:
if editor == 'vi':
ui.write(_(" No commit editor set and can't find vi in PATH\n"))
- ui.write(_(" (specify a commit editor in your .hgrc file)\n"))
+ ui.write(_(" (specify a commit editor in your configuration"
+ " file)\n"))
else:
ui.write(_(" Can't find editor '%s' in PATH\n") % editor)
- ui.write(_(" (specify a commit editor in your .hgrc file)\n"))
+ ui.write(_(" (specify a commit editor in your configuration"
+ " file)\n"))
problems += 1
# check username
@@ -1363,7 +1366,7 @@ def debuginstall(ui):
ui.username()
except util.Abort, e:
ui.write(" %s\n" % e)
- ui.write(_(" (specify a username in your .hgrc file)\n"))
+ ui.write(_(" (specify a username in your configuration file)\n"))
problems += 1
if not problems:
@@ -2724,8 +2727,8 @@ def paths(ui, repo, search=None):
Show definition of symbolic path name NAME. If no name is given,
show definition of all available names.
- Path names are defined in the [paths] section of
- ``/etc/mercurial/hgrc`` and ``$HOME/.hgrc``. If run inside a
+ Path names are defined in the [paths] section of your
+ configuration file and in ``/etc/mercurial/hgrc``. If run inside a
repository, ``.hg/hgrc`` is used, too.
The path names ``default`` and ``default-push`` have a special
@@ -2960,11 +2963,11 @@ def resolve(ui, repo, *pats, **opts):
"""redo merges or set/view the merge status of files
Merges with unresolved conflicts are often the result of
- non-interactive merging using the ``internal:merge`` hgrc setting,
- or a command-line merge tool like ``diff3``. The resolve command
- is used to manage the files involved in a merge, after :hg:`merge`
- has been run, and before :hg:`commit` is run (i.e. the working
- directory must have two parents).
+ non-interactive merging using the ``internal:merge`` configuration
+ setting, or a command-line merge tool like ``diff3``. The resolve
+ command is used to manage the files involved in a merge, after
+ :hg:`merge` has been run, and before :hg:`commit` is run (i.e. the
+ working directory must have two parents).
The resolve command can be used in the following ways:
diff -r 6449be7b8a3b -r 3764a71cdb8c mercurial/help/diffs.txt
--- a/mercurial/help/diffs.txt Wed Aug 25 23:26:18 2010 +0100
+++ b/mercurial/help/diffs.txt Fri Aug 27 22:36:35 2010 -0400
@@ -25,5 +25,5 @@ format for communicating changes.
To make Mercurial produce the git extended diff format, use the --git
option available for many commands, or set 'git = True' in the [diff]
-section of your hgrc. You do not need to set this option when
-importing diffs in this format or using them in the mq extension.
+section of your configuration file. You do not need to set this option
+when importing diffs in this format or using them in the mq extension.
diff -r 6449be7b8a3b -r 3764a71cdb8c mercurial/help/environment.txt
--- a/mercurial/help/environment.txt Wed Aug 25 23:26:18 2010 +0100
+++ b/mercurial/help/environment.txt Fri Aug 27 22:36:35 2010 -0400
@@ -8,7 +8,7 @@ HG
HGEDITOR
This is the name of the editor to run when committing. See EDITOR.
- (deprecated, use .hgrc)
+ (deprecated, use configuration file)
HGENCODING
This overrides the default locale setting detected by Mercurial.
@@ -29,13 +29,13 @@ HGMERGE
will be executed with three arguments: local file, remote file,
ancestor file.
- (deprecated, use .hgrc)
+ (deprecated, use configuration file)
HGRCPATH
- A list of files or directories to search for hgrc files. Item
- separator is ":" on Unix, ";" on Windows. If HGRCPATH is not set,
- platform default search path is used. If empty, only the .hg/hgrc
- from the current repository is read.
+ A list of files or directories to search for configuration
+ files. Item separator is ":" on Unix, ";" on Windows. If HGRCPATH
+ is not set, platform default search path is used. If empty, only
+ the .hg/hgrc from the current repository is read.
For each element in HGRCPATH:
@@ -43,9 +43,9 @@ HGRCPATH
- otherwise, the file itself will be added
HGPLAIN
- When set, this disables any options in .hgrc that might change
- Mercurial's default output. This includes encoding, defaults,
- verbose mode, debug mode, quiet mode, tracebacks, and
+ When set, this disables any configuration settings that might
+ change Mercurial's default output. This includes encoding,
+ defaults, verbose mode, debug mode, quiet mode, tracebacks, and
localization. This can be useful when scripting against Mercurial
in the face of existing user configuration.
@@ -57,12 +57,12 @@ HGUSER
available values will be considered in this order:
- HGUSER (deprecated)
- - hgrc files from the HGRCPATH
+ - configuration files from the HGRCPATH
- EMAIL
- interactive prompt
- LOGNAME (with ``@hostname`` appended)
- (deprecated, use .hgrc)
+ (deprecated, use configuration file)
EMAIL
May be used as the author of a commit; see HGUSER.
diff -r 6449be7b8a3b -r 3764a71cdb8c mercurial/help/extensions.txt
--- a/mercurial/help/extensions.txt Wed Aug 25 23:26:18 2010 +0100
+++ b/mercurial/help/extensions.txt Fri Aug 27 22:36:35 2010 -0400
@@ -11,9 +11,9 @@ for prime time; or they may alter some u
Mercurial. It is thus up to the user to activate extensions as
needed.
-To enable the "foo" extension, either shipped with Mercurial or in
-the Python search path, create an entry for it in your hgrc, like
-this::
+To enable the "foo" extension, either shipped with Mercurial or in the
+Python search path, create an entry for it in your configuration file,
+like this::
[extensions]
foo =
@@ -23,8 +23,8 @@ You may also specify the full path to an
[extensions]
myfeature = ~/.hgext/myfeature.py
-To explicitly disable an extension enabled in an hgrc of broader
-scope, prepend its path with !::
+To explicitly disable an extension enabled in a configuration file of
+broader scope, prepend its path with !::
[extensions]
# disabling extension bar residing in /path/to/extension/bar.py
diff -r 6449be7b8a3b -r 3764a71cdb8c mercurial/help/urls.txt
--- a/mercurial/help/urls.txt Wed Aug 25 23:26:18 2010 +0100
+++ b/mercurial/help/urls.txt Fri Aug 27 22:36:35 2010 -0400
@@ -35,11 +35,11 @@ Some notes about using SSH with Mercuria
Host *
Compression yes
- Alternatively specify "ssh -C" as your ssh command in your hgrc or
- with the --ssh command line option.
+ Alternatively specify "ssh -C" as your ssh command in your
+ configuration file or with the --ssh command line option.
-These URLs can all be stored in your hgrc with path aliases under the
-[paths] section like so::
+These URLs can all be stored in your configuration file with path
+aliases under the [paths] section like so::
[paths]
alias1 = URL1
More information about the Mercurial-devel
mailing list