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

Re: [PATCH] Issue #1295

From: <cmpilato_at_collab.net>
Date: 2003-05-09 01:41:18 CEST

Mark Grosberg <mark@nolab.conman.org> writes:

> Hello all,
>
> I saw issue #1295 get filed. This is one of the things that has bothered
> me about CVS for the longest time. So, I got a bit of energey and
> implemented this. It really isn't that invasive at all.

Wow. I mean. Wow.

> Index: libsvn_client/commit_util.c
> ===================================================================
> --- libsvn_client/commit_util.c (revision 5857)
> +++ libsvn_client/commit_util.c (working copy)
> @@ -747,6 +747,19 @@
>
> assert (ci && ci->nelts);
>
> + /* Delete unrequested items. */
> + for (i = 0; i < ci->nelts; i++)
> + {
> + item = (((svn_client_commit_item_t **) ci->elts)[i]);
> + if (item->state_flags & SVN_CLIENT_COMMIT_ITEM_UNMARKED)
> + {
> + /* I couldn't find an apr_array_delete -- MYG. */
> + if (ci->nelts > 1)
> + ci->elts[i] = ci->elts[ci->nelts - 1];
> + ci->nelts--;
> + }
> + }
> +

I think I'd feel better about seeing this as a memmove().

> +static const char *
> +get_item_path (svn_client_commit_item_t *item,
> + struct log_msg_baton *lmb,
> + apr_pool_t *pool)

Icky poo. Please use the same style as the rest of the function
headers on a per-file basis. For this file (as for all of Subversion),
we have a single space before our parameter names, like:

   static const char *
   get_item_path (svn_client_commit_item_t *item,
                  struct log_msg_baton *lmb,
                  apr_pool_t *pool)

(Unfortunately, I don't have the cycles to review the rest of the
patch, but the use of the commit_item->flags was quite clever -- I
very much like that mechanism.)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri May 9 01:45:37 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.