[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: Karl Fogel <kfogel_at_red-bean.com>
Date: Mon, 21 Apr 2008 13:24:07 -0400

"C. Michael Pilato" <cmpilato_at_collab.net> writes:
> 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?

Seems reasonable to me. svn_ra_get_file() doesn't promise a particular
error in the non-file case, but we could fix that, obviously.

---------------------------------------------------------------------
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 08:07:33 CEST

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