subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dan...@apache.org
Subject svn commit: r951939 - /subversion/trunk/subversion/libsvn_client/diff.c
Date Sun, 06 Jun 2010 19:48:32 GMT
Author: dannas
Date: Sun Jun  6 19:48:31 2010
New Revision: 951939

URL: http://svn.apache.org/viewvc?rev=951939&view=rev
Log:
Follow-up to r951859. Use the correct diff header for paths that are
modified without tree changes.

* subversion/libsvn_client/diff.c
  (print_git_diff_header): Write the 'diff --git ...' line even if
    there are no tree changes.
  (diff_content_changed): Use the correct diff label for paths with no
    tree changes.

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=951939&r1=951938&r2=951939&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/diff.c Sun Jun  6 19:48:31 2010
@@ -360,6 +360,12 @@ print_git_diff_header(svn_stream_t *os, 
       SVN_ERR(svn_stream_printf_from_utf8(os, header_encoding, result_pool,
                                           "new file mode 10644" APR_EOL_STR));
     }
+  else
+    {
+      SVN_ERR(svn_stream_printf_from_utf8(os, header_encoding, result_pool,
+                                          "diff --git a/%s b/%s%s",
+                                          path, path, APR_EOL_STR));
+    }
   return SVN_NO_ERROR;
 }
 #endif
@@ -682,6 +688,13 @@ diff_content_changed(const char *path,
                                   subpool);
               label2 = diff_label("/dev/null", rev2, subpool);
             }
+          else
+            {
+              label1 = diff_label(apr_psprintf(subpool, "a/%s", path1), rev1,
+                                  subpool);
+              label2 = diff_label(apr_psprintf(subpool, "b/%s", path2), rev2,
+                                  subpool);
+            }
           
           /* ### Passing FALSE for added, copied and moved and NULL for
            * ### copyfrom_path since we're only dealing with deleted paths for



Mime
View raw message