[PATCH 1 of 1] url: added support for scp/rsync style URLs for ssh
Thomas Arendsen Hein
thomas at intevation.de
Wed Apr 6 09:24:39 CDT 2011
* Martin Geisler <mg at aragost.com> [20110406 16:08]:
> Thomas Arendsen Hein <thomas at intevation.de> writes:
>
> > # HG changeset patch
> > # User Sascha Wilde <wilde at intevation.de>
> > # Date 1302096161 -7200
> > # Node ID 62833deea9f05f44021b401c8093ea86212ac197
> > # Parent 375872fdadba7266eced67c85e57ffda26fa7500
> > url: added support for scp/rsync style URLs for ssh
> >
> > URLs in the form <user>@<host>:<path> are normalized to the
> > default format: ssh://<user>@<host>/<path>
> >
> > This breaks the generic "just a scheme and a path" behavior of url.py,
> > but as it wasn't used by Mercurial (and there always used to be
> > exceptions) anyway it shouldn't be to much of a loss. So the removed
> > corresponding tests were removed.
>
> There is an extra "removed" in the commit message.
Sascha already found that and I removed it in my local queue.
> Apart from that I think this is great! I've also wanted this syntax and
> I've lots of users ask for it. Since we can support it with this elegant
> patch I think we should go for it! :)
Thanks :)
> > diff -r 375872fdadba -r 62833deea9f0 mercurial/help/urls.txt
> > --- a/mercurial/help/urls.txt Wed Apr 06 12:48:59 2011 +0200
> > +++ b/mercurial/help/urls.txt Wed Apr 06 15:22:41 2011 +0200
> > @@ -5,6 +5,7 @@
> > http://[user[:pass]@]host[:port]/[path][#revision]
> > https://[user[:pass]@]host[:port]/[path][#revision]
> > ssh://[user@]host[:port]/[path][#revision]
> > + [user@]host:[path]
> >
> > Paths in the local filesystem can either point to Mercurial
> > repositories or to bundle files (as created by :hg:`bundle` or :hg:`
> > @@ -40,6 +41,10 @@
> >
> > Alternatively specify "ssh -C" as your ssh command in your
> > configuration file or with the --ssh command line option.
> > +- For convenience Mercurial accepts SSH URLs of the for used by tools
> > + like scp and rsync:
>
> Should end i double-colon '::' to trigger a verbatim block.
Changed in local queue now, too.
> > +
> > + example.com:/tmp/repository
>
> > These URLs can all be stored in your configuration file with path
> > aliases under the [paths] section like so::
> > diff -r 375872fdadba -r 62833deea9f0 mercurial/url.py
> > --- a/mercurial/url.py Wed Apr 06 12:48:59 2011 +0200
> > +++ b/mercurial/url.py Wed Apr 06 15:22:41 2011 +0200
> > @@ -32,12 +32,19 @@
> > Note that for backward compatibility reasons, bundle URLs do not
> > take host names. That means 'bundle://../' has a path of '../'.
> >
> > + For extra convinience a special form for ssh URLs is recognised,
> > + similar to the one used by scp and rsync:
> > +
> > + <user>@<host>:<path>
> > +
>
> Same here.
The docstring does not use :: before
<scheme>://<user>:<passwd>@<host>:<port>/<path>?<query>#<fragment>
Should this be changed, too?
Regards,
Thomas
--
thomas at intevation.de - http://intevation.de/~thomas/ - OpenPGP key: 0x5816791A
Intevation GmbH, Neuer Graben 17, 49074 Osnabrueck - AG Osnabrueck, HR B 18998
Geschaeftsfuehrer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
More information about the Mercurial-devel
mailing list