subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From svn-r...@apache.org
Subject svn commit: r1482197 - in /subversion/branches/1.7.x: ./ STATUS subversion/libsvn_wc/diff_local.c subversion/tests/cmdline/diff_tests.py
Date Tue, 14 May 2013 04:02:49 GMT
Author: svn-role
Date: Tue May 14 04:02:48 2013
New Revision: 1482197

URL: http://svn.apache.org/r1482197
Log:
Merge the r1434405 group from trunk:

 * r1434405, r1434414, r1434418
   Fix issue #4294 'diff --git shows wrong copy from'.  Moving a dir
   causes diff --git to output incorrect sources for the diff.
   Justification:
     Diff should show the correct output.  Failiure to do so can lead to
     incorrect interoperation with other systems.
   Votes:
     +1: breser, stsp
     +1: rhuijben (even though it only fixes one of the many --git issues)

Modified:
    subversion/branches/1.7.x/   (props changed)
    subversion/branches/1.7.x/STATUS
    subversion/branches/1.7.x/subversion/libsvn_wc/diff_local.c
    subversion/branches/1.7.x/subversion/tests/cmdline/diff_tests.py

Propchange: subversion/branches/1.7.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1434405,1434414,1434418

Modified: subversion/branches/1.7.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1482197&r1=1482196&r2=1482197&view=diff
==============================================================================
--- subversion/branches/1.7.x/STATUS (original)
+++ subversion/branches/1.7.x/STATUS Tue May 14 04:02:48 2013
@@ -282,13 +282,3 @@ Veto-blocked changes:
 
 Approved changes:
 =================
-
- * r1434405, r1434414, r1434418
-   Fix issue #4294 'diff --git shows wrong copy from'.  Moving a dir
-   causes diff --git to output incorrect sources for the diff.
-   Justification:
-     Diff should show the correct output.  Failiure to do so can lead to
-     incorrect interoperation with other systems.
-   Votes:
-     +1: breser, stsp
-     +1: rhuijben (even though it only fixes one of the many --git issues)

Modified: subversion/branches/1.7.x/subversion/libsvn_wc/diff_local.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_wc/diff_local.c?rev=1482197&r1=1482196&r2=1482197&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_wc/diff_local.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_wc/diff_local.c Tue May 14 04:02:48 2013
@@ -204,11 +204,10 @@ file_diff(struct diff_baton *eb,
      the latter two have corresponding pristine info to diff against.  */
   if (status == svn_wc__db_status_added)
     SVN_ERR(svn_wc__db_scan_addition(&status, NULL, NULL, NULL, NULL,
-                                     &original_repos_relpath, NULL, NULL,
+                                     NULL, NULL, NULL,
                                      NULL, db, local_abspath,
                                      scratch_pool, scratch_pool));
 
-
   SVN_ERR(get_empty_file(eb, &empty_file, scratch_pool));
 
   /* When we show a delete, we show a diff of the original pristine against

Modified: subversion/branches/1.7.x/subversion/tests/cmdline/diff_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/tests/cmdline/diff_tests.py?rev=1482197&r1=1482196&r2=1482197&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/branches/1.7.x/subversion/tests/cmdline/diff_tests.py Tue May 14 04:02:48 2013
@@ -3360,6 +3360,52 @@ def diff_git_format_wc_wc(sbox):
   svntest.actions.run_and_verify_svn(None, expected, [], 'diff',
                                      '--git', wc_dir)
 
+@Issue(4294)
+def diff_git_format_wc_wc_dir_mv(sbox):
+  "create a diff in git unidff format for wc dir mv"
+  sbox.build()
+  wc_dir = sbox.wc_dir
+  g_path = sbox.ospath('A/D/G')
+  g2_path = sbox.ospath('A/D/G2')
+  pi_path = sbox.ospath('A/D/G/pi')
+  rho_path = sbox.ospath('A/D/G/rho')
+  tau_path = sbox.ospath('A/D/G/tau')
+  new_pi_path = sbox.ospath('A/D/G2/pi')
+  new_rho_path = sbox.ospath('A/D/G2/rho')
+  new_tau_path = sbox.ospath('A/D/G2/tau')
+
+  svntest.main.run_svn(None, 'mv', g_path, g2_path)
+
+  expected_output = make_git_diff_header(pi_path, "A/D/G/pi",
+                                         "revision 1", "working copy",
+                                         delete=True) \
+  + [
+    "@@ -1 +0,0 @@\n",
+    "-This is the file 'pi'.\n"
+  ] + make_git_diff_header(rho_path, "A/D/G/rho",
+                           "revision 1", "working copy",
+                           delete=True) \
+  + [
+    "@@ -1 +0,0 @@\n",
+    "-This is the file 'rho'.\n"
+  ] + make_git_diff_header(tau_path, "A/D/G/tau",
+                           "revision 1", "working copy",
+                           delete=True) \
+  + [
+    "@@ -1 +0,0 @@\n",
+    "-This is the file 'tau'.\n"
+  ] + make_git_diff_header(new_pi_path, "A/D/G2/pi", None, None, cp=True,
+                           copyfrom_path="A/D/G/pi", text_changes=False) \
+  + make_git_diff_header(new_rho_path, "A/D/G2/rho", None, None, cp=True,
+                         copyfrom_path="A/D/G/rho", text_changes=False) \
+  + make_git_diff_header(new_tau_path, "A/D/G2/tau", None, None, cp=True,
+                         copyfrom_path="A/D/G/tau", text_changes=False)
+
+  expected = svntest.verify.UnorderedOutput(expected_output)
+
+  svntest.actions.run_and_verify_svn(None, expected, [], 'diff',
+                                     '--git', wc_dir)
+
 def diff_git_format_url_wc(sbox):
   "create a diff in git unidiff format for url-wc"
   sbox.build()
@@ -3799,6 +3845,7 @@ test_list = [ None,
               diff_git_with_props_on_dir,
               diff_abs_localpath_from_wc_folder,
               no_spurious_conflict,
+              diff_git_format_wc_wc_dir_mv,
               ]
 
 if __name__ == '__main__':



Mime
View raw message