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

Re: 'svn cat' turning around too many times

From: David Glasser <glasser_at_davidglasser.net>
Date: Mon, 21 Apr 2008 10:53:23 -0700

On Mon, Apr 21, 2008 at 9:51 AM, C. Michael Pilato <cmpilato_at_collab.net> wrote:
> I noticed this today (in libsvn_client/cat.c:svn_client_cat2):
>
> /* Make sure the object isn't a directory. */
> SVN_ERR(svn_ra_check_path(ra_session, "", rev, &url_kind, pool));
> if (url_kind == svn_node_dir)
> return svn_error_createf(SVN_ERR_CLIENT_IS_DIRECTORY, NULL,
> _("URL '%s' refers to a directory"), url);
>
> /* Grab some properties we need to know in order to figure out if anything
> special needs to be done with this file. */
> SVN_ERR(svn_ra_get_file(ra_session, "", rev, NULL, NULL, &props, pool));
>
> Do we really need that svn_ra_check_path call (and its associated network
> traffic)? I mean, it seems svn_ra_get_file() could raise the appropriate
> "this thing isn't a file" error code if asked to operate on a non-file. Is
> there something I'm overlooking?

Well, as long as you make sure that all current implementations of
svn_ra_get_file raise the right error code against all mod_dav_svn and
svnserve versions going back to 1.0, of course.

--dave

-- 
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-04-22 09:20:10 CEST

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.