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

Re: svn commit: r27170 - trunk/subversion/libsvn_wc

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: 2007-10-13 21:44:11 CEST

Ben Collins-Sussman wrote:
> Index: subversion/libsvn_ra/ra_loader.c
> ===================================================================
> --- subversion/libsvn_ra/ra_loader.c (revision 27173)
> +++ subversion/libsvn_ra/ra_loader.c (working copy)
> @@ -621,6 +621,11 @@
> apr_hash_t **props,
> apr_pool_t *pool)
> {
> + if (*path == "/")
> + return svn_error_create
> + (SVN_ERR_RA_ILLEGAL_URL, NULL,
> + _("svn_ra_get_file was passed an absolute path."));
> +
> return session->vtable->get_file(session, path, revision, stream,
> fetched_rev, props, pool);
> }
>

Bah, this would be an API violation, so just make every RA function that
accepts a session-url-relative path do:

   assert(! (path && (*path == '/')));

None of this garbage of returning an error that the user winds up seeing on
his terminal and wondering, "What did I do wrong, and how do I fix it?"

-- 
C. Michael Pilato <cmpilato@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on Sat Oct 13 21:44:19 2007

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.