[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 2105 - trunk/subversion/include trunk/subversion/libsvn_client

From: Greg Stein <gstein_at_lyra.org>
Date: 2002-06-07 01:32:12 CEST

On Thu, Jun 06, 2002 at 03:29:48PM -0500, kfogel@tigris.org wrote:
>...
> +++ trunk/subversion/libsvn_client/externals.c Thu Jun 6 15:29:32 2002
>...
> +static svn_boolean_t
> +compare_external_items (struct external_item *new_item,
> + struct external_item *old_item)
> +{
> + if ((strcmp (new_item->target_dir, old_item->target_dir) != 0)
> + || (strcmp (new_item->url, old_item->url) != 0))
> + return FALSE;
> +
> + /* Same url and target subdir, but what about the revision? */
> +
> + /* ### Need svn_client_compare_revisions()? */

Yes :-)

>...
> static svn_error_t *
> handle_external_item_change (const void *key, apr_ssize_t klen,
> enum svn_hash_diff_key_status status,
> void *baton)
> {
>...
> + struct external_item *old, *new;
> +
> + /* Don't bother to check status, since we'll get that for free by
> + attempting to retrieve the hash values anyway. */
>
> - switch (status)
> + old = apr_hash_get (ib->old_desc, key, klen);
> + new = apr_hash_get (ib->new_desc, key, klen);

Please don't use 'new' as a variable name. While compilers should know this
is a plain C file, and look at it as a C++ keyword... I don't want to trust
all compilers to be so smart :-)

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 7 04:25:27 2002

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.