You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2011/04/21 23:22:37 UTC
svn commit: r1095824 -
/subversion/trunk/subversion/libsvn_client/prop_commands.c
Author: julianfoad
Date: Thu Apr 21 21:22:37 2011
New Revision: 1095824
URL: http://svn.apache.org/viewvc?rev=1095824&view=rev
Log:
* subversion/libsvn_client/prop_commands.c
(check_prop_name): Add a doc string and move an internal comment into it.
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=1095824&r1=1095823&r2=1095824&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/prop_commands.c (original)
+++ subversion/trunk/subversion/libsvn_client/prop_commands.c Thu Apr 21 21:22:37 2011
@@ -341,15 +341,23 @@ set_props_cb(void *baton,
return SVN_NO_ERROR;
}
+/* Check that PROPNAME is a valid name for a versioned property. Return an
+ * error if it is not valid, specifically if it is:
+ * - the name of a standard Subversion rev-prop; or
+ * - in the namespace of WC-props; or
+ * - not a well-formed property name (except if PROPVAL is NULL: in other
+ * words we do allow deleting a prop with an ill-formed name).
+ *
+ * Since Subversion controls the "svn:" property namespace, we don't honor
+ * a 'skip_checks' flag here. Checks for unusual property combinations such
+ * as svn:eol-style with a non-text svn:mime-type might understandably be
+ * skipped, but things such as using a property name reserved for revprops
+ * on a local target are never allowed.
+ */
static svn_error_t *
check_prop_name(const char *propname,
const svn_string_t *propval)
{
- /* Since Subversion controls the "svn:" property namespace, we
- don't honor the 'skip_checks' flag here. Unusual property
- combinations, like svn:eol-style with a non-text svn:mime-type,
- are understandable, but revprops on local targets are not. */
-
if (is_revision_prop_name(propname))
return svn_error_createf(SVN_ERR_CLIENT_PROPERTY_NAME, NULL,
_("Revision property '%s' not allowed "