You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2010/08/30 13:22:47 UTC

svn commit: r990772 - /subversion/trunk/subversion/tests/cmdline/diff_tests.py

Author: dannas
Date: Mon Aug 30 11:22:47 2010
New Revision: 990772

URL: http://svn.apache.org/viewvc?rev=990772&view=rev
Log:
Adjust diff test for URL->WC to include copied paths.

Since the server does not send copyfrom args for diff
operations we do not yet handle copied paths.

* subversion/tests/cmdline/diff_tests.py
  (diff_git_format_url_wc): Add copied paths.
  (test_list): Mark diff_git_format_url_wc() as XFailing.

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=990772&r1=990771&r2=990772&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/diff_tests.py Mon Aug 30 11:22:47 2010
@@ -3420,17 +3420,37 @@ def diff_git_format_url_wc(sbox):
   iota_path = os.path.join(wc_dir, 'iota')
   mu_path = os.path.join(wc_dir, 'A', 'mu')
   new_path = os.path.join(wc_dir, 'new')
+  lambda_path = os.path.join(wc_dir, 'A', 'B', 'lambda')
+  lambda_copied_path = os.path.join(wc_dir, 'A', 'B', 'lambda_copied')
+  alpha_path = os.path.join(wc_dir, 'A', 'B', 'E', 'alpha')
+  alpha_copied_path = os.path.join(wc_dir, 'A', 'B', 'E', 'alpha_copied')
+
   svntest.main.file_append(iota_path, "Changed 'iota'.\n")
   svntest.main.file_append(new_path, "This is the file 'new'.\n")
   svntest.main.run_svn(None, 'add', new_path)
   svntest.main.run_svn(None, 'rm', mu_path)
+  svntest.main.run_svn(None, 'cp', lambda_path, lambda_copied_path)
+  svntest.main.run_svn(None, 'cp', alpha_path, alpha_copied_path)
+  svntest.main.file_append(alpha_copied_path, "This is a copy of 'alpha'.\n")
 
   ### We're not testing copied or moved paths
 
   svntest.main.run_svn(None, 'commit', '-m', 'Committing changes', wc_dir)
   svntest.main.run_svn(None, 'up', wc_dir)
 
-  expected_output = make_git_diff_header(new_path, "new", "revision 0",
+  expected_output = make_git_diff_header(lambda_copied_path,
+                                         "A/B/lambda_copied",
+                                         "revision 1", "working copy",
+                                         copyfrom_path="A/B/lambda", cp=True,
+                                         text_changes=False) \
+  + make_git_diff_header(alpha_copied_path, "A/B/E/alpha_copied",
+                         "revision 0", "working copy",
+                         copyfrom_path="A/B/E/alpha", cp=True,
+                         text_changes=True) + [
+    "@@ -1 +1,2 @@\n",
+    " This is the file 'alpha'.\n",
+    "+This is a copy of 'alpha'.\n",
+  ] + make_git_diff_header(new_path, "new", "revision 0",
                                          "revision 2", add=True) + [
     "@@ -0,0 +1 @@\n",
     "+This is the file 'new'.\n",
@@ -3760,7 +3780,7 @@ test_list = [ None,
               XFail(diff_url_against_local_mods),
               XFail(diff_preexisting_rev_against_local_add),
               diff_git_format_wc_wc,
-              diff_git_format_url_wc,
+              XFail(diff_git_format_url_wc),
               diff_git_format_url_url,
               diff_prop_missing_context,
               diff_prop_multiple_hunks,