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/06/03 13:58:25 UTC

svn commit: r1683302 - in /subversion/branches/move-tracking-2: BRANCH-README subversion/include/private/svn_editor3e.h subversion/libsvn_delta/compat3e.c subversion/svnmover/svnmover.c

Author: julianfoad
Date: Wed Jun  3 11:58:25 2015
New Revision: 1683302

URL: http://svn.apache.org/r1683302
Log:
On the 'move-tracking-2' branch: Make 'svnmover branches' and 'svnmover
ls-br-r' display the current state of the txn, rather than the base
revision.

In doing so, delete an unwanted function.

* BRANCH-README
  Remove the 'to-do' for svn_editor3_get_all_branches_in_rev().

* subversion/include/private/svn_editor3e.h,
  subversion/libsvn_delta/compat3e.c
  (svn_editor3_get_all_branches_in_rev): Delete.

* subversion/svnmover/svnmover.c
  (list_branches,
   list_all_branches): Don't use svn_editor3_get_all_branches_in_rev() and
    an editor; instead, take a revision root object and search in that.
  (execute): Update calls.

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/libsvn_delta/compat3e.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=1683302&r1=1683301&r2=1683302&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/BRANCH-README (original)
+++ subversion/branches/move-tracking-2/BRANCH-README Wed Jun  3 11:58:25 2015
@@ -148,7 +148,6 @@ Work on this branch:
       editor should be an editor of a txn based on a base state
         * Should not know about 'the repository' and other revisions,
           so these functions should not be 'editor' methods:
-            svn_editor3_get_all_branches_in_rev()
             svn_editor3_find_el_rev_by_path_rev()
 
 

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=1683302&r1=1683301&r2=1683302&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 11:58:25 2015
@@ -983,17 +983,6 @@ svn_editor3__get_baton(const svn_editor3
 
 /* ====================================================================== */
 
-/* Set *BRANCHES_P to an array of (svn_branch_state_t *) pointers to all
- * branches in revision REVNUM, or in the editing transaction if REVNUM is
- * SVN_INVALID_REVNUM.
- */
-svn_error_t *
-svn_editor3_get_all_branches_in_rev(const apr_array_header_t **branches_p,
-                                    svn_editor3_t *editor,
-                                    svn_revnum_t revnum,
-                                    apr_pool_t *result_pool,
-                                    apr_pool_t *scratch_pool);
-
 /* 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.

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=1683302&r1=1683301&r2=1683302&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 11:58:25 2015
@@ -1048,31 +1048,6 @@ svn_editor3_el_rev_get(svn_branch_el_rev
 }
 
 svn_error_t *
-svn_editor3_get_all_branches_in_rev(const apr_array_header_t **branches_p,
-                                    svn_editor3_t *editor,
-                                    svn_revnum_t revnum,
-                                    apr_pool_t *result_pool,
-                                    apr_pool_t *scratch_pool)
-{
-  ev3_from_delta_baton_t *eb = svn_editor3__get_baton(editor);
-  svn_branch_revision_root_t *rev_root;
-
-  if (SVN_IS_VALID_REVNUM(revnum))
-    {
-      const svn_branch_repos_t *repos = eb->edited_rev_root->repos;
-
-      rev_root = svn_array_get(repos->rev_roots, (int)(revnum));
-    }
-  else
-    {
-      rev_root = eb->edited_rev_root;
-    }
-
-  *branches_p = svn_branch_revision_root_get_branches(rev_root, result_pool);
-  return SVN_NO_ERROR;
-}
-
-svn_error_t *
 svn_editor3_find_el_rev_by_path_rev(svn_branch_el_rev_id_t **el_rev_p,
                                     svn_editor3_t *editor,
                                     const char *rrpath,

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=1683302&r1=1683301&r2=1683302&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c (original)
+++ subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c Wed Jun  3 11:58:25 2015
@@ -876,8 +876,7 @@ branch_info_by_eids(svn_branch_state_t *
 /* List all branches rooted at EID.
  */
 static svn_error_t *
-list_branches(svn_editor3_t *editor,
-              svn_revnum_t revnum,
+list_branches(svn_branch_revision_root_t *rev_root,
               int eid,
               svn_boolean_t verbose,
               apr_pool_t *scratch_pool)
@@ -885,8 +884,7 @@ list_branches(svn_editor3_t *editor,
   const apr_array_header_t *branches;
   SVN_ITER_T(svn_branch_state_t) *bi;
 
-  SVN_ERR(svn_editor3_get_all_branches_in_rev(&branches, editor, revnum,
-                                              scratch_pool, scratch_pool));
+  branches = svn_branch_revision_root_get_branches(rev_root, scratch_pool);
 
   for (SVN_ARRAY_ITER(bi, branches, scratch_pool))
     {
@@ -914,16 +912,14 @@ list_branches(svn_editor3_t *editor,
 /* List all branches.
  */
 static svn_error_t *
-list_all_branches(svn_editor3_t *editor,
-                  svn_revnum_t revnum,
+list_all_branches(svn_branch_revision_root_t *rev_root,
                   svn_boolean_t verbose,
                   apr_pool_t *scratch_pool)
 {
   const apr_array_header_t *branches;
   SVN_ITER_T(svn_branch_state_t) *bi;
 
-  SVN_ERR(svn_editor3_get_all_branches_in_rev(&branches, editor, revnum,
-                                              scratch_pool, scratch_pool));
+  branches = svn_branch_revision_root_get_branches(rev_root, scratch_pool);
 
   printf("branches:\n");
 
@@ -2235,7 +2231,7 @@ execute(svnmover_wc_t *wc,
                 printf("branches rooted at e%d:\n", arg[0]->el_rev->eid);
               }
             SVN_ERR(list_branches(
-                      editor, wc->base_revision,
+                      arg[0]->el_rev->branch->rev_root,
                       arg[0]->el_rev->eid,
                       FALSE, iterpool));
           }
@@ -2244,7 +2240,7 @@ execute(svnmover_wc_t *wc,
         case ACTION_LIST_BRANCHES_R:
           {
             /* (Note: BASE_REVISION is always a real revision number, here) */
-            SVN_ERR(list_all_branches(editor, wc->base_revision, TRUE, iterpool));
+            SVN_ERR(list_all_branches(wc->edit_txn, TRUE, iterpool));
           }
           break;