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/05 11:56:20 UTC

svn commit: r982527 - in /subversion/trunk/subversion: libsvn_diff/parse-diff.c tests/libsvn_diff/parse-diff-test.c

Author: dannas
Date: Thu Aug  5 09:56:19 2010
New Revision: 982527

URL: http://svn.apache.org/viewvc?rev=982527&view=rev
Log:
Adjust the parser to match aginst lines beginning with 'rename {from/to}' instead of
'moved {from,to}'. Using 'moved' was plain wrong and was a mistake caused by 
sloppiness.

* subversion/libsvn_diff/parse-diff.c
  (svn_diff_parse_next_patch): Adjust the parser.

* subversion/tests/libsvn_diff/parse-diff-test.c
  (git_tree_and_text_unidiff): Adjust test data.

Modified:
    subversion/trunk/subversion/libsvn_diff/parse-diff.c
    subversion/trunk/subversion/tests/libsvn_diff/parse-diff-test.c

Modified: subversion/trunk/subversion/libsvn_diff/parse-diff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_diff/parse-diff.c?rev=982527&r1=982526&r2=982527&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_diff/parse-diff.c (original)
+++ subversion/trunk/subversion/libsvn_diff/parse-diff.c Thu Aug  5 09:56:19 2010
@@ -1110,8 +1110,8 @@ svn_diff_parse_next_patch(svn_patch_t **
       {"--- a/",        state_git_diff_seen,    git_minus},
       {"--- a/",        state_git_tree_seen,    git_minus},
       {"+++ b/",        state_git_minus_seen,   git_plus},
-      {"move from ",    state_git_diff_seen,    git_move_from},
-      {"move to ",      state_move_from_seen,   git_move_to},
+      {"rename from ",  state_git_diff_seen,    git_move_from},
+      {"rename to ",    state_move_from_seen,   git_move_to},
       {"copy from ",    state_git_diff_seen,    git_copy_from},
       {"copy to ",      state_copy_from_seen,   git_copy_to},
       {"new file ",     state_git_diff_seen,    git_new_file},

Modified: subversion/trunk/subversion/tests/libsvn_diff/parse-diff-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_diff/parse-diff-test.c?rev=982527&r1=982526&r2=982527&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_diff/parse-diff-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_diff/parse-diff-test.c Thu Aug  5 09:56:19 2010
@@ -92,8 +92,8 @@ static const char *git_tree_and_text_uni
   "Index: A/mu.moved"                                                   NL
   "===================================================================" NL
   "git --diff a/A/mu b/A/mu.moved"                                      NL
-  "move from A/mu"                                                      NL
-  "move to A/mu.moved"                                                  NL
+  "rename from A/mu"                                                    NL
+  "rename to A/mu.moved"                                                NL
   "@@ -1 +1,2 @@"                                                       NL
   " This is the file 'mu'."                                             NL
   "+some more bytes to 'mu'"                                            NL