You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2015/04/15 11:34:03 UTC
svn commit: r1673692 - /subversion/trunk/subversion/mod_dav_svn/liveprops.c
Author: rhuijben
Date: Wed Apr 15 09:34:03 2015
New Revision: 1673692
URL: http://svn.apache.org/r1673692
Log:
Following up on r1673170, update the subversion specific deadprop-count
property in mod_dav to only report "0" (no props) and "1" values (has props).
* subversion/mod_dav_svn/liveprops.c
(insert_prop_internal): Integrate specialized svn client behavior with
standard code. Use "1" as exists value instead of 99.
Suggested by: ivan
Modified:
subversion/trunk/subversion/mod_dav_svn/liveprops.c
Modified: subversion/trunk/subversion/mod_dav_svn/liveprops.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/liveprops.c?rev=1673692&r1=1673691&r2=1673692&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/liveprops.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/liveprops.c Wed Apr 15 09:34:03 2015
@@ -787,58 +787,39 @@ insert_prop_internal(const dav_resource
case SVN_PROPID_deadprop_count:
{
+ svn_boolean_t has_props;
+
if (resource->type != DAV_RESOURCE_TYPE_REGULAR)
return DAV_PROP_INSERT_NOTSUPP;
- if (resource->info->repos->is_svn_client)
- {
- svn_boolean_t has_props;
- /* Retrieving the actual properties is quite expensive while
- svn clients only want to know if there are properties, and
- in many cases aren't interested at all (see r1673153) */
- serr = svn_fs_node_has_props(&has_props,
- resource->info->root.root,
- resource->info->repos_path,
- scratch_pool);
-
- if (serr != NULL)
- {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, serr->apr_err,
- resource->info->r,
- "Can't fetch has props of '%s': "
- "%s",
- resource->info->repos_path,
- serr->message);
- svn_error_clear(serr);
- value = error_value;
- break;
- }
+ /* Retrieving the actual properties is quite expensive while
+ svn clients only want to know if there are properties, by
+ using this svn defined property.
+
+ Our and and SvnKit's implementation of the ra layer check
+ for '> 0' to provide the boolean if the node has custom
+ properties or not, so starting with 1.9 we just provide
+ "1" or "0".
+ */
+ serr = svn_fs_node_has_props(&has_props,
+ resource->info->root.root,
+ resource->info->repos_path,
+ scratch_pool);
- value = has_props ? "99" /* Magic (undocumented) value */ : "0";
- }
- else
+ if (serr != NULL)
{
- unsigned int propcount;
- apr_hash_t *proplist;
- serr = svn_fs_node_proplist(&proplist,
- resource->info->root.root,
- resource->info->repos_path, scratch_pool);
- if (serr != NULL)
- {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, serr->apr_err,
- resource->info->r,
- "Can't fetch proplist of '%s': "
- "%s",
- resource->info->repos_path,
- serr->message);
- svn_error_clear(serr);
- value = error_value;
- break;
- }
-
- propcount = apr_hash_count(proplist);
- value = apr_psprintf(scratch_pool, "%u", propcount);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, serr->apr_err,
+ resource->info->r,
+ "Can't fetch has properties on '%s': "
+ "%s",
+ resource->info->repos_path,
+ serr->message);
+ svn_error_clear(serr);
+ value = error_value;
+ break;
}
+
+ value = has_props ? "1" : "0";
break;
}