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 EC685DBE5 for ; Fri, 21 Sep 2012 09:29:06 +0000 (UTC) Received: (qmail 2440 invoked by uid 500); 21 Sep 2012 09:29:06 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 2413 invoked by uid 500); 21 Sep 2012 09:29:06 -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 2380 invoked by uid 99); 21 Sep 2012 09:29:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Sep 2012 09:29:05 +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; Fri, 21 Sep 2012 09:28:58 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 1835C23889D7; Fri, 21 Sep 2012 09:28:15 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn propchange: r1388302 - svn:log Date: Fri, 21 Sep 2012 09:28:15 -0000 To: commits@subversion.apache.org From: philip@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120921092815.1835C23889D7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: philip Revision: 1388302 Modified property: svn:log Modified: svn:log at Fri Sep 21 09:28:15 2012 ------------------------------------------------------------------------------ --- svn:log (original) +++ svn:log Fri Sep 21 09:28:15 2012 @@ -4,135 +4,3 @@ were used only once and didn't add value * subversion/libsvn_client/merge.c (open_source_and_target, close_source_and_target): Remove. (svn_client__find_symmetric_merge): In-line their content here. -Index: subversion/libsvn_client/merge.c -=================================================================== ---- subversion/libsvn_client/merge.c (revision 1388290) -+++ subversion/libsvn_client/merge.c (working copy) -@@ -11156,63 +11156,12 @@ typedef struct source_and_target_t - svn_mergeinfo_t target_mergeinfo; - - /* Repos location of the youngest common ancestor of SOURCE and TARGET. */ - svn_client__pathrev_t *yca; - } source_and_target_t; - --/* "Open" the source and target branches of a merge. That means: -- * - find out their exact repository locations (resolve WC paths and -- * non-numeric revision numbers), -- * - check the branches are suitably related, -- * - establish RA session(s) to the repo, -- * - check the WC for suitability (throw an error if unsuitable) -- * -- * Record this information and return it in a new "merge context" object. -- */ --static svn_error_t * --open_source_and_target(source_and_target_t **source_and_target, -- const char *source_path_or_url, -- const svn_opt_revision_t *source_peg_revision, -- const char *target_abspath, -- svn_boolean_t allow_mixed_rev, -- svn_boolean_t allow_local_mods, -- svn_boolean_t allow_switched_subtrees, -- svn_client_ctx_t *ctx, -- apr_pool_t *session_pool, -- apr_pool_t *result_pool, -- apr_pool_t *scratch_pool) --{ -- source_and_target_t *s_t = apr_palloc(result_pool, sizeof(*s_t)); -- -- /* Target */ -- SVN_ERR(open_target_wc(&s_t->target, target_abspath, -- allow_mixed_rev, allow_local_mods, allow_switched_subtrees, -- ctx, result_pool, scratch_pool)); -- SVN_ERR(svn_client_open_ra_session(&s_t->target_ra_session, -- s_t->target->loc.url, -- ctx, session_pool)); -- -- /* Source */ -- SVN_ERR(svn_client__ra_session_from_path2( -- &s_t->source_ra_session, &s_t->source, -- source_path_or_url, NULL, source_peg_revision, source_peg_revision, -- ctx, session_pool)); -- -- *source_and_target = s_t; -- return SVN_NO_ERROR; --} -- --/* "Close" any resources that were acquired in the S_T structure. */ --static svn_error_t * --close_source_and_target(source_and_target_t *s_t, -- apr_pool_t *scratch_pool) --{ -- /* close s_t->source_/target_ra_session */ -- return SVN_NO_ERROR; --} -- - /* Set *INTERSECTION_P to the intersection of BRANCH_HISTORY with the - * revision range OLDEST_REV to YOUNGEST_REV (inclusive). - * - * If the intersection is empty, the result will be a branch history object - * containing an empty (not null) history. - * -@@ -11555,28 +11504,36 @@ svn_client__find_symmetric_merge(svn_cli - svn_boolean_t allow_switched_subtrees, - svn_client_ctx_t *ctx, - apr_pool_t *result_pool, - apr_pool_t *scratch_pool) - { - const char *target_abspath; -- source_and_target_t *s_t; -+ source_and_target_t *s_t = apr_palloc(result_pool, sizeof(*s_t)); - svn_client__symmetric_merge_t *merge = apr_palloc(result_pool, sizeof(*merge)); - - SVN_ERR(svn_dirent_get_absolute(&target_abspath, target_wcpath, scratch_pool)); - -- /* Open RA sessions to the source and target trees. We're not going -- * to check the target WC for mixed-rev, local mods or switched -- * subtrees yet. After we find out what kind of merge is required, -- * then if a reintegrate-like merge is required we'll do the stricter -- * checks, in do_symmetric_merge_locked(). */ -- SVN_ERR(open_source_and_target(&s_t, source_path_or_url, source_revision, -- target_abspath, -- TRUE /*allow_mixed_rev*/, -- TRUE /*allow_local_mods*/, -- TRUE /*allow_switched_subtrees*/, -- ctx, result_pool, result_pool, scratch_pool)); -+ /* "Open" the target WC. We're not going to check the target WC for -+ * mixed-rev, local mods or switched subtrees yet. After we find out -+ * what kind of merge is required, then if a reintegrate-like merge is -+ * required we'll do the stricter checks, in do_symmetric_merge_locked(). */ -+ SVN_ERR(open_target_wc(&s_t->target, target_abspath, -+ TRUE /*allow_mixed_rev*/, -+ TRUE /*allow_local_mods*/, -+ TRUE /*allow_switched_subtrees*/, -+ ctx, result_pool, scratch_pool)); -+ -+ /* Open RA sessions to the source and target trees. */ -+ SVN_ERR(svn_client_open_ra_session(&s_t->target_ra_session, -+ s_t->target->loc.url, -+ ctx, result_pool)); -+ /* ### check for null URL (i.e. added path) here, like in reintegrate? */ -+ SVN_ERR(svn_client__ra_session_from_path2( -+ &s_t->source_ra_session, &s_t->source, -+ source_path_or_url, NULL, source_revision, source_revision, -+ ctx, result_pool)); - - /* Check source is in same repos as target. */ - SVN_ERR(check_same_repos(s_t->source, source_path_or_url, - &s_t->target->loc, target_wcpath, - TRUE /* strict_urls */, scratch_pool)); - -@@ -11587,13 +11544,13 @@ svn_client__find_symmetric_merge(svn_cli - merge->allow_mixed_rev = allow_mixed_rev; - merge->allow_local_mods = allow_local_mods; - merge->allow_switched_subtrees = allow_switched_subtrees; - - *merge_p = merge; - -- SVN_ERR(close_source_and_target(s_t, scratch_pool)); -+ /* TODO: Close the source and target sessions here? */ - - return SVN_NO_ERROR; - } - - /* The body of svn_client__do_symmetric_merge(), which see. - *