You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2015/10/22 17:33:05 UTC

svn commit: r1710037 - in /subversion/branches/move-tracking-2/subversion: include/private/svn_editor3e.h include/private/svn_ra_private.h libsvn_delta/compat3e.c libsvn_ra/ra_loader.c svnmover/svnmover.c

Author: julianfoad
Date: Thu Oct 22 15:33:04 2015
New Revision: 1710037

URL: http://svn.apache.org/viewvc?rev=1710037&view=rev
Log:
On the 'move-tracking-2' branch: Let the compatibility layer work with a
'branch txn' class instead of an 'editor'.

This continues the refactoring to use branch txn/state objects instead of
a single 'editor'.

* subversion/include/private/svn_editor3e.h
  (svn_editor3__ev3_from_delta_for_commit,
   svn_editor3__delta_from_ev3_for_commit,
   svn_update_editor3_t): Use a 'branch txn' instead of an 'editor'.

* subversion/include/private/svn_ra_private.h,
  subversion/libsvn_ra/ra_loader.c
  (svn_ra_get_commit_editor_ev3): Remove the 'editor' output parameter.

* subversion/libsvn_delta/compat3e.c
  (svn_editor3__insert_shims,
  (svn_editor3__delta_from_ev3_for_commit,
  (svn_editor3__delta_from_ev3_for_update): Use a 'branch txn' instead of an
    'editor'.
  (editor3_*): Delete.
  (svn_branch_txn_priv_t,
   compat_branch_txn_*): New, replacing editor3_*.
  (svn_editor3__ev3_from_delta_for_commit,
   svn_editor3__ev3_from_delta_for_update): Use a 'branch txn' instead of an
    'editor'.

* subversion/svnmover/svnmover.c
  (wc_checkout): Wrap the basic txn in a branch-nesting txn wrapper.
  (wc_commit): Use a 'branch txn' instead of an 'editor'.
  (replay,
   svn_branch_merge,
   do_branch_and_delete,
   execute): Don't wrap in a branch-nesting txn wrapper here.

Modified:
    subversion/branches/move-tracking-2/subversion/include/private/svn_editor3e.h
    subversion/branches/move-tracking-2/subversion/include/private/svn_ra_private.h
    subversion/branches/move-tracking-2/subversion/libsvn_delta/compat3e.c
    subversion/branches/move-tracking-2/subversion/libsvn_ra/ra_loader.c
    subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c

Modified: subversion/branches/move-tracking-2/subversion/include/private/svn_editor3e.h
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/include/private/svn_editor3e.h?rev=1710037&r1=1710036&r2=1710037&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/include/private/svn_editor3e.h (original)
+++ subversion/branches/move-tracking-2/subversion/include/private/svn_editor3e.h Thu Oct 22 15:33:04 2015
@@ -1104,7 +1104,7 @@ typedef struct svn_editor3__shim_connect
  */
 svn_error_t *
 svn_editor3__ev3_from_delta_for_commit(
-                        svn_editor3_t **editor_p,
+                        svn_branch_txn_t **txn_p,
                         svn_editor3__shim_connector_t **shim_connector,
                         const svn_delta_editor_t *deditor,
                         void *dedit_baton,
@@ -1138,7 +1138,7 @@ svn_error_t *
 svn_editor3__delta_from_ev3_for_commit(
                         const svn_delta_editor_t **deditor,
                         void **dedit_baton,
-                        svn_editor3_t *editor,
+                        svn_branch_txn_t *edit_txn,
                         const char *repos_root_url,
                         const char *base_relpath,
                         svn_editor3__shim_fetch_func_t fetch_func,
@@ -1183,8 +1183,8 @@ typedef svn_error_t *(*svn_editor3__set_
  * resources needed for use as an update or switch editor.
  */
 typedef struct svn_update_editor3_t {
-  /* The basic editor. */
-  svn_editor3_t *editor;
+  /* The txn we're driving. */
+  svn_branch_txn_t *edit_txn;
 
   /* A method to communicate the target revision of the update (or switch),
    * to be called before driving the editor. It has its own baton, rather

Modified: subversion/branches/move-tracking-2/subversion/include/private/svn_ra_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/include/private/svn_ra_private.h?rev=1710037&r1=1710036&r2=1710037&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/include/private/svn_ra_private.h (original)
+++ subversion/branches/move-tracking-2/subversion/include/private/svn_ra_private.h Thu Oct 22 15:33:04 2015
@@ -328,7 +328,6 @@ svn_ra_load_branching_state(svn_branch_t
 svn_error_t *
 svn_ra_get_commit_editor_ev3(svn_ra_session_t *session,
                              svn_branch_txn_t **edit_txn_p,
-                             svn_editor3_t **editor,
                              apr_hash_t *revprop_table,
                              svn_commit_callback2_t commit_callback,
                              void *commit_baton,

Modified: subversion/branches/move-tracking-2/subversion/libsvn_delta/compat3e.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_delta/compat3e.c?rev=1710037&r1=1710036&r2=1710037&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_delta/compat3e.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_delta/compat3e.c Thu Oct 22 15:33:04 2015
@@ -36,6 +36,9 @@
 #include "private/svn_delta_private.h"
 #include "private/svn_editor3e.h"
 #include "../libsvn_delta/debug_editor.h"
+
+#include "branch_private.h"
+
 #include "svn_private_config.h"
 
 
@@ -130,7 +133,7 @@ svn_editor3__insert_shims(
                         apr_pool_t *scratch_pool)
 {
 #if 0
-  svn_editor3_t *editor3;
+  svn_branch_txn_t *edit_txn;
   svn_editor3__shim_connector_t *shim_connector;
 
 #ifdef SVN_DEBUG
@@ -139,7 +142,7 @@ svn_editor3__insert_shims(
                                       "[OUT] ", result_pool));*/
 #endif
   SVN_ERR(svn_editor3__ev3_from_delta_for_commit(
-                        &editor3,
+                        &edit_txn,
                         &shim_connector,
                         old_deditor, old_dedit_baton,
                         branching_txn,
@@ -147,12 +150,9 @@ svn_editor3__insert_shims(
                         fetch_func, fetch_baton,
                         NULL, NULL /*cancel*/,
                         result_pool, scratch_pool));
-#ifdef SVN_DEBUG
-  /*SVN_ERR(svn_editor3__get_debug_editor(&editor3, editor3, result_pool));*/
-#endif
   SVN_ERR(svn_editor3__delta_from_ev3_for_commit(
                         new_deditor, new_dedit_baton,
-                        editor3,
+                        edit_txn,
                         repos_root, base_relpath,
                         fetch_func, fetch_baton,
                         shim_connector,
@@ -428,7 +428,7 @@ svn_error_t *
 svn_editor3__delta_from_ev3_for_commit(
                         const svn_delta_editor_t **deditor,
                         void **dedit_baton,
-                        svn_editor3_t *editor,
+                        svn_branch_txn_t *edit_txn,
                         const char *repos_root_url,
                         const char *base_relpath,
                         svn_editor3__shim_fetch_func_t fetch_func,
@@ -465,7 +465,7 @@ svn_editor3__delta_from_ev3_for_update(
 
   SVN_ERR(svn_editor3__delta_from_ev3_for_commit(
                         deditor, dedit_baton,
-                        update_editor->editor,
+                        update_editor->edit_txn,
                         repos_root_url, base_repos_relpath,
                         fetch_func, fetch_baton,
                         shim_connector,
@@ -1022,6 +1022,15 @@ storage_pathrev_from_branch_ref(svn_path
  * ========================================================================
  */
 
+struct svn_branch_txn_priv_t
+{
+  /* The underlying branch-txn that supports
+   ### ? only non-nested branching. */
+  svn_branch_txn_t *wrapped_txn;
+
+  ev3_from_delta_baton_t *eb;
+};
+
 /*  */
 #define PAYLOAD_IS_ONLY_BY_REFERENCE(payload) \
     ((payload)->kind == svn_node_unknown)
@@ -1140,169 +1149,6 @@ payload_resolve(svn_element_payload_t *p
   return SVN_NO_ERROR;
 }
 
-/* An #svn_editor3_t method. */
-static svn_error_t *
-editor3_new_eid(void *baton,
-                svn_branch_eid_t *eid_p,
-                apr_pool_t *scratch_pool)
-{
-  ev3_from_delta_baton_t *eb = baton;
-  svn_branch_txn_t *txn = eb->txn;
-
-  txn = svn_nested_branch_txn_create(txn, scratch_pool);
-  SVN_ERR(svn_branch_txn_new_eid(txn, eid_p, scratch_pool));
-  return SVN_NO_ERROR;
-}
-
-/* An #svn_editor3_t method. */
-static svn_error_t *
-editor3_open_branch(void *baton,
-                    const char **new_branch_id_p,
-                    svn_branch_rev_bid_t *predecessor,
-                    const char *outer_branch_id,
-                    int outer_eid,
-                    int root_eid,
-                    apr_pool_t *result_pool,
-                    apr_pool_t *scratch_pool)
-{
-  ev3_from_delta_baton_t *eb = baton;
-  svn_branch_txn_t *txn = eb->txn;
-  svn_branch_state_t *new_branch;
-
-  txn = svn_nested_branch_txn_create(txn, scratch_pool);
-  SVN_ERR(svn_branch_txn_open_branch(txn,
-                                     &new_branch,
-                                     predecessor,
-                                     outer_branch_id,
-                                     outer_eid,
-                                     root_eid,
-                                     result_pool,
-                                     scratch_pool));
-  *new_branch_id_p = new_branch->bid;
-  return SVN_NO_ERROR;
-}
-
-/* An #svn_editor3_t method. */
-static svn_error_t *
-editor3_branch(void *baton,
-               const char **new_branch_id_p,
-               svn_branch_rev_bid_eid_t *from,
-               const char *outer_branch_id,
-               int outer_eid,
-               apr_pool_t *result_pool,
-               apr_pool_t *scratch_pool)
-{
-  ev3_from_delta_baton_t *eb = baton;
-  svn_branch_txn_t *txn = eb->txn;
-  svn_branch_state_t *new_branch;
-
-  txn = svn_nested_branch_txn_create(txn, scratch_pool);
-  SVN_ERR(svn_branch_txn_branch(txn,
-                                &new_branch,
-                                from,
-                                outer_branch_id,
-                                outer_eid,
-                                result_pool,
-                                scratch_pool));
-
-  *new_branch_id_p = new_branch->bid;
-  return SVN_NO_ERROR;
-}
-
-/* An #svn_editor3_t method. */
-static svn_error_t *
-editor3_alter(void *baton,
-              const char *branch_id,
-              svn_branch_eid_t eid,
-              svn_branch_eid_t new_parent_eid,
-              const char *new_name,
-              const svn_element_payload_t *new_payload,
-              apr_pool_t *scratch_pool)
-{
-  ev3_from_delta_baton_t *eb = baton;
-  svn_branch_state_t *branch
-    = svn_branch_txn_get_branch_by_id(eb->txn, branch_id, scratch_pool);
-
-  if (! new_payload->is_subbranch_root)
-    {
-      SVN_DBG(("alter(e%d): parent e%d, name '%s', kind %s",
-               eid, new_parent_eid,
-               new_name, svn_node_kind_to_word(new_payload->kind)));
-
-    }
-  else
-    {
-      SVN_DBG(("alter(e%d): parent e%d, name '%s', kind (subbranch)",
-               eid, new_parent_eid, new_name));
-    }
-  SVN_ERR(svn_branch_state_alter_one(branch, eid, new_parent_eid, new_name,
-                                     new_payload, scratch_pool));
-
-  return SVN_NO_ERROR;
-}
-
-/* An #svn_editor3_t method. */
-static svn_error_t *
-editor3_copy_one(void *baton,
-                 const svn_branch_rev_bid_eid_t *src_el_rev,
-                 const char *branch_id,
-                 svn_branch_eid_t eid,
-                 svn_branch_eid_t new_parent_eid,
-                 const char *new_name,
-                 const svn_element_payload_t *new_payload,
-                 apr_pool_t *scratch_pool)
-{
-  /* New payload shall be the same as the source if NEW_PAYLOAD is null. */
-  /* ### if (! new_payload)
-    {
-      new_payload = branch_map_get(branch, eid)->payload;
-    }
-   */
-
-  return SVN_NO_ERROR;
-}
-
-/* An #svn_editor3_t method. */
-static svn_error_t *
-editor3_copy_tree(void *baton,
-                  const svn_branch_rev_bid_eid_t *src_el_rev,
-                  const char *to_branch_id,
-                  svn_branch_eid_t new_parent_eid,
-                  const char *new_name,
-                  apr_pool_t *scratch_pool)
-{
-  ev3_from_delta_baton_t *eb = baton;
-  svn_branch_state_t *to_branch
-    = svn_branch_txn_get_branch_by_id(eb->txn, to_branch_id, scratch_pool);
-
-  SVN_ERR(svn_branch_state_copy_tree(to_branch,
-                                     src_el_rev, new_parent_eid, new_name,
-                                     scratch_pool));
-
-  /* ### TODO: If any copied elements are subbranch-roots, ... Unimplemented. */
-
-  return SVN_NO_ERROR;
-}
-
-/* An #svn_editor3_t method. */
-static svn_error_t *
-editor3_delete(void *baton,
-                   const char *branch_id,
-                   svn_branch_eid_t eid,
-                   apr_pool_t *scratch_pool)
-{
-  ev3_from_delta_baton_t *eb = baton;
-  svn_branch_state_t *branch
-    = svn_branch_txn_get_branch_by_id(eb->txn, branch_id, scratch_pool);
-
-  SVN_DBG(("delete(b%s e%d)",
-           svn_branch_get_id(branch, scratch_pool), eid));
-
-  SVN_ERR(svn_branch_state_delete_one(branch, eid, scratch_pool));
-
-  return SVN_NO_ERROR;
-}
-
 /* Update *PATHS, a hash of (storage_rrpath -> svn_branch_el_rev_id_t),
  * creating or filling in entries for all elements in BRANCH.
  */
@@ -1804,31 +1650,178 @@ drive_changes(ev3_from_delta_baton_t *eb
   return SVN_NO_ERROR;
 }
 
-/* An #svn_editor3_t method. */
+/* An #svn_branch_txn_t method. */
+static apr_array_header_t *
+compat_branch_txn_get_branches(const svn_branch_txn_t *txn,
+                               apr_pool_t *result_pool)
+{
+  /* Just forwarding: nothing more is needed. */
+  apr_array_header_t *branches
+    = svn_branch_txn_get_branches(txn->priv->wrapped_txn,
+                                  result_pool);
+
+  return branches;
+}
+
+/* An #svn_branch_txn_t method. */
 static svn_error_t *
-editor3_sequence_point(void *baton,
-                       apr_pool_t *scratch_pool)
+compat_branch_txn_add_branch(svn_branch_txn_t *txn,
+                             svn_branch_state_t *branch,
+                             apr_pool_t *scratch_pool)
 {
-  ev3_from_delta_baton_t *eb = baton;
-  svn_branch_txn_t *txn = eb->txn;
+  /* Just forwarding: nothing more is needed. */
+  SVN_ERR(svn_branch_txn_add_branch(txn->priv->wrapped_txn,
+                                    branch,
+                                    scratch_pool));
+  return SVN_NO_ERROR;
+}
 
-  txn = svn_nested_branch_txn_create(txn, scratch_pool);
-  SVN_ERR(svn_branch_txn_sequence_point(txn, scratch_pool));
+/* An #svn_branch_txn_t method. */
+static svn_branch_state_t *
+compat_branch_txn_add_new_branch(svn_branch_txn_t *txn,
+                                 const char *bid,
+                                 svn_branch_rev_bid_t *predecessor,
+                                 int root_eid,
+                                 apr_pool_t *scratch_pool)
+{
+  /* Just forwarding: nothing more is needed. */
+  svn_branch_state_t *new_branch
+    = svn_branch_txn_add_new_branch(txn->priv->wrapped_txn,
+                                    bid, predecessor, root_eid,
+                                    scratch_pool);
 
+  return new_branch;
+}
+
+/* An #svn_branch_txn_t method. */
+static svn_error_t *
+compat_branch_txn_delete_branch(svn_branch_txn_t *txn,
+                                const char *bid,
+                                apr_pool_t *scratch_pool)
+{
+  /* Just forwarding: nothing more is needed. */
+  SVN_ERR(svn_branch_txn_delete_branch(txn->priv->wrapped_txn,
+                                       bid,
+                                       scratch_pool));
   return SVN_NO_ERROR;
 }
 
-/* An #svn_editor3_t method. */
+/* An #svn_branch_txn_t method. */
 static svn_error_t *
-editor3_complete(void *baton,
-                 apr_pool_t *scratch_pool)
+compat_branch_txn_get_num_new_eids(const svn_branch_txn_t *txn,
+                                   int *num_new_eids_p,
+                                   apr_pool_t *scratch_pool)
 {
-  ev3_from_delta_baton_t *eb = baton;
+  /* Just forwarding: nothing more is needed. */
+  SVN_ERR(svn_branch_txn_get_num_new_eids(txn->priv->wrapped_txn,
+                                          num_new_eids_p,
+                                          scratch_pool));
+  return SVN_NO_ERROR;
+}
+
+/* An #svn_branch_txn_t method. */
+static svn_error_t *
+compat_branch_txn_new_eid(svn_branch_txn_t *txn,
+                          svn_branch_eid_t *eid_p,
+                          apr_pool_t *scratch_pool)
+{
+  /* Just forwarding: nothing more is needed. */
+  SVN_ERR(svn_branch_txn_new_eid(txn->priv->wrapped_txn,
+                                 eid_p,
+                                 scratch_pool));
+  return SVN_NO_ERROR;
+}
+
+/* An #svn_branch_txn_t method. */
+static svn_error_t *
+compat_branch_txn_finalize_eids(svn_branch_txn_t *txn,
+                                apr_pool_t *scratch_pool)
+{
+  /* Just forwarding: nothing more is needed. */
+  SVN_ERR(svn_branch_txn_finalize_eids(txn->priv->wrapped_txn,
+                                       scratch_pool));
+  return SVN_NO_ERROR;
+}
+
+/* An #svn_branch_txn_t method. */
+static svn_error_t *
+compat_branch_txn_open_branch(svn_branch_txn_t *txn,
+                              svn_branch_state_t **new_branch_p,
+                              svn_branch_rev_bid_t *predecessor,
+                              const char *outer_branch_id,
+                              int outer_eid,
+                              int root_eid,
+                              apr_pool_t *result_pool,
+                              apr_pool_t *scratch_pool)
+{
+  /* Just forwarding: nothing more is needed. */
+  SVN_ERR(svn_branch_txn_open_branch(txn->priv->wrapped_txn,
+                                     new_branch_p, predecessor,
+                                     outer_branch_id, outer_eid, root_eid,
+                                     result_pool,
+                                     scratch_pool));
+  return SVN_NO_ERROR;
+}
+
+/* An #svn_branch_txn_t method. */
+static svn_error_t *
+compat_branch_txn_branch(svn_branch_txn_t *txn,
+                         svn_branch_state_t **new_branch_p,
+                         svn_branch_rev_bid_eid_t *from,
+                         const char *outer_branch_id,
+                         int outer_eid,
+                         apr_pool_t *result_pool,
+                         apr_pool_t *scratch_pool)
+{
+  svn_branch_state_t *new_branch;
+
+  /* Just forwarding: nothing more is needed. */
+  SVN_ERR(svn_branch_txn_branch(txn->priv->wrapped_txn,
+                                &new_branch, from,
+                                outer_branch_id, outer_eid,
+                                result_pool,
+                                scratch_pool));
+
+  if (new_branch_p)
+    *new_branch_p = new_branch;
+  return SVN_NO_ERROR;
+}
+
+/* An #svn_branch_txn_t method. */
+static svn_error_t *
+compat_branch_txn_serialize(svn_branch_txn_t *txn,
+                            svn_stream_t *stream,
+                            apr_pool_t *scratch_pool)
+{
+  /* Just forwarding: nothing more is needed. */
+  SVN_ERR(svn_branch_txn_serialize(txn->priv->wrapped_txn,
+                                   stream,
+                                   scratch_pool));
+  return SVN_NO_ERROR;
+}
+
+/* An #svn_branch_txn_t method. */
+static svn_error_t *
+compat_branch_txn_sequence_point(svn_branch_txn_t *txn,
+                                 apr_pool_t *scratch_pool)
+{
+  /* Just forwarding: nothing more is needed. */
+  SVN_ERR(svn_branch_txn_sequence_point(txn->priv->wrapped_txn,
+                                        scratch_pool));
+  return SVN_NO_ERROR;
+}
+
+/* An #svn_branch_txn_t method. */
+static svn_error_t *
+compat_branch_txn_complete(svn_branch_txn_t *txn,
+                           apr_pool_t *scratch_pool)
+{
+  ev3_from_delta_baton_t *eb = txn->priv->eb;
   svn_error_t *err;
 
   /* Convert the transaction to a revision */
-  SVN_ERR(editor3_sequence_point(baton, scratch_pool));
-  SVN_ERR(svn_branch_txn_finalize_eids(eb->txn, scratch_pool));
+  SVN_ERR(svn_branch_txn_sequence_point(txn->priv->wrapped_txn, scratch_pool));
+  SVN_ERR(svn_branch_txn_finalize_eids(txn->priv->wrapped_txn, scratch_pool));
 
   err = drive_changes(eb, scratch_pool);
 
@@ -1842,18 +1835,22 @@ editor3_complete(void *baton,
   if (err)
     svn_error_clear(eb->deditor->abort_edit(eb->dedit_baton, scratch_pool));
 
+  SVN_ERR(svn_branch_txn_complete(txn->priv->wrapped_txn, scratch_pool));
+
   return err;
 }
 
-/* An #svn_editor3_t method. */
+/* An #svn_branch_txn_t method. */
 static svn_error_t *
-editor3_abort(void *baton,
-              apr_pool_t *scratch_pool)
+compat_branch_txn_abort(svn_branch_txn_t *txn,
+                        apr_pool_t *scratch_pool)
 {
-  ev3_from_delta_baton_t *eb = baton;
+  ev3_from_delta_baton_t *eb = txn->priv->eb;
 
   SVN_ERR(eb->deditor->abort_edit(eb->dedit_baton, scratch_pool));
 
+  SVN_ERR(svn_branch_txn_abort(txn->priv->wrapped_txn,
+                               scratch_pool));
   return SVN_NO_ERROR;
 }
 
@@ -1905,7 +1902,7 @@ wrap_fetch_func(svn_node_kind_t *kind,
 
 svn_error_t *
 svn_editor3__ev3_from_delta_for_commit(
-                        svn_editor3_t **editor_p,
+                        svn_branch_txn_t **txn_p,
                         svn_editor3__shim_connector_t **shim_connector,
                         const svn_delta_editor_t *deditor,
                         void *dedit_baton,
@@ -1918,18 +1915,23 @@ svn_editor3__ev3_from_delta_for_commit(
                         apr_pool_t *result_pool,
                         apr_pool_t *scratch_pool)
 {
-  static const svn_editor3_cb_funcs_t editor_funcs = {
-    editor3_new_eid,
-    editor3_open_branch,
-    editor3_branch,
-    editor3_alter,
-    editor3_copy_one,
-    editor3_copy_tree,
-    editor3_delete,
-    editor3_sequence_point,
-    editor3_complete,
-    editor3_abort
+  static const svn_branch_txn_vtable_t vtable = {
+    {0},
+    compat_branch_txn_get_branches,
+    compat_branch_txn_add_branch,
+    compat_branch_txn_add_new_branch,
+    compat_branch_txn_delete_branch,
+    compat_branch_txn_get_num_new_eids,
+    compat_branch_txn_new_eid,
+    compat_branch_txn_open_branch,
+    compat_branch_txn_branch,
+    compat_branch_txn_finalize_eids,
+    compat_branch_txn_serialize,
+    compat_branch_txn_sequence_point,
+    compat_branch_txn_complete,
+    compat_branch_txn_abort
   };
+  svn_branch_txn_t *txn;
   ev3_from_delta_baton_t *eb = apr_pcalloc(result_pool, sizeof(*eb));
   wrap_fetch_baton_t *wb = apr_pcalloc(result_pool, sizeof(*wb));
 
@@ -1947,11 +1949,19 @@ svn_editor3__ev3_from_delta_for_commit(
 
   eb->edit_pool = result_pool;
 
-  *editor_p = svn_editor3_create(&editor_funcs, eb,
-                                 cancel_func, cancel_baton, result_pool);
+  branching_txn = svn_nested_branch_txn_create(branching_txn, result_pool);
 
   eb->txn = branching_txn;
 
+  txn = svn_branch_txn_create(&vtable, NULL, NULL, result_pool);
+  txn->priv = apr_pcalloc(result_pool, sizeof(*txn->priv));
+  txn->priv->wrapped_txn = branching_txn;
+  txn->priv->eb = eb;
+  txn->repos = branching_txn->repos;
+  txn->rev = branching_txn->rev;
+  txn->base_rev = branching_txn->base_rev;
+  *txn_p = txn;
+
   if (shim_connector)
     {
 #if 0
@@ -1999,7 +2009,7 @@ svn_editor3__ev3_from_delta_for_update(
                                       deditor, dedit_baton,
                                       "[1>UP] ", result_pool));*/
   SVN_ERR(svn_editor3__ev3_from_delta_for_commit(
-                        &update_editor->editor,
+                        &update_editor->edit_txn,
                         &shim_connector,
                         deditor, dedit_baton,
                         branching_txn, repos_root_url,

Modified: subversion/branches/move-tracking-2/subversion/libsvn_ra/ra_loader.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_ra/ra_loader.c?rev=1710037&r1=1710036&r2=1710037&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_ra/ra_loader.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_ra/ra_loader.c Thu Oct 22 15:33:04 2015
@@ -1058,7 +1058,6 @@ svn_ra_load_branching_state(svn_branch_t
 svn_error_t *
 svn_ra_get_commit_editor_ev3(svn_ra_session_t *session,
                              svn_branch_txn_t **edit_txn_p,
-                             svn_editor3_t **editor,
                              apr_hash_t *revprop_table,
                              svn_commit_callback2_t commit_callback,
                              void *commit_baton,
@@ -1102,7 +1101,7 @@ svn_ra_get_commit_editor_ev3(svn_ra_sess
       SVN_ERR(svn_delta__get_debug_editor(&deditor, &dedit_baton,
                                           deditor, dedit_baton, "", pool));*/
     SVN_ERR(svn_editor3__ev3_from_delta_for_commit(
-                        editor,
+                        edit_txn_p,
                         &shim_connector,
                         deditor, dedit_baton, branching_txn,
                         repos_root_url,
@@ -1111,8 +1110,6 @@ svn_ra_get_commit_editor_ev3(svn_ra_sess
                         pool, pool));
   }
 
-  if (edit_txn_p)
-    *edit_txn_p = branching_txn;
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c?rev=1710037&r1=1710036&r2=1710037&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c (original)
+++ subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c Thu Oct 22 15:33:04 2015
@@ -193,6 +193,8 @@ wc_checkout(svnmover_wc_t *wc,
                                       base_revision,
                                       wc->pool, scratch_pool));
 
+  wc->edit_txn = svn_nested_branch_txn_create(wc->edit_txn, wc->pool);
+
   /* Store the WC base state */
   base_txn = svn_branch_repos_get_base_revision_root(wc->edit_txn);
   wc->base = apr_pcalloc(wc->pool, sizeof(*wc->base));
@@ -548,7 +550,6 @@ replay(svn_branch_txn_t *edit_txn,
 {
   SVN_ERR_ASSERT(left_branch || right_branch);
 
-  edit_txn = svn_nested_branch_txn_create(edit_txn, scratch_pool);
   SVN_ERR(svn_branch_replay(edit_txn, edit_root_branch,
                             left_branch, right_branch, scratch_pool));
   return SVN_NO_ERROR;
@@ -621,7 +622,6 @@ wc_commit(svn_revnum_t *new_rev_p,
 {
   const char *branch_info_dir = NULL;
   svn_branch_txn_t *commit_txn;
-  svn_editor3_t *commit_editor;
   commit_callback_baton_t ccbb;
   svn_boolean_t change_detected;
   const char *edit_root_branch_id;
@@ -651,7 +651,7 @@ wc_commit(svn_revnum_t *new_rev_p,
 
   /* Start a new editor for the commit. */
   SVN_ERR(svn_ra_get_commit_editor_ev3(wc->ra_session,
-                                       &commit_txn, &commit_editor,
+                                       &commit_txn,
                                        revprops,
                                        commit_callback, &ccbb,
                                        NULL /*lock_tokens*/, FALSE /*keep_locks*/,
@@ -694,7 +694,7 @@ wc_commit(svn_revnum_t *new_rev_p,
       ccbb.wc_base_branch_id = wc->base->branch_id;
       ccbb.wc_commit_branch_id = edit_root_branch_id;
 
-      SVN_ERR(svn_editor3_complete(commit_editor));
+      SVN_ERR(svn_branch_txn_complete(commit_txn, scratch_pool));
       SVN_ERR(display_diff_of_commit(&ccbb, scratch_pool));
 
       wc->head_revision = ccbb.revision;
@@ -703,7 +703,7 @@ wc_commit(svn_revnum_t *new_rev_p,
     }
   else
     {
-      SVN_ERR(svn_editor3_abort(commit_editor));
+      SVN_ERR(svn_branch_txn_abort(commit_txn, scratch_pool));
       if (new_rev_p)
         *new_rev_p = SVN_INVALID_REVNUM;
     }
@@ -1783,7 +1783,6 @@ svn_branch_merge(svn_branch_txn_t *edit_
   /*SVN_ERR(verify_not_subbranch_root(to, scratch_pool));*/
   /*SVN_ERR(verify_not_subbranch_root(yca, scratch_pool));*/
 
-  edit_txn = svn_nested_branch_txn_create(edit_txn, scratch_pool);
   SVN_ERR(branch_merge_subtree_r(edit_txn, src, tgt, yca, scratch_pool));
 
   return SVN_NO_ERROR;
@@ -2635,7 +2634,6 @@ do_branch_and_delete(svn_branch_txn_t *e
 
   SVN_ERR_ASSERT(! is_branch_root_element(el_rev->branch, el_rev->eid));
 
-  edit_txn = svn_nested_branch_txn_create(edit_txn, scratch_pool);
   SVN_ERR(do_branch(&new_branch, edit_txn, from,
                     to_outer_branch, to_outer_parent_eid, to_name,
                     scratch_pool, scratch_pool));
@@ -3298,11 +3296,9 @@ execute(svnmover_wc_t *wc,
             svn_branch_rev_bid_eid_t *from
               = svn_branch_rev_bid_eid_create(arg[0]->el_rev->rev, from_branch_id,
                                               arg[0]->el_rev->eid, iterpool);
-            svn_branch_txn_t *edit_txn
-              = svn_nested_branch_txn_create(wc->edit_txn, iterpool);
             svn_branch_state_t *new_branch;
 
-            SVN_ERR(do_branch(&new_branch, edit_txn,
+            SVN_ERR(do_branch(&new_branch, wc->edit_txn,
                               from,
                               arg[1]->el_rev->branch, arg[1]->parent_el_rev->eid,
                               arg[1]->path_name,