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

Re: (resend) [rfc/patch] : #933,#735 import syntax, mkdir -p

From: <cmpilato_at_collab.net>
Date: 2003-06-11 07:50:20 CEST

David Kimdon <dwhedon@debian.org> writes:

> yup, and that is what I am using. My question is mostly, "Does this
> look safe?" I think it looks good, but another set of eyes would be
> appreciated. I have included the chunk in question below.
>
> Index: subversion/libsvn_client/commit.c
> ===================================================================
> --- subversion/libsvn_client/commit.c (revision 6178)
> +++ subversion/libsvn_client/commit.c (working copy)
> @@ -457,6 +492,8 @@
> svn_boolean_t is_commit,
> apr_pool_t *pool)
> {
> + svn_node_kind_t kind;
> +
> /* Get the RA vtable that matches URL. */
> SVN_ERR (svn_ra_init_ra_libs (ra_baton, pool));
> SVN_ERR (svn_ra_get_ra_library (ra_lib, *ra_baton,
> @@ -469,6 +506,14 @@
> is_commit, !is_commit,
> ctx, pool));
>
> + SVN_ERR ((*ra_lib)->check_path (&kind, *session, "", SVN_INVALID_REVNUM,
> + pool));
> +
> + if (kind == svn_node_none)
> + return svn_error_createf (SVN_ERR_FS_NO_SUCH_ENTRY, NULL,
> + "the path '%s' does not exist",
> + base_url);
> +
> /* Fetch the latest revision if requested. */
> if (latest_rev)
> SVN_ERR ((*ra_lib)->get_latest_revnum (*session, latest_rev, pool));

This is only for import, right? So at the very least, you'll want to
make the RA->check_path() call conditional on (! is_commit). We don't
want to make *any* unnecessary roundtrips to the server. Also, I
confess to not remembering why you need the check_path() in the first
place -- but then, I haven't reviewed your entire patch.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jun 11 07:51:19 2003

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.