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:01:44 UTC
svn commit: r1338713 -
/subversion/trunk/subversion/tests/cmdline/diff_tests.py
Author: stsp
Date: Tue May 15 14:01:44 2012
New Revision: 1338713
URL: http://svn.apache.org/viewvc?rev=1338713&view=rev
Log:
Add a new test for the new 'svn diff -cN foo' behaviour since r1338708.
We now show a diff for a deleted diff target 'foo' instead of erroring out.
* subversion/tests/cmdline/diff_tests.py
(diff_deleted_url, test_list): New test.
Modified:
subversion/trunk/subversion/tests/cmdline/diff_tests.py
Modified: subversion/trunk/subversion/tests/cmdline/diff_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/diff_tests.py?rev=1338713&r1=1338712&r2=1338713&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/diff_tests.py Tue May 15 14:01:44 2012
@@ -3878,6 +3878,32 @@ def diff_two_working_copies(sbox):
'diff', '--old', wc_dir_old,
'--new', wc_dir)
+def diff_deleted_url(sbox):
+ "diff -cN of URL deleted in rN"
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ # remove A/D/H in r2
+ sbox.simple_rm("A/D/H")
+ sbox.simple_commit()
+
+ # A diff of r2 with target A/D/H should show the removed children
+ expected_output = make_diff_header("chi", "revision 1", "revision 2") + [
+ "@@ -1 +0,0 @@\n",
+ "-This is the file 'chi'.\n",
+ ] + make_diff_header("omega", "revision 1",
+ "revision 2") + [
+ "@@ -1 +0,0 @@\n",
+ "-This is the file 'omega'.\n",
+ ] + make_diff_header("psi", "revision 1",
+ "revision 2") + [
+ "@@ -1 +0,0 @@\n",
+ "-This is the file 'psi'.\n",
+ ]
+ svntest.actions.run_and_verify_svn(None, expected_output, [],
+ 'diff', '-c2',
+ sbox.repo_url + '/A/D/H')
+
########################################################################
#Run the tests
@@ -3946,6 +3972,7 @@ test_list = [ None,
no_spurious_conflict,
diff_correct_wc_base_revnum,
diff_two_working_copies,
+ diff_deleted_url,
]
if __name__ == '__main__':