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

Re: svn commit: rev 5663 - in trunk/subversion: include libsvn_client libsvn_subr libsvn_wc

From: Greg Stein <gstein_at_lyra.org>
Date: 2003-04-18 01:13:58 CEST

On Thu, Apr 17, 2003 at 04:15:55PM -0500, kfogel@tigris.org wrote:
>...
> +++ trunk/subversion/libsvn_client/delete.c Thu Apr 17 16:15:53 2003
> @@ -48,9 +48,20 @@
>
> SVN_ERR (svn_io_check_path (path, &kind, pool));
> if (kind == svn_node_dir)
> - SVN_ERR (svn_wc_adm_retrieve (&dir_access, adm_access, path, pool));
> + {
> + svn_error_t *err = svn_wc_adm_retrieve (&dir_access, adm_access, path,
> + pool);
> + if (err)
> + {
> + svn_error_clear (err);
> + SVN_ERR (svn_wc_adm_open (&dir_access, adm_access,
> + path, TRUE, TRUE, pool));
> + }

The _open will lock the whole tree. If you simply retrieve, do you get the
whole tree?

If the retrieve works (if you don't need the whole tree), then the _open
should not lock the whole tree, right?

>...
> +++ trunk/subversion/libsvn_wc/adm_ops.c Thu Apr 17 16:15:53 2003
> @@ -702,6 +702,7 @@
> void *notify_baton,
> apr_pool_t *pool)
> {
> + svn_error_t *err;
> svn_wc_adm_access_t *dir_access;
> const svn_wc_entry_t *entry;
> const char *parent, *base_name;
> @@ -709,10 +710,24 @@
> svn_node_kind_t was_kind;
> svn_boolean_t was_deleted = FALSE; /* Silence a gcc uninitialized warning */
>
> - /* ### do we really need to retrieve? */
> - SVN_ERR (svn_wc_adm_probe_retrieve (&dir_access, adm_access, path, pool));
> + err = svn_wc_adm_probe_retrieve (&dir_access, adm_access, path, pool);
> + if (err)
> + {
> + svn_error_clear (err);
> + err = svn_wc_adm_probe_open (&dir_access, adm_access,
> + path, TRUE, TRUE,
> + svn_wc_adm_access_pool (adm_access));
> + }
> +
> + if (err)
> + {
> + svn_error_clear (err);
> + dir_access = NULL;
> + entry = NULL;
> + }
> + else
> + SVN_ERR (svn_wc_entry (&entry, path, dir_access, FALSE, pool));
>
> - SVN_ERR (svn_wc_entry (&entry, path, dir_access, FALSE, pool));
> if (!entry)
> return erase_unversioned_from_wc (path, cancel_func, cancel_baton, pool);

This logic is different. Before, if there was a failure retrieving the
access baton, the function would simply return. Now, if you get a failure,
then 'entry' is set to NULL and we continue with the function.

>...

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Apr 18 01:14:11 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.