Return-Path: Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: (qmail 12291 invoked from network); 30 Jun 2010 19:24:52 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 30 Jun 2010 19:24:52 -0000 Received: (qmail 32339 invoked by uid 500); 30 Jun 2010 19:24:52 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 32253 invoked by uid 500); 30 Jun 2010 19:24:52 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 32246 invoked by uid 99); 30 Jun 2010 19:24:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jun 2010 19:24:51 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jun 2010 19:24:49 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id A99102388906; Wed, 30 Jun 2010 19:23:56 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r959415 - /subversion/trunk/subversion/libsvn_client/diff.c Date: Wed, 30 Jun 2010 19:23:56 -0000 To: commits@subversion.apache.org From: dannas@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100630192356.A99102388906@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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. */ }