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/06/30 21:23:56 UTC
svn commit: r959415 - /subversion/trunk/subversion/libsvn_client/diff.c
Author: dannas
Date: Wed Jun 30 19:23:56 2010
New Revision: 959415
URL: http://svn.apache.org/viewvc?rev=959415&view=rev
Log:
Print an appropiate git diff header if a path is moved.
The diff code does not yet detect moves. We don't have a way to
distinguish between a copied and moved path with the diff callbacks.
Further, since the diff is created on the fly, we can't easily detect
if a deleted path is part of a move or just a plain delete.
But... At least the printing part is ready! :)
* subversion/libsvn_client/diff.c
(diff_content_changed): Add call to print_git_diff_header_moved().
Modified:
subversion/trunk/subversion/libsvn_client/diff.c
Modified: subversion/trunk/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/diff.c?rev=959415&r1=959414&r2=959415&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/diff.c Wed Jun 30 19:23:56 2010
@@ -747,6 +747,17 @@ diff_content_changed(const char *path,
label2 = diff_label(apr_psprintf(subpool, "b/%s", path2), rev2,
subpool);
}
+ else if (operation == svn_diff_op_moved)
+ {
+ SVN_ERR(print_git_diff_header_moved(
+ os,
+ diff_cmd_baton->header_encoding,
+ copyfrom_path, path, subpool));
+ label1 = diff_label(apr_psprintf(subpool, "a/%s", path1), rev1,
+ subpool);
+ label2 = diff_label(apr_psprintf(subpool, "b/%s", path2), rev2,
+ subpool);
+ }
/* ### Print git headers for renames too. */
}