You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2012/05/15 16:30:10 UTC
svn commit: r1338725 - in /subversion/branches/1.7.x-issue4153: ./
subversion/libsvn_client/diff.c
Author: stsp
Date: Tue May 15 14:30:10 2012
New Revision: 1338725
URL: http://svn.apache.org/viewvc?rev=1338725&view=rev
Log:
On the 1.7.x-issue4153 branch, merge r1338688 from trunk.
* subversion/libsvn_client/diff.c
(make_regular_props_hash): Use svn_property_kind() instead of
svn_property_kind2() -- the latter only exists in trunk.
Modified:
subversion/branches/1.7.x-issue4153/ (props changed)
subversion/branches/1.7.x-issue4153/subversion/libsvn_client/diff.c
Propchange: subversion/branches/1.7.x-issue4153/
------------------------------------------------------------------------------
Merged /subversion/trunk:r1338688
Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_client/diff.c?rev=1338725&r1=1338724&r2=1338725&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_client/diff.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_client/diff.c Tue May 15 14:30:10 2012
@@ -1839,6 +1839,32 @@ make_regular_props_array(apr_hash_t *pro
return regular_props;
}
+/* Create a hash of regular properties from PROP_HASH, filtering entry-props
+ * and wc-props. Allocate the returned hash in RESULT_POOL.
+ * Use SCRATCH_POOL for temporary allocations. */
+static apr_hash_t *
+make_regular_props_hash(apr_hash_t *prop_hash,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ apr_hash_t *regular_props;
+ apr_hash_index_t *hi;
+
+ regular_props = apr_hash_make(result_pool);
+ for (hi = apr_hash_first(scratch_pool, prop_hash); hi;
+ hi = apr_hash_next(hi))
+ {
+ const char *name = svn__apr_hash_index_key(hi);
+ svn_string_t *value = svn__apr_hash_index_val(hi);
+ svn_prop_kind_t prop_kind = svn_property_kind(NULL, name);
+
+ if (prop_kind == svn_prop_regular_kind)
+ apr_hash_set(regular_props, name, APR_HASH_KEY_STRING, value);
+ }
+
+ return regular_props;
+}
+
/* Handle an added or deleted diff target file for a repos<->repos diff.
*
* Using the provided diff CALLBACKS and the CALLBACK_BATON, show the file
@@ -1877,8 +1903,10 @@ diff_repos_repos_added_or_deleted_file(c
apr_hash_get(prop_hash,
SVN_PROP_MIME_TYPE,
APR_HASH_KEY_STRING),
- NULL, prop_hash, callback_baton,
- scratch_pool));
+ NULL,
+ make_regular_props_hash(
+ prop_hash, scratch_pool, scratch_pool),
+ callback_baton, scratch_pool));
}
else
{
@@ -1940,8 +1968,10 @@ diff_repos_repos_added_or_deleted_dir(co
SVN_ERR(callbacks->dir_props_changed(NULL, NULL, target, FALSE,
apr_array_make(scratch_pool, 0,
sizeof(svn_prop_t)),
- props, callback_baton,
- scratch_pool));
+ make_regular_props_hash(
+ props, scratch_pool,
+ scratch_pool),
+ callback_baton, scratch_pool));
else
SVN_ERR(callbacks->dir_props_changed(NULL, NULL, target, TRUE,
make_regular_props_array(