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

Re: Possible 1.4 bug with spaces in a repository name

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2006-09-22 21:29:46 CEST

On 9/22/06, Garrett Rooney <rooneg@electricjellyfish.net> wrote:
> On 9/22/06, Peter Johnson <peter.johnson@unified.co.uk> wrote:
> > Hi There
> >
> > Using version 1.4 on a Windows box talking to 1.4 svnserve, I get the following
> > error when using a repository with spaces in the name. This used to work OK on
> > 1.3:
> >
> > svn ls "svn://localhost/Test Repo"
> > svn: 'svn://localhost/Test Repo' is not the same repository
> > as 'svn://localhost/Test%20Repo'
> >
> > svn ls svn://localhost/Test%20Repo
> > svn: 'svn://localhost/Test Repo' is not the same repository
> > as 'svn://localhost/Test%20Repo'
> >
> > I originally reported this as an error with TortoiseSVN, but it seems to be
> > Subversion at fault.
>
> It looks like a bug. I'm able to reproduce it here with the trunk
> version of svn. I'l look into fixing it, but just in case I don't
> manage to figure it out would you mind filing an issue about it? If
> you can't no big deal, just let me know and I'll file it myself.

Actually, never mind, I think I found the problem. There are two
places in svnserve where it doesn't uri decode the argument to the
get_fs_path function. The following patch should fix it (and does
here):

Index: subversion/svnserve/serve.c
===================================================================
--- subversion/svnserve/serve.c (revision 21604)
+++ subversion/svnserve/serve.c (working copy)
@@ -502,7 +502,8 @@
   path = svn_path_canonicalize(path, pool);
   url = svn_path_uri_decode(svn_path_canonicalize(url, pool), pool);
   if (!b->err)
- b->err = get_fs_path(b->repos_url, url, &fs_path, pool);
+ b->err = get_fs_path(svn_path_uri_decode(b->repos_url, pool), url,
+ &fs_path, pool);
   if (!b->err)
     b->err = svn_repos_link_path2(b->report_baton, path, fs_path, rev,
                                   start_empty, lock_token, pool);
@@ -710,7 +711,8 @@
   SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "c", &url));
   url = svn_path_uri_decode(svn_path_canonicalize(url, pool), pool);
   SVN_ERR(trivial_auth_request(conn, pool, b));
- SVN_CMD_ERR(get_fs_path(b->repos_url, url, &fs_path, pool));
+ SVN_CMD_ERR(get_fs_path(svn_path_uri_decode(b->repos_url, pool), url,
+ &fs_path, pool));
   svn_stringbuf_set(b->fs_path, fs_path);
   SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, ""));
   return SVN_NO_ERROR;

I'll probably commit this or something like it soon, and propose it
for backport to 1.4.x.

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Sep 22 21:30:31 2006

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

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