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

Re: svn commit: r1095371 - /subversion/trunk/subversion/libsvn_client/prop_commands.c

From: Hyrum K Wright <hyrum_at_hyrumwright.org>
Date: Wed, 20 Apr 2011 08:19:09 -0500

On Wed, Apr 20, 2011 at 6:39 AM, <julianfoad_at_apache.org> wrote:
> Author: julianfoad
> Date: Wed Apr 20 11:39:26 2011
> New Revision: 1095371
>
> URL: http://svn.apache.org/viewvc?rev=1095371&view=rev
> Log:
> * subversion/libsvn_client/prop_commands.c
>  (svn_client_propset4): Simplify by using a helper function instead of
>    inline code to check whether all target paths are of the same kind.
>
> Modified:
>    subversion/trunk/subversion/libsvn_client/prop_commands.c
>
> Modified: subversion/trunk/subversion/libsvn_client/prop_commands.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/prop_commands.c?rev=1095371&r1=1095370&r2=1095371&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_client/prop_commands.c (original)
> +++ subversion/trunk/subversion/libsvn_client/prop_commands.c Wed Apr 20 11:39:26 2011
> @@ -41,6 +41,7 @@
>
>  #include "svn_private_config.h"
>  #include "private/svn_wc_private.h"
> +#include "private/svn_client_private.h"
>
>
>  /*** Code. ***/
> @@ -362,14 +363,7 @@ svn_client_propset4(const char *propname
>
>   /* Check for homogeneity among our targets. */
>   targets_are_urls = svn_path_is_url(APR_ARRAY_IDX(targets, 0, const char *));
> -  for (i = 1; i < targets->nelts; i++)
> -    {
> -      const char *target = APR_ARRAY_IDX(targets, i, const char *);
> -
> -      if (svn_path_is_url(target) != targets_are_urls)
> -        return svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
> -                 _("Cannot mix repository and working copy paths"));
> -    }
> +  SVN_ERR(svn_client__assert_homogeneous_target_type(targets));
>
>   /* Since Subversion controls the "svn:" property namespace, we
>      don't honor the 'skip_checks' flag here.  Unusual property

Ah! I wondered if such a helper existed. :)

Thanks,
-Hyrum
Received on 2011-04-20 15:19:43 CEST

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.