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

Re: [PATCH] wc-ng: remove a use of svn_wc_entry_t from libsvn_client

From: Stefan Sperling <stsp_at_elego.de>
Date: Wed, 17 Feb 2010 19:29:33 +0100

On Wed, Feb 17, 2010 at 06:18:56PM +0000, Matthew Bentham wrote:
> Index: subversion/libsvn_wc/node.c
> ===================================================================
> --- subversion/libsvn_wc/node.c (revision 909397)
> +++ subversion/libsvn_wc/node.c (working copy)
> @@ -310,6 +310,32 @@
> db, local_abspath,
> scratch_pool, scratch_pool));
> }
> + else if (status == svn_wc__db_status_deleted)
> + {
> + const char *current_abspath = local_abspath;
> + apr_pool_t *iterpool = svn_pool_create(scratch_pool);
> + while (status == svn_wc__db_status_deleted)
> + {
> + svn_pool_clear(iterpool);
> + svn_dirent_split(current_abspath,
> + &current_abspath,
> + NULL, scratch_pool);
> +
> + SVN_ERR(svn_wc__db_read_info(&status, NULL, NULL, &repos_relpath,
> + &repos_root_url, NULL, NULL, NULL,
> + NULL, NULL, NULL, NULL, NULL, NULL,
> + NULL, NULL, NULL, NULL, NULL, NULL,
> + NULL, NULL, NULL, NULL,
> + db, current_abspath,
> + scratch_pool, iterpool));
> + }

You need this here:

             svn_pool_destroy(iterpool);

Pools must be destroyed within the scope that creates them.
I forgot to mention this in my last mail, sorry.

> + SVN_ERR_ASSERT(repos_root_url != NULL && repos_relpath != NULL);
> + repos_relpath = svn_dirent_join(repos_relpath,
> + svn_dirent_is_child(current_abspath,
> + local_abspath,
> + scratch_pool),

The above two lines need 3 more spaces of indentation each.

> + scratch_pool);
> + }
> else
> {
> *url = NULL;

With these changes, the patch looks fine to me, but I'll leave it
to the resident WC-NG gurus to handle it further.

Thanks for contributing!

Stefan

-- 
printf("Eh???/n");
Received on 2010-02-17 19:30:11 CET

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.