You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2011/04/23 00:34:15 UTC

svn commit: r1096070 - /subversion/trunk/subversion/libsvn_wc/props.c

Author: hwright
Date: Fri Apr 22 22:34:15 2011
New Revision: 1096070

URL: http://svn.apache.org/viewvc?rev=1096070&view=rev
Log:
Move a test common to all propsets outside the node walking loop.

* subversion/libsvn_wc/props.c
  (do_propset): Remove propkind test from here.
  (svn_wc_propset4): Add it here.

Modified:
    subversion/trunk/subversion/libsvn_wc/props.c

Modified: subversion/trunk/subversion/libsvn_wc/props.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/props.c?rev=1096070&r1=1096069&r2=1096070&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/props.c (original)
+++ subversion/trunk/subversion/libsvn_wc/props.c Fri Apr 22 22:34:15 2011
@@ -2054,11 +2054,6 @@ do_propset(svn_wc__db_t *db,
                              svn_dirent_local_style(local_abspath,
                                                     scratch_pool));
 
-  /* we don't do entry properties here */
-  if (prop_kind == svn_prop_entry_kind)
-    return svn_error_createf(SVN_ERR_BAD_PROP_KIND, NULL,
-                             _("Property '%s' is an entry property"), name);
-
   /* Else, handle a regular property: */
 
 
@@ -2260,8 +2255,14 @@ svn_wc_prop_set4(svn_wc_context_t *wc_ct
                  void *notify_baton,
                  apr_pool_t *scratch_pool)
 {
+  enum svn_prop_kind prop_kind = svn_property_kind(NULL, name);
   apr_hash_t *changelist_hash = NULL;
 
+  /* we don't do entry properties here */
+  if (prop_kind == svn_prop_entry_kind)
+    return svn_error_createf(SVN_ERR_BAD_PROP_KIND, NULL,
+                             _("Property '%s' is an entry property"), name);
+
   if (changelists && changelists->nelts)
     SVN_ERR(svn_hash_from_cstring_keys(&changelist_hash, changelists,
                                        scratch_pool));