Author: pburba
Date: Thu Oct 11 14:12:04 2012
New Revision: 1397065

URL: http://svn.apache.org/viewvc?rev=1397065&view=rev
Log:
On the auto-props-sdc branch: Prevent svn:inheritable-auto-props from being
set on files.  It's harmless to do so, but does nothing, so is potentially
confusing.

* subversion/libsvn_wc/props.c

  (validate_prop_against_node_kind): Disallow SVN_CONFIG_PROP_AUTO_PROPS
   on files.

* subversion/tests/cmdline/autoprop_tests.py

  (svn_config_autoprops_propset_file_target): New.

  (test_list): Add svn_config_autoprops_propset_file_target.

Modified:
    subversion/branches/auto-props-sdc/subversion/libsvn_wc/props.c
    
subversion/branches/auto-props-sdc/subversion/tests/cmdline/autoprop_tests.py

Modified: subversion/branches/auto-props-sdc/subversion/libsvn_wc/props.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/libsvn_wc/props.c?rev=1397065&r1=1397064&r2=1397065&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/libsvn_wc/props.c (original)
+++ subversion/branches/auto-props-sdc/subversion/libsvn_wc/props.c Thu Oct 11 
14:12:04 2012
@@ -1675,6 +1675,7 @@ validate_prop_against_node_kind(const ch
 
   const char *file_prohibit[] = { SVN_PROP_IGNORE,
                                   SVN_PROP_EXTERNALS,
+                                  SVN_CONFIG_PROP_AUTO_PROPS,
                                   NULL };
   const char *dir_prohibit[] = { SVN_PROP_EXECUTABLE,
                                  SVN_PROP_KEYWORDS,

Modified: 
subversion/branches/auto-props-sdc/subversion/tests/cmdline/autoprop_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/tests/cmdline/autoprop_tests.py?rev=1397065&r1=1397064&r2=1397065&view=diff
==============================================================================
--- 
subversion/branches/auto-props-sdc/subversion/tests/cmdline/autoprop_tests.py 
(original)
+++ 
subversion/branches/auto-props-sdc/subversion/tests/cmdline/autoprop_tests.py 
Thu Oct 11 14:12:04 2012
@@ -611,6 +611,18 @@ def svn_config_autoprops_add_versioned_t
 
   check_inheritable_autoprops(sbox, True)
 
+#----------------------------------------------------------------------
+# Can't set svn:inheritable-auto-props on files.
+def svn_config_autoprops_propset_file_target(sbox):
+  "svn:inheritable-auto-props can't be set on files"
+
+  sbox.build()
+  svntest.actions.run_and_verify_svn(
+    None, None,
+    ".*Cannot set '" + SVN_CONFIG_AUTOPROPS + "' on a file.*",
+    'ps', SVN_CONFIG_AUTOPROPS, '*.c=svn:eol-style=native',
+    sbox.ospath('iota'))
+
 ########################################################################
 # Run the tests
 
@@ -645,6 +657,7 @@ test_list = [ None,
               svn_config_autoprops_imp_no_no,
               svn_config_autoprops_imp_yes_no,
               svn_config_autoprops_add_versioned_target,
+              svn_config_autoprops_propset_file_target,
              ]
 
 if __name__ == '__main__':


Reply via email to