[Patch] clarifying "hg help paths"
Bill Barry
after.fallout at gmail.com
Wed Jan 21 10:19:40 CST 2009
From: Bill Barry <after.fallout at gmail.com>
clarifying documentation for paths
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2111,13 +2111,19 @@
displayer.show(repo[n])
def paths(ui, repo, search=None):
- """show definition of symbolic path names
+ """show aliases for remote repositories
Show definition of symbolic path name NAME. If no name is given, show
definition of available names.
Path names are defined in the [paths] section of /etc/mercurial/hgrc
and $HOME/.hgrc. If run inside a repository, .hg/hgrc is used, too.
+
+ Two paths are important to know about:
+ * 'default' is the default path alias used to push to or pull from.
+ If a repository is created with "hg clone" then the "default" path
+ is automatically set to the location of the source repository.
+ * 'default-push' overrides 'default' for pushing if it exists.
"""
if search:
for name, path in ui.configitems("paths"):
@@ -2180,6 +2186,10 @@
Compression yes
Alternatively specify "ssh -C" as your ssh command in your hgrc or
with the --ssh command line option.
+
+ Paths can also be defined in your hgrc and then you can use the
+ path alias here. If source is omitted the default path alias is used.
+ See "hg help paths" for more info.
"""
source, revs, checkout = hg.parseurl(ui.expandpath(source),
opts.get('rev'))
cmdutil.setremoteconfig(ui, opts)
@@ -2227,6 +2237,11 @@
Pushing to http:// and https:// URLs is only possible, if this
feature is explicitly enabled on the remote Mercurial server.
+
+ Paths can also be defined in your hgrc and then you can use the path
+ alias here. If a path is omitted, the default-push path alias is first
+ looked for, followed by the default path alias to be used as the
+ destination. See "hg help paths" for more info.
"""
dest, revs, checkout = hg.parseurl(
ui.expandpath(dest or 'default-push', dest or 'default'),
opts.get('rev'))
More information about the Mercurial
mailing list