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

Re: svn commit: r22656 - in branches/multiple-moves/subversion: include libsvn_client

From: Daniel Rall <dlr_at_collab.net>
Date: 2006-12-12 06:12:54 CET

On Mon, 11 Dec 2006, hwright@tigris.org wrote:
...
> --- branches/multiple-moves/subversion/include/svn_client.h (original)
> +++ branches/multiple-moves/subversion/include/svn_client.h Mon Dec 11 19:32:45 2006
...
> + * If @a src_paths has multiple items, and @a copy_as_child is FALSE, fail
> + * with @c SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED.
> + *

Nice!

...
> --- branches/multiple-moves/subversion/libsvn_client/copy.c (original)
> +++ branches/multiple-moves/subversion/libsvn_client/copy.c Mon Dec 11 19:32:45 2006
> @@ -1374,6 +1374,10 @@
> {
...
> + if ( (src_paths->nelts > 1) && ! (copy_as_child) )
> + return svn_error_create(SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED,
> + NULL, NULL);
> +
...
> @@ -1486,6 +1490,10 @@
> const svn_opt_revision_t src_revision
> = { svn_opt_revision_unspecified, { 0 } };
> svn_error_t *err;
> +
> + if ( (src_paths->nelts > 1) && ! (move_as_child) )
> + return svn_error_create(SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED,
> + NULL, NULL);
...

In the Subversion sources, I've noticed these types of conditionals
typically written without the additional whitespace. Additionally,
the parens around both the "greater than" and *_as_child checks are
extraneous. This would be more consistent:

     if ((src_paths->nelts) > 1 && !copy_as_child)

This is my personal preference:

     if (src_paths->nelts > 1 && !copy_as_child)

  • application/pgp-signature attachment: stored
Received on Tue Dec 12 06:14:26 2006

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.