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

Re: Issue with merging files containing spaces

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Tue, 02 Sep 2008 13:59:26 -0400

Matthew Inger wrote:
> I'm running into an issue when doing branch merges. It seems that file
> names with spaces in them
> cannot properly be merged, resulting in the merging error:
>
> svn: URL 'http://host/svn/repos/trunk/dir with spaces/file.txt' is
> malformed or the scheme or host or path is missing.
>
> I've isolated down the cause of the problem to the following function:
>
> int ne_uri_parse(const char *uri, ne_uri *parsed);
>
> It seems that when trying to parse the path component, it is doing the
> following:
>
> while (uri_lookup(*p) & URI_SEGCHAR)
> p++;
>
>
> The problem here is that definition of URI_SEGCHAR includes only the
> following:
>
> FS -- /
> PC -- %
> PS -- +
> SD -- ! $ & ' ( ) * + , ; =
> CL -- :
> AL -- Alpabet
> DG -- Digit
> DS -- dash
> DT -- .
> US -- _
> TD -- ~
>
> Notice that spaces are not included in this definition.
>
> So the solution is either to change how neon parses the URI, or to
> properly escape the spaces with a "+" symbol
> in the "session.c" file which is calling into the neon library.
>
> Any thoughts?

Subversion should be properly URI-encoding the paths it sends through Neon,
and apparently it is not. That's a bug. (Though, the correct URI encoded
form of a space character is "%20" -- the plus sign is, I believe, only for
when the space occurs in the query parameters portion of a URL, not the path
part.)

-- 
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-09-02 19:59:50 CEST

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