[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 6302 - in trunk/subversion: libsvn_client libsvn_delta libsvn_repos libsvn_wc

From: Greg Stein <gstein_at_lyra.org>
Date: 2003-06-20 03:14:14 CEST

On Thu, Jun 19, 2003 at 07:11:09PM -0500, cmpilato@tigris.org wrote:
>...
> +++ trunk/subversion/libsvn_client/commit.c Thu Jun 19 19:11:07 2003
> @@ -951,19 +951,23 @@
> svn_wc_adm_access_t *adm_access;
> const svn_wc_entry_t *entry;
>
> + /* Clear the subpool here because there are some 'continue'
> + statements in this loop. */
> + svn_pool_clear (subpool);

Note that HACKING says this is now the "standard" pattern, rather than
simply for loops with 'continue' in them.

>...
> +++ trunk/subversion/libsvn_delta/path_driver.c Thu Jun 19 19:11:07 2003
>...
> @@ -210,10 +214,10 @@
>
> /*** Step C - Open any directories between the common ancestor
> and the parent of the current path. ***/
> - svn_path_split (path, &pdir, &bname, pool);
> + svn_path_split (path, &pdir, &bname, iterpool);
> if (strlen (pdir) > common_len)
> {
> - char *rel = apr_pstrdup (pool, pdir);
> + char *rel = (char *)pdir;
> char *piece = rel + common_len + 1;

Hmm. How about if we lose 'rel' and just use 'pdir' directly. And cast it
when setting up 'piece'.

I think it is probably important to clarify what is occurring here. We get
back something that is labelled as 'const char *', but we know it is a copy
and that we can change it.

Personally, I think it is a rather poor assumption to make aobut the
internals of svn_path_split(), but hey... I won't get too fussed about it.
But if we *do*, then it ought to be documented.

>...
> +++ trunk/subversion/libsvn_repos/commit.c Thu Jun 19 19:11:07 2003
>...
> @@ -399,7 +399,7 @@
> /* Build a new file baton */
> new_fb = apr_pcalloc (pool, sizeof (*new_fb));
> new_fb->edit_baton = eb;
> - new_fb->pool = pool;
> + new_fb->pool = pool; /* unused? */

Did you try removing it from the structure and compiling? That will show its
usage real fast :-)

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 Jun 20 03:10:15 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.