Author: julianfoad
Date: Wed Jun 3 15:11:25 2015
New Revision: 1683362
URL: http://svn.apache.org/r1683362
Log:
On the 'move-tracking-2' branch: Avoid and delete an unwanted function.
* BRANCH-README
Remove the corresponding to-do item.
* subversion/include/private/svn_editor3e.h,
subversion/libsvn_delta/compat3e.c
(svn_editor3_find_branch_element_by_rrpath): Delete.
* subversion/include/private/svn_ra_private.h,
subversion/libsvn_ra/ra_loader.c
(svn_ra_get_commit_editor_ev3): Add an output parameter for the branching
transaction.
* subversion/svnmover/svnmover.c
(wc_commit): Fetch the branching transaction directly from
svn_ra_get_commit_editor_ev3() to avoid using
svn_editor3_find_branch_element_by_rrpath().
(find_el_rev_by_rrpath_rev): Avoid using
svn_editor3_find_branch_element_by_rrpath().
Modified:
subversion/branches/move-tracking-2/BRANCH-README
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/BRANCH-README
URL:
http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/BRANCH-README?rev=1683362&r1=1683361&r2=1683362&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/BRANCH-README (original)
+++ subversion/branches/move-tracking-2/BRANCH-README Wed Jun 3 15:11:25 2015
@@ -143,11 +143,6 @@ Work on this branch:
case they dereference the wrapper editor's private data struct
instead of the intended editor's.
- - svn_editor3_find_branch_element_by_rrpath()
- => Instead of this, we should ask the editor to give us a 'flat
- view' of the current state of the txn (as svn_branch_subtree_t?)
- and we should then query in that.
-
- svn_editor3_payload_resolve()
=> Only used by svn_branch_subtree_differences(), which itself
is not a standard svn_branch_* function as it uses an editor.
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=1683362&r1=1683361&r2=1683362&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
Wed Jun 3 15:11:25 2015
@@ -983,24 +983,6 @@ svn_editor3__get_baton(const svn_editor3
/* ====================================================================== */
-/* Find the (deepest) branch in the state being edited by EDITOR, of which
- * the path RRPATH is either the root path or a normal, non-sub-branch
- * path. An element need not exist at RRPATH.
- *
- * Set *BRANCH_P to the deepest branch that contains the path RRPATH.
- *
- * If EID_P is not null then set *EID_P to the element id of RRPATH in
- * *BRANCH_P, or to -1 if no element exists at RRPATH in that branch.
- *
- * ### TODO: Clarify sequencing requirements.
- */
-void
-svn_editor3_find_branch_element_by_rrpath(svn_branch_state_t **branch_p,
- int *eid_p,
- svn_editor3_t *editor,
- const char *rrpath,
- apr_pool_t *scratch_pool);
-
/* Fetch full payload...
*/
svn_error_t *
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=1683362&r1=1683361&r2=1683362&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
Wed Jun 3 15:11:25 2015
@@ -327,6 +327,7 @@ svn_ra_load_branching_state(svn_branch_r
*/
svn_error_t *
svn_ra_get_commit_editor_ev3(svn_ra_session_t *session,
+ svn_branch_revision_root_t **edit_txn_p,
svn_editor3_t **editor,
apr_hash_t *revprop_table,
svn_commit_callback2_t commit_callback,
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=1683362&r1=1683361&r2=1683362&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_delta/compat3e.c
(original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_delta/compat3e.c Wed
Jun 3 15:11:25 2015
@@ -1016,20 +1016,6 @@ svn_editor3_payload_resolve(svn_element_
return SVN_NO_ERROR;
}
-void
-svn_editor3_find_branch_element_by_rrpath(svn_branch_state_t **branch_p,
- int *eid_p,
- svn_editor3_t *editor,
- const char *rrpath,
- apr_pool_t *scratch_pool)
-{
- ev3_from_delta_baton_t *eb = svn_editor3__get_baton(editor);
-
- svn_branch_find_nested_branch_element_by_rrpath(branch_p, eid_p,
-
eb->edited_rev_root->root_branch,
- rrpath, scratch_pool);
-}
-
/* An #svn_editor3_t method. */
static svn_error_t *
editor3_new_eid(void *baton,
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=1683362&r1=1683361&r2=1683362&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 Wed
Jun 3 15:11:25 2015
@@ -986,6 +986,7 @@ svn_ra_load_branching_state(svn_branch_r
svn_error_t *
svn_ra_get_commit_editor_ev3(svn_ra_session_t *session,
+ svn_branch_revision_root_t **edit_txn_p,
svn_editor3_t **editor,
apr_hash_t *revprop_table,
svn_commit_callback2_t commit_callback,
@@ -1041,6 +1042,8 @@ 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=1683362&r1=1683361&r2=1683362&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c
(original)
+++ subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c Wed Jun
3 15:11:25 2015
@@ -428,6 +428,7 @@ wc_commit(svnmover_wc_t *wc,
svn_branch_revision_root_t *left_txn
= svn_array_get(wc->edit_txn->repos->rev_roots, (int)wc->base_revision);
svn_branch_revision_root_t *right_txn = wc->edit_txn;
+ svn_branch_revision_root_t *commit_txn;
svn_editor3_t *commit_editor;
commit_callback_baton_t ccbb;
@@ -444,19 +445,18 @@ wc_commit(svnmover_wc_t *wc,
}
/* Start a new editor for the commit. */
- SVN_ERR(svn_ra_get_commit_editor_ev3(wc->ra_session, &commit_editor,
+ SVN_ERR(svn_ra_get_commit_editor_ev3(wc->ra_session,
+ &commit_txn, &commit_editor,
revprops,
commit_callback, &ccbb,
NULL /*lock_tokens*/, FALSE
/*keep_locks*/,
branch_info_dir,
scratch_pool));
+ ccbb.edit_txn = commit_txn;
ccbb.editor = commit_editor;
/*SVN_ERR(svn_editor3__get_debug_editor(&wc->editor, wc->editor,
scratch_pool));*/
- svn_editor3_find_branch_element_by_rrpath(&edit_root_branch, NULL,
- commit_editor, "", scratch_pool);
- ccbb.edit_txn = edit_root_branch->rev_root;
- SVN_ERR(replay(commit_editor, edit_root_branch,
+ SVN_ERR(replay(commit_editor, commit_txn->root_branch,
left_txn,
right_txn,
scratch_pool));
@@ -586,9 +586,9 @@ find_el_rev_by_rrpath_rev(svn_branch_el_
{
svn_branch_el_rev_id_t *el_rev = apr_palloc(result_pool,
sizeof(*el_rev));
- svn_editor3_find_branch_element_by_rrpath(
+ svn_branch_find_nested_branch_element_by_rrpath(
&el_rev->branch, &el_rev->eid,
- wc->editor, rrpath, scratch_pool);
+ wc->edit_txn->root_branch, rrpath, scratch_pool);
el_rev->rev = SVN_INVALID_REVNUM;
*el_rev_p = el_rev;
}