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

Re: [PATCH][RFC] allow local file:// URLs for svnadmin

From: David Glasser <glasser_at_davidglasser.net>
Date: Fri, 4 Dec 2009 16:22:26 -0800

Another difference between RA URLs and repos filesystem paths is that
RA URLs can contain directories inside the repository.

So you'd have to figure out the semantics there. If somebody
specifies file:///path/to/repos/then/subdir, is it equivalent to
path/to/repos? Or an error? Either way is likely to be confusing to
somebody.

(I'm generally in the "not a good idea" camp here.)

--dave

On Fri, Dec 4, 2009 at 6:35 AM, Vincent Legoll <vincent.legoll_at_gmail.com> wrote:
> Hello,
>
> would such kind of patch be acceptable or is this useless ?
>
> I think there's nothing preventing svnadmin to accept local
> file:// URLs as repository location parameter. So why not ?
>
> The attached patch, is probably wrong (you tell me) as my
> C is a bit rusty, but should show the intended change...
>
> Comments, reviews, flames, etc... All gladly accepted.
>
> If this is deemed useful, I'll especially would like directions
> on how to improve the patch to make it suitable for a real
> submission...
>
> --
> Vincent Legoll
>
> ###################### Inline ########################
>
> --- a/main.c
> +++ b/main.c
> @@ -133,6 +133,15 @@ parse_local_repos_path(apr_getopt_t *os,
>     }
>   else if (svn_path_is_url(*repos_path))
>     {
> +         #define URL_LOCAL_FILE_PREFIX "file://"
> +         if (strncmp(*repos_path, URL_LOCAL_FILE_PREFIX,
> +                         strlen(URL_LOCAL_FILE_PREFIX)))
> +         {
> +                 *repos_path = svn_dirent_internal_style(*repos_path +
> +                                 strlen(URL_LOCAL_FILE_PREFIX), pool);
> +                 return SVN_NO_ERROR;
> +         }
> +
>       return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
>                                _("'%s' is an URL when it should be a path"),
>                                *repos_path);
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2427043
>
> Please start new threads on the <dev_at_subversion.apache.org> mailing list.
> To subscribe to the new list, send an empty e-mail to <dev-subscribe_at_subversion.apache.org>.

-- 
glasser_at_davidglasser.net | langtonlabs.org | flickr.com/photos/glasser/
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2427298
Please start new threads on the <dev_at_subversion.apache.org> mailing list.
To subscribe to the new list, send an empty e-mail to <dev-subscribe_at_subversion.apache.org>.
Received on 2009-12-05 01:23:01 CET

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.