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 C0BA8185CF for ; Thu, 22 Oct 2015 09:29:21 +0000 (UTC) Received: (qmail 68790 invoked by uid 500); 22 Oct 2015 09:29:21 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 68748 invoked by uid 500); 22 Oct 2015 09:29:21 -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 68738 invoked by uid 99); 22 Oct 2015 09:29:21 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Oct 2015 09:29:21 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 3AE571A081C for ; Thu, 22 Oct 2015 09:29:21 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.79 X-Spam-Level: * X-Spam-Status: No, score=1.79 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id lw1uAS4yqGdq for ; Thu, 22 Oct 2015 09:29:20 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTP id BDCAE23033 for ; Thu, 22 Oct 2015 09:29:19 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 49955E0183 for ; Thu, 22 Oct 2015 09:29:19 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 452033A024F for ; Thu, 22 Oct 2015 09:29:19 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1709968 - in /subversion/branches/move-tracking-2/subversion: include/private/svn_branch.h libsvn_delta/branch.c libsvn_delta/branch_nested.c libsvn_delta/branch_private.h Date: Thu, 22 Oct 2015 09:29:19 -0000 To: commits@subversion.apache.org From: julianfoad@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20151022092919.452033A024F@svn01-us-west.apache.org> Author: julianfoad Date: Thu Oct 22 09:29:18 2015 New Revision: 1709968 URL: http://svn.apache.org/viewvc?rev=1709968&view=rev Log: On the 'move-tracking-2' branch: Add a 'complete' method to the txn class. This continues the refactoring to use branch txn/state objects instead of a single 'editor'. * subversion/include/private/svn_branch.h (svn_branch_txn_complete): New. * subversion/libsvn_delta/branch.c (branch_txn_complete, svn_branch_txn_complete): New. (branch_txn_create): Add it. * subversion/libsvn_delta/branch_nested.c (nested_branch_txn_complete): New. (svn_nested_branch_txn_create): Add it. * subversion/libsvn_delta/branch_private.h (branch_txn_v_complete_t): New. (svn_branch_txn_vtable_t): Add it. Modified: subversion/branches/move-tracking-2/subversion/include/private/svn_branch.h subversion/branches/move-tracking-2/subversion/libsvn_delta/branch.c subversion/branches/move-tracking-2/subversion/libsvn_delta/branch_nested.c subversion/branches/move-tracking-2/subversion/libsvn_delta/branch_private.h Modified: subversion/branches/move-tracking-2/subversion/include/private/svn_branch.h URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/include/private/svn_branch.h?rev=1709968&r1=1709967&r2=1709968&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/include/private/svn_branch.h (original) +++ subversion/branches/move-tracking-2/subversion/include/private/svn_branch.h Thu Oct 22 09:29:18 2015 @@ -222,6 +222,10 @@ svn_error_t * svn_branch_txn_sequence_point(svn_branch_txn_t *txn, apr_pool_t *scratch_pool); +svn_error_t * +svn_branch_txn_complete(svn_branch_txn_t *txn, + apr_pool_t *scratch_pool); + /* Change txn-local EIDs (negative integers) in TXN to revision EIDs, by * assigning a new revision-EID (positive integer) for each one. * Modified: subversion/branches/move-tracking-2/subversion/libsvn_delta/branch.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_delta/branch.c?rev=1709968&r1=1709967&r2=1709968&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_delta/branch.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_delta/branch.c Thu Oct 22 09:29:18 2015 @@ -298,6 +298,14 @@ branch_txn_sequence_point(svn_branch_txn return SVN_NO_ERROR; } +/* An #svn_branch_txn_t method. */ +static svn_error_t * +branch_txn_complete(svn_branch_txn_t *txn, + apr_pool_t *scratch_pool) +{ + return SVN_NO_ERROR; +} + /* * ======================================================================== * Branch Txn Object @@ -406,6 +414,15 @@ svn_branch_txn_sequence_point(svn_branch return SVN_NO_ERROR; } +svn_error_t * +svn_branch_txn_complete(svn_branch_txn_t *txn, + apr_pool_t *scratch_pool) +{ + SVN_ERR(txn->vtable->complete(txn, + scratch_pool)); + return SVN_NO_ERROR; +} + svn_branch_txn_t * svn_branch_txn_create(const svn_branch_txn_vtable_t *vtable, svn_cancel_func_t cancel_func, @@ -448,6 +465,7 @@ branch_txn_create(svn_branch_repos_t *re branch_txn_open_branch, branch_txn_branch, branch_txn_sequence_point, + branch_txn_complete, }; svn_branch_txn_t *txn = svn_branch_txn_create(&vtable, NULL, NULL, result_pool); Modified: subversion/branches/move-tracking-2/subversion/libsvn_delta/branch_nested.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_delta/branch_nested.c?rev=1709968&r1=1709967&r2=1709968&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_delta/branch_nested.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_delta/branch_nested.c Thu Oct 22 09:29:18 2015 @@ -531,6 +531,17 @@ nested_branch_txn_sequence_point(svn_bra return SVN_NO_ERROR; } +/* An #svn_branch_txn_t method. */ +static svn_error_t * +nested_branch_txn_complete(svn_branch_txn_t *txn, + apr_pool_t *scratch_pool) +{ + /* Just forwarding: nothing more is needed. */ + SVN_ERR(svn_branch_txn_complete(txn->priv->wrapped_txn, + scratch_pool)); + return SVN_NO_ERROR; +} + svn_branch_txn_t * svn_nested_branch_txn_create(svn_branch_txn_t *wrapped_txn, apr_pool_t *result_pool) @@ -545,6 +556,7 @@ svn_nested_branch_txn_create(svn_branch_ nested_branch_txn_open_branch, nested_branch_txn_branch, nested_branch_txn_sequence_point, + nested_branch_txn_complete, }; svn_branch_txn_t *txn = svn_branch_txn_create(&vtable, NULL, NULL, result_pool); Modified: subversion/branches/move-tracking-2/subversion/libsvn_delta/branch_private.h URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_delta/branch_private.h?rev=1709968&r1=1709967&r2=1709968&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_delta/branch_private.h (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_delta/branch_private.h Thu Oct 22 09:29:18 2015 @@ -102,6 +102,10 @@ typedef svn_error_t *(*branch_txn_v_sequ svn_branch_txn_t *txn, apr_pool_t *scratch_pool); +typedef svn_error_t *(*branch_txn_v_complete_t)( + svn_branch_txn_t *txn, + apr_pool_t *scratch_pool); + struct svn_branch_txn_vtable_t { svn_vtable_priv_t vpriv; @@ -115,6 +119,7 @@ struct svn_branch_txn_vtable_t branch_txn_v_open_branch_t open_branch; branch_txn_v_branch_t branch; branch_txn_v_sequence_point_t sequence_point; + branch_txn_v_complete_t complete; };