Vincent Legoll 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 ?
Let me ask a different question: Why? (We don't add features just
because we can, we add them because they are useful enough to be worth
the maintenance.)
I can think of a reason: it could be handy to copying URLs between "svn"
and "svnlook" and "svnadmin" commands. Is that your reason? Is there any
stronger reason? Would you add it to svnlook as well?
If you want to do this, remember that converting a URL to a local path
is not as simple as stripping off a prefix: there are at least two
different prefixes (file://localhost as well), and you have to un-escape
the URL escaping.
- Julian
> 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=2427054
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-04 15:50:42 CET