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

'svn cat' turning around too many times

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Mon, 21 Apr 2008 12:51:06 -0400

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?

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

Received on 2008-04-22 07:34:29 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.