subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1598092 - in /subversion/trunk/subversion: libsvn_diff/util.c tests/cmdline/merge_tests.py
Date Wed, 28 May 2014 18:08:52 GMT
Author: stsp
Date: Wed May 28 18:08:52 2014
New Revision: 1598092

URL: http://svn.apache.org/r1598092
Log:
For issue #3747, 'svn patch' support of svn:mergeinfo, make it
possible to parse svn:mergeinfo diffs regardless of i18n.

* subversion/libsvn_diff/util.c
  (display_mergeinfo_diff): Print a hunk header line for mergeinfo diffs.
   The header indicates the number of reverse-merges and forward-merges in
   the diff. Before this change, this information was only printed as part
   of output which is translated for i18n. This made it impossible to reliably
   parse svn:mergeinfo diffs from patch files.
   Futher changes to the diff parser and svn patch are coming soon.

* subversion/tests/cmdline/merge_tests.py
  (merge_in_new_file_and_diff): Adjust expected output.

Modified:
    subversion/trunk/subversion/libsvn_diff/util.c
    subversion/trunk/subversion/tests/cmdline/merge_tests.py

Modified: subversion/trunk/subversion/libsvn_diff/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_diff/util.c?rev=1598092&r1=1598091&r2=1598092&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_diff/util.c (original)
+++ subversion/trunk/subversion/libsvn_diff/util.c Wed May 28 18:08:52 2014
@@ -454,6 +454,14 @@ display_mergeinfo_diff(const char *old_m
                               new_mergeinfo_hash,
                               TRUE, pool, pool));
 
+  /* Print a hint for 'svn patch' or smilar tools, indicating the
+   * number of reverse-merges and forward-merges. */
+  SVN_ERR(svn_stream_printf_from_utf8(outstream, encoding, pool,
+                                      "## -0,%u +0,%u ##%s",
+                                      apr_hash_count(deleted),
+                                      apr_hash_count(added),
+                                      APR_EOL_STR));
+
   for (hi = apr_hash_first(pool, deleted);
        hi; hi = apr_hash_next(hi))
     {

Modified: subversion/trunk/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/merge_tests.py?rev=1598092&r1=1598091&r2=1598092&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/merge_tests.py Wed May 28 18:08:52 2014
@@ -1342,6 +1342,7 @@ def merge_in_new_file_and_diff(sbox):
     "Property changes on: " + url_branch_path + "\n",
     "___________________________________________________________________\n",
     "Added: " + SVN_PROP_MERGEINFO + "\n",
+    "## -0,0 +0,1 ##\n",
     "   Merged /A/B/E:r2-3\n",
   ]
   svntest.actions.run_and_verify_svn(None, expected_output, [], 'diff',



Mime
View raw message