subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1227385 - in /subversion/trunk/subversion: libsvn_client/commit_util.c tests/cmdline/commit_tests.py
Date Wed, 04 Jan 2012 23:29:48 GMT
Author: stsp
Date: Wed Jan  4 23:29:47 2012
New Revision: 1227385

URL: http://svn.apache.org/viewvc?rev=1227385&view=rev
Log:
Fix issue #4059 (can't commit when copy-op-root and copied-along grandchild
are explicit targets).

* subversion/libsvn_client/commit_util.c
  (svn_client__harvest_committables): For copied nodes, use the root of the
   copied subtree as dangling parent, rather than the immediate parent.
   This prevents us from tripping over the fact that immediate parent nodes
   of commit targets located within a copied subtree might not appear in
   the list of committables. Only op-roots of copies appear in this list.

* subversion/tests/cmdline/commit_tests.py
  (commit_add_subadd): Remove XFail marker.

Modified:
    subversion/trunk/subversion/libsvn_client/commit_util.c
    subversion/trunk/subversion/tests/cmdline/commit_tests.py

Modified: subversion/trunk/subversion/libsvn_client/commit_util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/commit_util.c?rev=1227385&r1=1227384&r2=1227385&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/commit_util.c (original)
+++ subversion/trunk/subversion/libsvn_client/commit_util.c Wed Jan  4 23:29:47 2012
@@ -1122,6 +1122,22 @@ svn_client__harvest_committables(svn_cli
 
           if (is_added)
             {
+              svn_boolean_t is_copy;
+              const char *copy_root_abspath;
+
+              /* Copies are always committed recursively as long as the
+               * copy root is in the commit target list.
+               * So for nodes copied along with a parent, the copy root path
+               * is the dangling parent. See issue #4059. */
+              SVN_ERR(svn_wc__node_get_origin(&is_copy,
+                                              NULL, NULL, NULL, NULL,
+                                              &copy_root_abspath,
+                                              ctx->wc_ctx,
+                                              target_abspath,
+                                              FALSE, iterpool, iterpool));
+              if (is_copy && strcmp(copy_root_abspath, target_abspath) != 0)
+                parent_abspath = copy_root_abspath;
+
               /* Copy the parent and target into pool; iterpool
                  lasts only for this loop iteration, and we check
                  danglers after the loop is over. */

Modified: subversion/trunk/subversion/tests/cmdline/commit_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/commit_tests.py?rev=1227385&r1=1227384&r2=1227385&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/commit_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/commit_tests.py Wed Jan  4 23:29:47 2012
@@ -2832,7 +2832,6 @@ def commit_incomplete(sbox):
 #   From: Fergus Slorach <sugref@gmail.com>
 #   Subject: svn commit --targets behaviour change in 1.7?
 @Issue(4059)
-@XFail()
 def commit_add_subadd(sbox):
   "committing add with explicit subadd targets"
 



Mime
View raw message