Doc update: advertise the possibility to include a password in the URL
Andreas Hartmetz
ahartmetz at gmail.com
Fri Jun 27 19:28:44 CDT 2008
Hi all,
My name is Andreas Hartmetz and I'm new here. I have been using hg for a
couple of months, mostly to work on KDE using the mq extension.
I also try to push mercurial at KDE sometimes [we are not yet ready to move
away from svn] - lately some support seems to be building independently so
things are not looking too bad.
Anyhow...
I read the help of "hg push" which doesn't mention the possibility to specify
a password in the URL. While this is a standard "feature" of URLs I thought
hg wouldn't support it - because hg's documentation is usually very
thorough :)
As suggested by mpm on #mercurial here is a patch to include the possibility
of a password in the documentation:
diff -r f67d1468ac50 mercurial/commands.py
--- a/mercurial/commands.py Fri Jun 27 18:28:45 2008 -0500
+++ b/mercurial/commands.py Sat Jun 28 02:13:08 2008 +0200
@@ -2030,9 +2030,9 @@
Valid URLs are of the form:
local/filesystem/path (or file://local/filesystem/path)
- http://[user@]host[:port]/[path]
- https://[user@]host[:port]/[path]
- ssh://[user@]host[:port]/[path]
+ http://[user[:pass]@]host[:port]/[path]
+ https://[user[:pass]@]host[:port]/[path]
+ ssh://[user[:pass]@]host[:port]/[path]
static-http://host[:port]/[path]
Paths in the local filesystem can either point to Mercurial
@@ -2092,9 +2092,9 @@
Valid URLs are of the form:
local/filesystem/path (or file://local/filesystem/path)
- ssh://[user@]host[:port]/[path]
- http://[user@]host[:port]/[path]
- https://[user@]host[:port]/[path]
+ ssh://[user[:pass]@]host[:port]/[path]
+ http://[user[:pass]@]host[:port]/[path]
+ https://[user[:pass]@]host[:port]/[path]
An optional identifier after # indicates a particular branch, tag,
or changeset to push. If -r is used, the named changeset and all its
I hope you like it. You might argue that people are expected to know what you
can do with an URL. In that case you should consider not documenting
the "[user@]" part too, that would probably have led me to try user at host and
then user:pass at host ("they didn't document user@ so let's try user:pass
too").
Cheers,
Andreas
--
- This place reeks of adventure and excitement, Sam!
- I thought it was this tuna fish sandwich I found crawling with life in my
coat pocket.
More information about the Mercurial-devel
mailing list