subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1835218 - in /subversion/trunk/subversion: libsvn_client/diff.c tests/cmdline/diff_tests.py
Date Fri, 06 Jul 2018 08:36:27 GMT
Author: julianfoad
Date: Fri Jul  6 08:36:27 2018
New Revision: 1835218

URL: http://svn.apache.org/viewvc?rev=1835218&view=rev
Log:
Fix a crash in diff.

diff-tests.py 91: Summary diff with a repository source side and a local copy
target side.  This particular combination crashed in 1.10.0 and earlier
releases.

* subversion/libsvn_client/diff.c
  (diff_repos_wc): Ensure 'root_relpath' and 'root_is_dir' outputs are
    written in all cases.

* subversion/tests/cmdline/diff_tests.py
  (diff_summary_repo_wc_local_copy): Remove XFail.

Modified:
    subversion/trunk/subversion/libsvn_client/diff.c
    subversion/trunk/subversion/tests/cmdline/diff_tests.py

Modified: subversion/trunk/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/diff.c?rev=1835218&r1=1835217&r2=1835218&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/diff.c Fri Jul  6 08:36:27 2018
@@ -2150,11 +2150,6 @@ diff_repos_wc(const char **root_relpath,
           target = "";
         }
 
-      if (root_relpath)
-        *root_relpath = apr_pstrdup(result_pool, target);
-      if (root_is_dir)
-        *root_is_dir = (*target == '\0');
-
       /* Fetch the URL of the anchor directory. */
       SVN_ERR(svn_dirent_get_absolute(&anchor_abspath, anchor, scratch_pool));
       SVN_ERR(svn_wc__node_get_url(&anchor_url, ctx->wc_ctx, anchor_abspath,
@@ -2224,6 +2219,11 @@ diff_repos_wc(const char **root_relpath,
 #endif
     }
 
+  if (root_relpath)
+    *root_relpath = apr_pstrdup(result_pool, target);
+  if (root_is_dir)
+    *root_is_dir = (*target == '\0');
+
   SVN_ERR(svn_ra_reparent(ra_session, anchor_url, scratch_pool));
 
   if (ddi)

Modified: subversion/trunk/subversion/tests/cmdline/diff_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/diff_tests.py?rev=1835218&r1=1835217&r2=1835218&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/diff_tests.py Fri Jul  6 08:36:27 2018
@@ -5162,7 +5162,6 @@ def diff_unversioned_files_git(sbox):
 
 # Summary diff with a repository source side and a local copy target side.
 # This particular combination crashed in 1.10.0 and earlier releases.
-@XFail()
 def diff_summary_repo_wc_local_copy(sbox):
   "diff summary repo wc local copy"
   sbox.build()



Mime
View raw message