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 2014/02/20 03:38:36 UTC
svn commit: r1570055 - in /subversion/trunk/subversion: libsvn_client/diff.c
libsvn_client/diff_local.c tests/cmdline/diff_tests.py
tests/cmdline/merge_authz_tests.py
Author: rhuijben
Date: Thu Feb 20 02:38:36 2014
New Revision: 1570055
URL: http://svn.apache.org/r1570055
Log:
And following up on the recent diff work: properly report deleted properties
on deleted directories.
* subversion/libsvn_client/diff.c
(diff_dir_added): Handle no_diff_added.
(diff_dir_deleted): Produce property diff.
* subversion/libsvn_client/diff_local.c
(svn_client__arbitrary_nodes_diff): Use proper default. With FALSE replaced
nodes are first added and then deleted.
* subversion/tests/cmdline/diff_tests.py
(diff_two_working_copies): Update expected result.
* subversion/tests/cmdline/merge_authz_tests.py
(diff_unauth_parent): Update expected result. Fix test failure of r1570053.
Modified:
subversion/trunk/subversion/libsvn_client/diff.c
subversion/trunk/subversion/libsvn_client/diff_local.c
subversion/trunk/subversion/tests/cmdline/diff_tests.py
subversion/trunk/subversion/tests/cmdline/merge_authz_tests.py
Modified: subversion/trunk/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/diff.c?rev=1570055&r1=1570054&r2=1570055&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/diff.c Thu Feb 20 02:38:36 2014
@@ -1125,6 +1125,9 @@ diff_dir_added(const char *relpath,
apr_hash_t *original_props = apr_hash_make(scratch_pool);
apr_array_header_t *prop_changes;
+ if (dwi->no_diff_added)
+ return SVN_NO_ERROR;
+
SVN_ERR(svn_prop_diffs(&prop_changes, right_props, original_props,
scratch_pool));
@@ -1147,6 +1150,24 @@ diff_dir_deleted(const char *relpath,
const struct svn_diff_tree_processor_t *processor,
apr_pool_t *scratch_pool)
{
+ diff_writer_info_t *dwi = processor->baton;
+ apr_array_header_t *prop_changes;
+
+ if (dwi->no_diff_deleted)
+ return SVN_NO_ERROR;
+
+
+ SVN_ERR(svn_prop_diffs(&prop_changes, apr_hash_make(scratch_pool),
+ left_props, scratch_pool));
+
+ SVN_ERR(diff_props_changed(relpath,
+ left_source->revision,
+ DIFF_REVNUM_NONEXISTENT,
+ prop_changes,
+ left_props,
+ TRUE /* show_diff_header */,
+ dwi,
+ scratch_pool));
return SVN_NO_ERROR;
}
Modified: subversion/trunk/subversion/libsvn_client/diff_local.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/diff_local.c?rev=1570055&r1=1570054&r2=1570055&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/diff_local.c (original)
+++ subversion/trunk/subversion/libsvn_client/diff_local.c Thu Feb 20 02:38:36 2014
@@ -588,7 +588,7 @@ svn_client__arbitrary_nodes_diff(const c
svn_node_kind_t right_kind;
const char *left_root_abspath;
const char *right_root_abspath;
- svn_boolean_t left_before_right = FALSE; /* Future argument */
+ svn_boolean_t left_before_right = TRUE; /* Future argument? */
if (depth == svn_depth_unknown)
depth = svn_depth_infinity;
Modified: subversion/trunk/subversion/tests/cmdline/diff_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/diff_tests.py?rev=1570055&r1=1570054&r2=1570055&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/diff_tests.py Thu Feb 20 02:38:36 2014
@@ -3982,9 +3982,14 @@ def diff_two_working_copies(sbox):
src_label, dst_label) + [
"@@ -1 +0,0 @@\n",
"-This is the file 'psi'.\n",
- ]
+ ] + make_diff_header('A/B/F', 'working copy',
+ 'nonexistent',
+ src_label, dst_label) + \
+ make_diff_prop_header('A/B/F') + \
+ make_diff_prop_deleted('newprop', 'propval-old\n')
- # Files in diff may be in any order.
+
+ # Files in diff may be in any order. #### Not any more, but test order is wrong.
expected_output = svntest.verify.UnorderedOutput(expected_output)
svntest.actions.run_and_verify_svn(None, expected_output, [],
'diff', '--old', wc_dir_old,
Modified: subversion/trunk/subversion/tests/cmdline/merge_authz_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/merge_authz_tests.py?rev=1570055&r1=1570054&r2=1570055&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/merge_authz_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/merge_authz_tests.py Thu Feb 20 02:38:36 2014
@@ -795,13 +795,13 @@ def diff_unauth_parent(sbox):
'Index: alpha\n',
'===================================================================\n',
'--- alpha\t(revision 3)\n',
- '+++ alpha\t(revision 4)\n',
+ '+++ alpha\t(nonexistent)\n',
'@@ -1 +0,0 @@\n',
'-This is the file \'alpha\'.\n',
'Index: beta\n',
'===================================================================\n',
'--- beta\t(revision 3)\n',
- '+++ beta\t(revision 4)\n',
+ '+++ beta\t(nonexistent)\n',
'@@ -1 +0,0 @@\n',
'-This is the file \'beta\'.\n',
'Index: tau\n',
@@ -847,6 +847,17 @@ def diff_unauth_parent(sbox):
expected_output += [
'Index: .\n',
'===================================================================\n',
+ '--- .\t(revision 3)\n',
+ '+++ .\t(nonexistent)\n',
+ '\n',
+ 'Property changes on: .\n',
+ '___________________________________________________________________\n',
+ 'Deleted: this-is\n',
+ '## -1 +0,0 ##\n',
+ '-E\n',
+ '\ No newline at end of property\n',
+ 'Index: .\n',
+ '===================================================================\n',
'--- .\t(nonexistent)\n',
'+++ .\t(revision 4)\n',
'\n',