Return-Path: X-Original-To: apmail-subversion-commits-archive@minotaur.apache.org Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9915911230 for ; Thu, 24 Apr 2014 04:01:15 +0000 (UTC) Received: (qmail 39606 invoked by uid 500); 24 Apr 2014 04:01:15 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 39572 invoked by uid 500); 24 Apr 2014 04:01:14 -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 39565 invoked by uid 99); 24 Apr 2014 04:01:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Apr 2014 04:01:14 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.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; Thu, 24 Apr 2014 04:01:13 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 431A22388BA6; Thu, 24 Apr 2014 04:00:50 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1589567 - in /subversion/branches/1.7.x: ./ subversion/libsvn_client/copy.c Date: Thu, 24 Apr 2014 04:00:49 -0000 To: commits@subversion.apache.org From: svn-role@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140424040050.431A22388BA6@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: svn-role Date: Thu Apr 24 04:00:49 2014 New Revision: 1589567 URL: http://svn.apache.org/r1589567 Log: Merge the 1.7.x-r1551579 branch: * ^/subversion/branches/1.7.x-r1551579 Fix moving files from externals to ancestor directories and vice versa. Justification: "Moves should just work" or "be nice to api users, like Markus" Votes: +1: rhuijben, breser, stefan2 +1 (non-binding): schabi (Fixes our use case, all our other tests pass.) Modified: subversion/branches/1.7.x/ (props changed) subversion/branches/1.7.x/subversion/libsvn_client/copy.c Propchange: subversion/branches/1.7.x/ ------------------------------------------------------------------------------ Merged /subversion/branches/1.7.x-r1551579:r1551587-1589566 Merged /subversion/trunk:r1551579 Modified: subversion/branches/1.7.x/subversion/libsvn_client/copy.c URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_client/copy.c?rev=1589567&r1=1589566&r2=1589567&view=diff ============================================================================== --- subversion/branches/1.7.x/subversion/libsvn_client/copy.c (original) +++ subversion/branches/1.7.x/subversion/libsvn_client/copy.c Thu Apr 24 04:00:49 2014 @@ -374,6 +374,8 @@ do_wc_to_wc_moves(const apr_array_header { const char *src_parent_abspath; struct do_wc_to_wc_moves_with_locks_baton baton; + const char *src_wcroot_abspath; + const char *dst_wcroot_abspath; svn_client__copy_pair_t *pair = APR_ARRAY_IDX(copy_pairs, i, svn_client__copy_pair_t *); @@ -386,6 +388,13 @@ do_wc_to_wc_moves(const apr_array_header src_parent_abspath = svn_dirent_dirname(pair->src_abspath_or_url, iterpool); + SVN_ERR(svn_wc__get_wc_root(&src_wcroot_abspath, + ctx->wc_ctx, src_parent_abspath, + iterpool, iterpool)); + SVN_ERR(svn_wc__get_wc_root(&dst_wcroot_abspath, + ctx->wc_ctx, pair->dst_parent_abspath, + iterpool, iterpool)); + /* We now need to lock the right combination of batons. Four cases: 1) src_parent == dst_parent @@ -394,14 +403,18 @@ do_wc_to_wc_moves(const apr_array_header 4) src_parent and dst_parent are disjoint We can handle 1) as either 2) or 3) */ if (strcmp(src_parent_abspath, pair->dst_parent_abspath) == 0 - || svn_dirent_is_child(src_parent_abspath, pair->dst_parent_abspath, - iterpool)) + || (svn_dirent_is_child(src_parent_abspath, pair->dst_parent_abspath, + NULL) + && !svn_dirent_is_child(src_parent_abspath, dst_wcroot_abspath, + NULL))) { baton.lock_src = TRUE; baton.lock_dst = FALSE; } - else if (svn_dirent_is_child(pair->dst_parent_abspath, src_parent_abspath, - iterpool)) + else if (svn_dirent_is_child(pair->dst_parent_abspath, + src_parent_abspath, NULL) + && !svn_dirent_is_child(pair->dst_parent_abspath, + src_wcroot_abspath, NULL)) { baton.lock_src = FALSE; baton.lock_dst = TRUE;