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 2013/02/08 16:01:41 UTC
svn commit: r1444040 - /subversion/trunk/subversion/libsvn_client/diff.c
Author: rhuijben
Date: Fri Feb 8 15:01:41 2013
New Revision: 1444040
URL: http://svn.apache.org/r1444040
Log:
Following up on r1341544, read the property hash correctly for
svn diff --internal-diff -x -u COMMITTERS ^/subversion/trunk/COMMITTERS
Found by: julianf
* subversion/libsvn_client/diff.c
(diff_repos_wc_file_target): Properly get properties from a
const char * -> svn_string_t hash.
Modified:
subversion/trunk/subversion/libsvn_client/diff.c
Modified: subversion/trunk/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/diff.c?rev=1444040&r1=1444039&r2=1444040&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/diff.c Fri Feb 8 15:01:41 2013
@@ -2065,9 +2065,8 @@ diff_repos_wc_file_target(const char *ta
/* We might have to create a normalised version of the working file. */
svn_subst_eol_style_from_value(&eol_style, &eol_str,
- apr_hash_get(file2_props,
- SVN_PROP_EOL_STYLE,
- APR_HASH_KEY_STRING));
+ svn_prop_get_value(file2_props,
+ SVN_PROP_EOL_STYLE));
keywords_prop = apr_hash_get(file2_props, SVN_PROP_KEYWORDS,
APR_HASH_KEY_STRING);
if (keywords_prop)
@@ -2097,6 +2096,8 @@ diff_repos_wc_file_target(const char *ta
if (kind1 == svn_node_file && !(show_copies_as_adds && is_copy))
{
+ const char *mime1 = svn_prop_get_value(file1_props, SVN_PROP_MIME_TYPE);
+ const char *mime2 = svn_prop_get_value(file2_props, SVN_PROP_MIME_TYPE);
SVN_ERR(callbacks->file_opened(NULL, NULL, target,
reverse ? SVN_INVALID_REVNUM : rev,
callback_baton, scratch_pool));
@@ -2105,12 +2106,8 @@ diff_repos_wc_file_target(const char *ta
SVN_ERR(callbacks->file_changed(NULL, NULL, NULL, target,
file2_abspath, file1_abspath,
SVN_INVALID_REVNUM, rev,
- apr_hash_get(file2_props,
- SVN_PROP_MIME_TYPE,
- APR_HASH_KEY_STRING),
- apr_hash_get(file1_props,
- SVN_PROP_MIME_TYPE,
- APR_HASH_KEY_STRING),
+ mime2,
+ mime1,
make_regular_props_array(
file1_props, scratch_pool,
scratch_pool),
@@ -2120,12 +2117,8 @@ diff_repos_wc_file_target(const char *ta
SVN_ERR(callbacks->file_changed(NULL, NULL, NULL, target,
file1_abspath, file2_abspath,
rev, SVN_INVALID_REVNUM,
- apr_hash_get(file1_props,
- SVN_PROP_MIME_TYPE,
- APR_HASH_KEY_STRING),
- apr_hash_get(file2_props,
- SVN_PROP_MIME_TYPE,
- APR_HASH_KEY_STRING),
+ mime1,
+ mime2,
make_regular_props_array(
file2_props, scratch_pool,
scratch_pool),
@@ -2134,13 +2127,12 @@ diff_repos_wc_file_target(const char *ta
}
else
{
+ const char *mime2 = svn_prop_get_value(file2_props, SVN_PROP_MIME_TYPE);
if (reverse)
{
SVN_ERR(callbacks->file_deleted(NULL, NULL,
target, file2_abspath, file1_abspath,
- apr_hash_get(file2_props,
- SVN_PROP_MIME_TYPE,
- APR_HASH_KEY_STRING),
+ mime2,
NULL,
make_regular_props_hash(
file2_props, scratch_pool,
@@ -2153,9 +2145,7 @@ diff_repos_wc_file_target(const char *ta
file1_abspath, file2_abspath,
rev, SVN_INVALID_REVNUM,
NULL,
- apr_hash_get(file2_props,
- SVN_PROP_MIME_TYPE,
- APR_HASH_KEY_STRING),
+ mime2,
NULL, SVN_INVALID_REVNUM,
make_regular_props_array(
file2_props, scratch_pool,