[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: SVN strips port from svn+ssh URLs...

From: Justin Erenkrantz <justin_at_erenkrantz.com>
Date: 2005-04-20 20:36:23 CEST

--On Wednesday, April 20, 2005 10:12 AM -0600 Joseph Galbraith
<galb@vandyke.com> wrote:

> I know not all SSH clients support the user@host:port syntax,
> but I've one that does, and it would sure be nice if this
> didn't get stripped.
>
> Also, it is probably a bug that the :port part of the URL
> is silently ignored... at the very least, if it isn't
> going to be accepted, it should be rejected with an error
> instead of silently discarded.

In fact, I think find_tunnel_agent() in subversion/libsvn_ra_svn/client.c
should just take uri not the user and hostname args. Then, I'd switch the
following line from:

 (*argv)[n++] = (user) ? apr_psprintf(pool, "%s@%s", user, host) : host;

to:

if (uri.user && uri.port) {
 (*argv)[n++] = apr_psprintf(pool, "%s@%s:%d", uri.user, uri.host,
uri.port);
}
else if (uri.user) {
 (*argv)[n++] = apr_psprintf(pool, "%s@%s", uri.user, uri.host);
}
else {
 (*argv)[n++] = uri.host;
}

Be nice if someone submitted a proper patch and make sure it works. ;-)

HTH. -- justin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Apr 20 20:40:12 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.