subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1675277 - in /subversion/branches/move-tracking-2/subversion: include/private/svn_branch.h include/private/svn_editor3e.h libsvn_delta/branch.c libsvn_delta/compat3e.c libsvn_delta/editor3e.c svnmover/svnmover.c
Date Wed, 22 Apr 2015 08:54:38 GMT
Author: julianfoad
Date: Wed Apr 22 08:54:38 2015
New Revision: 1675277

URL: http://svn.apache.org/r1675277
Log:
On the 'move-tracking-2' branch: Rename 'branch instance' to simply 'branch'
in most cases, and 'svn_branch_instance_t' to 'svn_branch_state_t'.

The 'instance' terminology was a relic from when groups of branches shared a
'sibling definition' -- which I deleted in r1674825.

* subversion/include/private/svn_branch.h
  (svn_branch_revision_root_t): Rename 'branch_instances' to 'branches'.
  (svn_branch_revision_root_get_branches): Was
    'svn_branch_get_all_branch_instances'.
  (svn_branch_revision_root_get_branch_by_id): Was
    'svn_branch_get_branch_instance_by_id'.
  (svn_branch_state_t): Was 'svn_branch_instance_t'.
  (svn_branch_state_create): Was 'svn_branch_instance_create'.
  (svn_branch_add_new_branch): Was 'svn_branch_add_new_branch_instance'.
  (svn_branch_delete_branch_r): Was 'svn_branch_delete_branch_instance_r'.
  (svn_branch_get_id): Was 'svn_branch_instance_get_id'.

* subversion/libsvn_delta/branch.c
  (assert_branch_state_invariants): Was 'assert_branch_instance_invariants'.
  (svn_branch_revision_root_delete_branch): Was
    'svn_branch_revision_root_delete_branch_instance'.
  (svn_branch_state_parse): Was 'svn_branch_instance_parse'.
  (svn_branch_state_serialize): Was 'svn_branch_instance_serialize'.
  Track the other renames.

* subversion/svnmover/svnmover.c
  (list_all_branches): Was 'list_all_branch_instances'.
  Track the other renames.

* subversion/libsvn_delta/compat3e.c,
  subversion/libsvn_delta/editor3e.c
  Track all the renames.

Modified:
    subversion/branches/move-tracking-2/subversion/include/private/svn_branch.h
    subversion/branches/move-tracking-2/subversion/include/private/svn_editor3e.h
    subversion/branches/move-tracking-2/subversion/libsvn_delta/branch.c
    subversion/branches/move-tracking-2/subversion/libsvn_delta/compat3e.c
    subversion/branches/move-tracking-2/subversion/libsvn_delta/editor3e.c
    subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c

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=1675277&r1=1675276&r2=1675277&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 Wed Apr 22 08:54:38 2015
@@ -54,7 +54,7 @@ typedef int svn_branch_eid_t;
 
 typedef struct svn_branch_el_rev_id_t svn_branch_el_rev_id_t;
 
-typedef struct svn_branch_instance_t svn_branch_instance_t;
+typedef struct svn_branch_state_t svn_branch_state_t;
 
 /* Per-repository branching info.
  */
@@ -103,12 +103,12 @@ typedef struct svn_branch_revision_root_
   /* The range of element ids assigned. */
   int first_eid, next_eid;
 
-  /* The root branch instance. */
-  struct svn_branch_instance_t *root_branch;
+  /* The root branch. */
+  struct svn_branch_state_t *root_branch;
 
-  /* All branch instances. */
+  /* All branches. */
   /* ### including root_branch */
-  apr_array_header_t *branch_instances;
+  apr_array_header_t *branches;
 
 } svn_branch_revision_root_t;
 
@@ -116,25 +116,25 @@ typedef struct svn_branch_revision_root_
 svn_branch_revision_root_t *
 svn_branch_revision_root_create(svn_branch_repos_t *repos,
                                 svn_revnum_t rev,
-                                struct svn_branch_instance_t *root_branch,
+                                struct svn_branch_state_t *root_branch,
                                 apr_pool_t *result_pool);
 
-/* Return all the branch instances in REV_ROOT.
+/* Return all the branches in REV_ROOT.
  *
  * Return an empty array if there are none.
  */
 const apr_array_header_t *
-svn_branch_get_all_branch_instances(svn_branch_revision_root_t *rev_root,
-                                    apr_pool_t *result_pool);
+svn_branch_revision_root_get_branches(svn_branch_revision_root_t *rev_root,
+                                      apr_pool_t *result_pool);
 
-/* Return the branch instance whose id is BRANCH_INSTANCE_ID in REV_ROOT.
+/* Return the branch whose id is BRANCH_ID in REV_ROOT.
  *
  * Return NULL if not found.
  */
-svn_branch_instance_t *
-svn_branch_get_branch_instance_by_id(const svn_branch_revision_root_t *rev_root,
-                                     const char *branch_instance_id,
-                                     apr_pool_t *scratch_pool);
+svn_branch_state_t *
+svn_branch_revision_root_get_branch_by_id(const svn_branch_revision_root_t *rev_root,
+                                          const char *branch_id,
+                                          apr_pool_t *scratch_pool);
 
 /* Assign a new element id in REV_ROOT.
  */
@@ -164,23 +164,23 @@ svn_branch_allocate_new_eid(svn_branch_r
  *          ...
  */
 
-/* A branch instance.
+/* A branch state.
  *
- * A branch instance object describes one version of one branch.
+ * A branch state object describes one version of one branch.
  */
-struct svn_branch_instance_t
+struct svn_branch_state_t
 {
   /* --- Identity of this object --- */
 
   /* The EID of its pathwise root element. */
   int root_eid;
 
-  /* The revision to which this branch-revision-instance belongs */
+  /* The revision to which this branch state belongs */
   svn_branch_revision_root_t *rev_root;
 
-  /* The outer branch instance that contains the subbranch
+  /* The outer branch state that contains the subbranch
      root element of this branch. Null if this is the root branch. */
-  struct svn_branch_instance_t *outer_branch;
+  struct svn_branch_state_t *outer_branch;
 
   /* The subbranch-root element in OUTER_BRANCH of the root of this branch.
    * -1 if this is the root branch. */
@@ -193,59 +193,59 @@ struct svn_branch_instance_t
 
 };
 
-/* Create a new branch instance object, with no elements (not even a root
+/* Create a new branch state object, with no elements (not even a root
  * element).
  */
-svn_branch_instance_t *
-svn_branch_instance_create(int root_eid,
-                           svn_branch_revision_root_t *rev_root,
-                           svn_branch_instance_t *outer_branch,
-                           int outer_eid,
-                           apr_pool_t *result_pool);
+svn_branch_state_t *
+svn_branch_state_create(int root_eid,
+                        svn_branch_revision_root_t *rev_root,
+                        svn_branch_state_t *outer_branch,
+                        int outer_eid,
+                        apr_pool_t *result_pool);
 
-/* Create a new branch instance at OUTER_BRANCH:OUTER_EID, with no elements
+/* Create a new branch at OUTER_BRANCH:OUTER_EID, with no elements
  * (not even a root element).
  *
  * Do not require that a subbranch root element exists in OUTER_BRANCH,
  * nor create one.
  */
-svn_branch_instance_t *
-svn_branch_add_new_branch_instance(svn_branch_instance_t *outer_branch,
-                                   int outer_eid,
-                                   int root_eid,
-                                   apr_pool_t *scratch_pool);
+svn_branch_state_t *
+svn_branch_add_new_branch(svn_branch_state_t *outer_branch,
+                          int outer_eid,
+                          int root_eid,
+                          apr_pool_t *scratch_pool);
 
-/* Delete the branch instance BRANCH, and any subbranches recursively.
+/* Delete the branch BRANCH, and any subbranches recursively.
  *
  * Do not require that a subbranch root element exists in its outer branch,
  * nor delete it if it does exist.
  */
 void
-svn_branch_delete_branch_instance_r(svn_branch_instance_t *branch,
-                                    apr_pool_t *scratch_pool);
+svn_branch_delete_branch_r(svn_branch_state_t *branch,
+                           apr_pool_t *scratch_pool);
 
-/* Return an array of pointers to the branch instances that are immediate
+/* Return an array of pointers to the branches that are immediate
  * sub-branches of BRANCH at or below EID.
  */
 apr_array_header_t *
-svn_branch_get_subbranches(const svn_branch_instance_t *branch,
+svn_branch_get_subbranches(const svn_branch_state_t *branch,
                            int eid,
                            apr_pool_t *result_pool,
                            apr_pool_t *scratch_pool);
 
-/* Return an array of pointers to the branch instances that are immediate
+/* Return an array of pointers to the branches that are immediate
  * sub-branches of BRANCH.
  */
 apr_array_header_t *
-svn_branch_get_all_sub_branches(const svn_branch_instance_t *branch,
+svn_branch_get_all_sub_branches(const svn_branch_state_t *branch,
                                 apr_pool_t *result_pool,
                                 apr_pool_t *scratch_pool);
 
-/* Return the subbranch instance rooted at BRANCH:EID, or NULL if that is
+/* Return the subbranch rooted at BRANCH:EID, or NULL if that is
  * not a subbranch root.
  */
-svn_branch_instance_t *
-svn_branch_get_subbranch_at_eid(svn_branch_instance_t *branch,
+svn_branch_state_t *
+svn_branch_get_subbranch_at_eid(svn_branch_state_t *branch,
                                 int eid,
                                 apr_pool_t *scratch_pool);
 
@@ -261,8 +261,8 @@ typedef struct svn_branch_element_t
 /* Branch-Element-Revision */
 struct svn_branch_el_rev_id_t
 {
-  /* The branch-instance that applies to REV. */
-  svn_branch_instance_t *branch;
+  /* The branch state that applies to REV. */
+  svn_branch_state_t *branch;
   /* Element. */
   int eid;
   /* Revision. SVN_INVALID_REVNUM means 'in this transaction', not 'head'.
@@ -275,7 +275,7 @@ struct svn_branch_el_rev_id_t
  * EID and REV, allocated in RESULT_POOL.
  */
 svn_branch_el_rev_id_t *
-svn_branch_el_rev_id_create(svn_branch_instance_t *branch,
+svn_branch_el_rev_id_create(svn_branch_state_t *branch,
                             int eid,
                             svn_revnum_t rev,
                             apr_pool_t *result_pool);
@@ -361,11 +361,11 @@ svn_branch_subtree_create(apr_hash_t *e_
  * The result is limited by the lifetime of BRANCH. It includes a shallow
  * copy of the element maps in BRANCH and its subbranches: the hash tables
  * are duplicated but the keys and values (element content data) are not.
- * It assumes that modifications on a svn_branch_instance_t treat element
+ * It assumes that modifications on a svn_branch_state_t treat element
  * map keys and values as immutable -- which they do.
  */
 svn_branch_subtree_t *
-svn_branch_get_subtree(const svn_branch_instance_t *branch,
+svn_branch_get_subtree(const svn_branch_state_t *branch,
                        int eid,
                        apr_pool_t *result_pool);
 
@@ -382,13 +382,13 @@ svn_branch_get_subtree(const svn_branch_
  * node's content may be null meaning it is unknown.
  */
 svn_branch_el_rev_content_t *
-svn_branch_map_get(const svn_branch_instance_t *branch,
+svn_branch_map_get(const svn_branch_state_t *branch,
                    int eid);
 
 /* In BRANCH, delete element EID.
  */
 void
-svn_branch_map_delete(svn_branch_instance_t *branch,
+svn_branch_map_delete(svn_branch_state_t *branch,
                       int eid);
 
 /* Set or change the EID:element mapping for EID in BRANCH.
@@ -396,7 +396,7 @@ svn_branch_map_delete(svn_branch_instanc
  * Duplicate NEW_NAME and NEW_CONTENT into the branch mapping's pool.
  */
 void
-svn_branch_map_update(svn_branch_instance_t *branch,
+svn_branch_map_update(svn_branch_state_t *branch,
                       int eid,
                       svn_branch_eid_t new_parent_eid,
                       const char *new_name,
@@ -409,7 +409,7 @@ svn_branch_map_update(svn_branch_instanc
  * Duplicate NEW_NAME into the branch mapping's pool.
  */
 void
-svn_branch_map_update_as_subbranch_root(svn_branch_instance_t *branch,
+svn_branch_map_update_as_subbranch_root(svn_branch_state_t *branch,
                                         int eid,
                                         svn_branch_eid_t new_parent_eid,
                                         const char *new_name);
@@ -424,13 +424,13 @@ svn_branch_map_update_as_subbranch_root(
  * in a [sequence-point/flattened/...?] state.)
  */
 void
-svn_branch_map_purge_orphans(svn_branch_instance_t *branch,
+svn_branch_map_purge_orphans(svn_branch_state_t *branch,
                              apr_pool_t *scratch_pool);
 
 /* Purge orphaned elements and subbranches.
  */
 void
-svn_branch_purge_r(svn_branch_instance_t *branch,
+svn_branch_purge_r(svn_branch_state_t *branch,
                    apr_pool_t *scratch_pool);
 
 /* Instantiate a subtree.
@@ -443,7 +443,7 @@ svn_branch_purge_r(svn_branch_instance_t
  * root element of TO_BRANCH.
  */
 svn_error_t *
-svn_branch_instantiate_subtree(svn_branch_instance_t *to_branch,
+svn_branch_instantiate_subtree(svn_branch_state_t *to_branch,
                                svn_branch_eid_t new_parent_eid,
                                const char *new_name,
                                svn_branch_subtree_t from_subtree,
@@ -456,9 +456,9 @@ svn_branch_instantiate_subtree(svn_branc
  * TO_OUTER_BRANCH may be the same as or different from FROM_BRANCH.
  */
 svn_error_t *
-svn_branch_branch_subtree_r2(svn_branch_instance_t **new_branch_p,
+svn_branch_branch_subtree_r2(svn_branch_state_t **new_branch_p,
                              svn_branch_subtree_t from_subtree,
-                             svn_branch_instance_t *to_outer_branch,
+                             svn_branch_state_t *to_outer_branch,
                              svn_branch_eid_t to_outer_eid,
                              apr_pool_t *scratch_pool);
 
@@ -472,7 +472,7 @@ svn_branch_branch_subtree_r2(svn_branch_
  * NEW_NAME.
  */
 svn_error_t *
-svn_branch_map_add_subtree(svn_branch_instance_t *to_branch,
+svn_branch_map_add_subtree(svn_branch_state_t *to_branch,
                            int to_eid,
                            svn_branch_eid_t new_parent_eid,
                            const char *new_name,
@@ -497,7 +497,7 @@ svn_branch_map_add_subtree(svn_branch_in
  */
 svn_error_t *
 svn_branch_copy_subtree_r(const svn_branch_el_rev_id_t *from_el_rev,
-                          svn_branch_instance_t *to_branch,
+                          svn_branch_state_t *to_branch,
                           svn_branch_eid_t to_parent_eid,
                           const char *to_name,
                           apr_pool_t *scratch_pool);
@@ -507,7 +507,7 @@ svn_branch_copy_subtree_r(const svn_bran
  * ### TODO: Clarify sequencing requirements.
  */
 const char *
-svn_branch_get_root_rrpath(const svn_branch_instance_t *branch,
+svn_branch_get_root_rrpath(const svn_branch_state_t *branch,
                            apr_pool_t *result_pool);
 
 /* Return the branch-relative path of element EID in BRANCH.
@@ -517,7 +517,7 @@ svn_branch_get_root_rrpath(const svn_bra
  * ### TODO: Clarify sequencing requirements.
  */
 const char *
-svn_branch_get_path_by_eid(const svn_branch_instance_t *branch,
+svn_branch_get_path_by_eid(const svn_branch_state_t *branch,
                            int eid,
                            apr_pool_t *result_pool);
 
@@ -528,7 +528,7 @@ svn_branch_get_path_by_eid(const svn_bra
  * ### TODO: Clarify sequencing requirements.
  */
 const char *
-svn_branch_get_rrpath_by_eid(const svn_branch_instance_t *branch,
+svn_branch_get_rrpath_by_eid(const svn_branch_state_t *branch,
                              int eid,
                              apr_pool_t *result_pool);
 
@@ -539,7 +539,7 @@ svn_branch_get_rrpath_by_eid(const svn_b
  * ### TODO: Clarify sequencing requirements.
  */
 int
-svn_branch_get_eid_by_path(const svn_branch_instance_t *branch,
+svn_branch_get_eid_by_path(const svn_branch_state_t *branch,
                            const char *path,
                            apr_pool_t *scratch_pool);
 
@@ -550,7 +550,7 @@ svn_branch_get_eid_by_path(const svn_bra
  * ### TODO: Clarify sequencing requirements.
  */
 int
-svn_branch_get_eid_by_rrpath(svn_branch_instance_t *branch,
+svn_branch_get_eid_by_rrpath(svn_branch_state_t *branch,
                              const char *rrpath,
                              apr_pool_t *scratch_pool);
 
@@ -571,9 +571,9 @@ svn_branch_get_eid_by_rrpath(svn_branch_
  */
 void
 svn_branch_find_nested_branch_element_by_rrpath(
-                                svn_branch_instance_t **branch_p,
+                                svn_branch_state_t **branch_p,
                                 int *eid_p,
-                                svn_branch_instance_t *root_branch,
+                                svn_branch_state_t *root_branch,
                                 const char *rrpath,
                                 apr_pool_t *scratch_pool);
 
@@ -614,10 +614,10 @@ svn_branch_revision_root_serialize(svn_s
  * and NEW_NAME must be nonexistent in that directory.
  */
 svn_error_t *
-svn_branch_branch(svn_branch_instance_t **new_branch_p,
-                  svn_branch_instance_t *from_branch,
+svn_branch_branch(svn_branch_state_t **new_branch_p,
+                  svn_branch_state_t *from_branch,
                   int from_eid,
-                  svn_branch_instance_t *to_outer_branch,
+                  svn_branch_state_t *to_outer_branch,
                   svn_branch_eid_t to_outer_parent_eid,
                   const char *new_name,
                   apr_pool_t *scratch_pool);
@@ -629,9 +629,9 @@ svn_branch_branch(svn_branch_instance_t
  * (### Or, perhaps, elements that already exist should be altered?)
  */
 svn_error_t *
-svn_branch_branch_into(svn_branch_instance_t *from_branch,
+svn_branch_branch_into(svn_branch_state_t *from_branch,
                        int from_eid,
-                       svn_branch_instance_t *to_branch,
+                       svn_branch_state_t *to_branch,
                        svn_branch_eid_t to_parent_eid,
                        const char *new_name,
                        apr_pool_t *scratch_pool);
@@ -639,8 +639,8 @@ svn_branch_branch_into(svn_branch_instan
 /* Get the full id of branch BRANCH.
  */
 const char *
-svn_branch_instance_get_id(svn_branch_instance_t *branch,
-                           apr_pool_t *result_pool);
+svn_branch_get_id(svn_branch_state_t *branch,
+                  apr_pool_t *result_pool);
 
 
 #ifdef __cplusplus

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=1675277&r1=1675276&r2=1675277&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 Apr 22 08:54:38 2015
@@ -627,7 +627,7 @@ svn_error_t *
 svn_editor3_add(svn_editor3_t *editor,
                 svn_branch_eid_t *eid,
                 svn_node_kind_t new_kind,
-                svn_branch_instance_t *branch,
+                svn_branch_state_t *branch,
                 svn_branch_eid_t new_parent_eid,
                 const char *new_name,
                 const svn_element_content_t *new_content);
@@ -648,7 +648,7 @@ svn_editor3_add(svn_editor3_t *editor,
  */
 svn_error_t *
 svn_editor3_instantiate(svn_editor3_t *editor,
-                        svn_branch_instance_t *branch,
+                        svn_branch_state_t *branch,
                         svn_branch_eid_t eid,
                         svn_branch_eid_t new_parent_eid,
                         const char *new_name,
@@ -684,7 +684,7 @@ svn_editor3_instantiate(svn_editor3_t *e
 svn_error_t *
 svn_editor3_copy_one(svn_editor3_t *editor,
                      const svn_branch_el_rev_id_t *src_el_rev,
-                     svn_branch_instance_t *branch,
+                     svn_branch_state_t *branch,
                      svn_branch_eid_t local_eid,
                      svn_branch_eid_t new_parent_eid,
                      const char *new_name,
@@ -723,7 +723,7 @@ svn_editor3_copy_one(svn_editor3_t *edit
 svn_error_t *
 svn_editor3_copy_tree(svn_editor3_t *editor,
                       const svn_branch_el_rev_id_t *src_el_rev,
-                      svn_branch_instance_t *branch,
+                      svn_branch_state_t *branch,
                       svn_branch_eid_t new_parent_eid,
                       const char *new_name);
 
@@ -773,7 +773,7 @@ svn_editor3_copy_tree(svn_editor3_t *edi
 svn_error_t *
 svn_editor3_delete(svn_editor3_t *editor,
                    svn_revnum_t since_rev,
-                   svn_branch_instance_t *branch,
+                   svn_branch_state_t *branch,
                    svn_branch_eid_t eid);
 
 /** Alter the tree position and/or contents of the element identified
@@ -797,7 +797,7 @@ svn_editor3_delete(svn_editor3_t *editor
 svn_error_t *
 svn_editor3_alter(svn_editor3_t *editor,
                   svn_revnum_t since_rev,
-                  svn_branch_instance_t *branch,
+                  svn_branch_state_t *branch,
                   svn_branch_eid_t eid,
                   svn_branch_eid_t new_parent_eid,
                   const char *new_name,
@@ -871,7 +871,7 @@ typedef svn_error_t *(*svn_editor3_cb_ad
   void *baton,
   svn_branch_eid_t *eid,
   svn_node_kind_t new_kind,
-  svn_branch_instance_t *branch,
+  svn_branch_state_t *branch,
   svn_branch_eid_t new_parent_eid,
   const char *new_name,
   const svn_element_content_t *new_content,
@@ -881,7 +881,7 @@ typedef svn_error_t *(*svn_editor3_cb_ad
  */
 typedef svn_error_t *(*svn_editor3_cb_instantiate_t)(
   void *baton,
-  svn_branch_instance_t *branch,
+  svn_branch_state_t *branch,
   svn_branch_eid_t eid,
   svn_branch_eid_t new_parent_eid,
   const char *new_name,
@@ -893,7 +893,7 @@ typedef svn_error_t *(*svn_editor3_cb_in
 typedef svn_error_t *(*svn_editor3_cb_copy_one_t)(
   void *baton,
   const svn_branch_el_rev_id_t *src_el_rev,
-  svn_branch_instance_t *branch,
+  svn_branch_state_t *branch,
   svn_branch_eid_t local_eid,
   svn_branch_eid_t new_parent_eid,
   const char *new_name,
@@ -905,7 +905,7 @@ typedef svn_error_t *(*svn_editor3_cb_co
 typedef svn_error_t *(*svn_editor3_cb_copy_tree_t)(
   void *baton,
   const svn_branch_el_rev_id_t *src_el_rev,
-  svn_branch_instance_t *branch,
+  svn_branch_state_t *branch,
   svn_branch_eid_t new_parent_eid,
   const char *new_name,
   apr_pool_t *scratch_pool);
@@ -915,7 +915,7 @@ typedef svn_error_t *(*svn_editor3_cb_co
 typedef svn_error_t *(*svn_editor3_cb_delete_t)(
   void *baton,
   svn_revnum_t since_rev,
-  svn_branch_instance_t *branch,
+  svn_branch_state_t *branch,
   svn_branch_eid_t eid,
   apr_pool_t *scratch_pool);
 
@@ -924,7 +924,7 @@ typedef svn_error_t *(*svn_editor3_cb_de
 typedef svn_error_t *(*svn_editor3_cb_alter_t)(
   void *baton,
   svn_revnum_t since_rev,
-  svn_branch_instance_t *branch,
+  svn_branch_state_t *branch,
   svn_branch_eid_t eid,
   svn_branch_eid_t new_parent_eid,
   const char *new_name,
@@ -1027,7 +1027,7 @@ svn_editor3__get_baton(const svn_editor3
  * ### TODO: Clarify sequencing requirements.
  */
 void
-svn_editor3_find_branch_element_by_rrpath(svn_branch_instance_t **branch_p,
+svn_editor3_find_branch_element_by_rrpath(svn_branch_state_t **branch_p,
                                           int *eid_p,
                                           svn_editor3_t *editor,
                                           const char *rrpath,
@@ -1061,7 +1061,7 @@ svn_editor3_find_el_rev_by_path_rev(svn_
 svn_error_t *
 svn_editor3_el_rev_get(svn_branch_el_rev_content_t **node_p,
                       svn_editor3_t *editor,
-                      svn_branch_instance_t *branch,
+                      svn_branch_state_t *branch,
                       int eid,
                       apr_pool_t *result_pool,
                       apr_pool_t *scratch_pool);

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=1675277&r1=1675276&r2=1675277&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_delta/branch.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_delta/branch.c Wed Apr 22 08:54:38 2015
@@ -45,13 +45,13 @@
   ((eid) == (branch)->root_eid)
 
 /* Is BRANCH1 the same branch as BRANCH2? Compare by full branch-ids; don't
-   require identical branch-instance objects. */
+   require identical branch objects. */
 #define BRANCH_IS_SAME_BRANCH(branch1, branch2, scratch_pool) \
-  (strcmp(svn_branch_instance_get_id(branch1, scratch_pool), \
-          svn_branch_instance_get_id(branch2, scratch_pool)) == 0)
+  (strcmp(svn_branch_get_id(branch1, scratch_pool), \
+          svn_branch_get_id(branch2, scratch_pool)) == 0)
 
 /* Is BRANCH1 an immediate child of BRANCH2? Compare by full branch-ids; don't
-   require identical branch-instance objects. */
+   require identical branch objects. */
 #define BRANCH_IS_CHILD_OF_BRANCH(branch1, branch2, scratch_pool) \
   ((branch1)->outer_branch && \
    BRANCH_IS_SAME_BRANCH((branch1)->outer_branch, branch2, scratch_pool))
@@ -69,7 +69,7 @@ svn_branch_repos_create(apr_pool_t *resu
 svn_branch_revision_root_t *
 svn_branch_revision_root_create(svn_branch_repos_t *repos,
                                 svn_revnum_t rev,
-                                struct svn_branch_instance_t *root_branch,
+                                struct svn_branch_state_t *root_branch,
                                 apr_pool_t *result_pool)
 {
   svn_branch_revision_root_t *rev_root
@@ -78,7 +78,7 @@ svn_branch_revision_root_create(svn_bran
   rev_root->repos = repos;
   rev_root->rev = rev;
   rev_root->root_branch = root_branch;
-  rev_root->branch_instances = svn_array_make(result_pool);
+  rev_root->branches = svn_array_make(result_pool);
   return rev_root;
 }
 
@@ -91,26 +91,25 @@ svn_branch_allocate_new_eid(svn_branch_r
 }
 
 const apr_array_header_t *
-svn_branch_get_all_branch_instances(svn_branch_revision_root_t *rev_root,
-                                    apr_pool_t *result_pool)
+svn_branch_revision_root_get_branches(svn_branch_revision_root_t *rev_root,
+                                      apr_pool_t *result_pool)
 {
-  return rev_root->branch_instances;
+  return rev_root->branches;
 }
 
-svn_branch_instance_t *
-svn_branch_get_branch_instance_by_id(const svn_branch_revision_root_t *rev_root,
-                                     const char *branch_instance_id,
-                                     apr_pool_t *scratch_pool)
+svn_branch_state_t *
+svn_branch_revision_root_get_branch_by_id(const svn_branch_revision_root_t *rev_root,
+                                          const char *branch_id,
+                                          apr_pool_t *scratch_pool)
 {
-  SVN_ITER_T(svn_branch_instance_t) *bi;
-  svn_branch_instance_t *branch = NULL;
+  SVN_ITER_T(svn_branch_state_t) *bi;
+  svn_branch_state_t *branch = NULL;
 
-  for (SVN_ARRAY_ITER(bi, rev_root->branch_instances, scratch_pool))
+  for (SVN_ARRAY_ITER(bi, rev_root->branches, scratch_pool))
     {
-      svn_branch_instance_t *b = bi->val;
+      svn_branch_state_t *b = bi->val;
 
-      if (strcmp(svn_branch_instance_get_id(b, scratch_pool),
-                 branch_instance_id) == 0)
+      if (strcmp(svn_branch_get_id(b, scratch_pool), branch_id) == 0)
         {
           branch = b;
           break;
@@ -122,8 +121,8 @@ svn_branch_get_branch_instance_by_id(con
 /* Assert BRANCH satisfies all its invariants.
  */
 static void
-assert_branch_instance_invariants(const svn_branch_instance_t *branch,
-                                  apr_pool_t *scratch_pool)
+assert_branch_state_invariants(const svn_branch_state_t *branch,
+                               apr_pool_t *scratch_pool)
 {
   assert(branch->rev_root);
   if (branch->outer_branch)
@@ -138,26 +137,26 @@ assert_branch_instance_invariants(const
   assert(branch->e_map);
 }
 
-svn_branch_instance_t *
-svn_branch_instance_create(int root_eid,
-                           svn_branch_revision_root_t *rev_root,
-                           svn_branch_instance_t *outer_branch,
-                           int outer_eid,
-                           apr_pool_t *result_pool)
+svn_branch_state_t *
+svn_branch_state_create(int root_eid,
+                        svn_branch_revision_root_t *rev_root,
+                        svn_branch_state_t *outer_branch,
+                        int outer_eid,
+                        apr_pool_t *result_pool)
 {
-  svn_branch_instance_t *b = apr_pcalloc(result_pool, sizeof(*b));
+  svn_branch_state_t *b = apr_pcalloc(result_pool, sizeof(*b));
 
   b->root_eid = root_eid;
   b->rev_root = rev_root;
   b->e_map = apr_hash_make(result_pool);
   b->outer_branch = outer_branch;
   b->outer_eid = outer_eid;
-  assert_branch_instance_invariants(b, result_pool);
+  assert_branch_state_invariants(b, result_pool);
   return b;
 }
 
 svn_branch_el_rev_id_t *
-svn_branch_el_rev_id_create(svn_branch_instance_t *branch,
+svn_branch_el_rev_id_create(svn_branch_state_t *branch,
                             int eid,
                             svn_revnum_t rev,
                             apr_pool_t *result_pool)
@@ -254,7 +253,7 @@ svn_branch_subtree_create(apr_hash_t *e_
  * NODE->content may be null.
  */
 static void
-branch_map_node_validate(const svn_branch_instance_t *branch,
+branch_map_node_validate(const svn_branch_state_t *branch,
                          int eid,
                          const svn_branch_el_rev_content_t *node)
 {
@@ -283,7 +282,7 @@ branch_map_node_validate(const svn_branc
 }
 
 svn_branch_el_rev_content_t *
-svn_branch_map_get(const svn_branch_instance_t *branch,
+svn_branch_map_get(const svn_branch_state_t *branch,
                    int eid)
 {
   svn_branch_el_rev_content_t *node;
@@ -305,7 +304,7 @@ svn_branch_map_get(const svn_branch_inst
  * Assume NODE is already allocated with sufficient lifetime.
  */
 static void
-branch_map_set(svn_branch_instance_t *branch,
+branch_map_set(svn_branch_state_t *branch,
                int eid,
                svn_branch_el_rev_content_t *node)
 {
@@ -316,11 +315,11 @@ branch_map_set(svn_branch_instance_t *br
     branch_map_node_validate(branch, eid, node);
 
   svn_int_hash_set(branch->e_map, eid, node);
-  assert_branch_instance_invariants(branch, map_pool);
+  assert_branch_state_invariants(branch, map_pool);
 }
 
 void
-svn_branch_map_delete(svn_branch_instance_t *branch,
+svn_branch_map_delete(svn_branch_state_t *branch,
                       int eid)
 {
   SVN_ERR_ASSERT_NO_RETURN(EID_IS_ALLOCATED(branch, eid));
@@ -329,7 +328,7 @@ svn_branch_map_delete(svn_branch_instanc
 }
 
 void
-svn_branch_map_update(svn_branch_instance_t *branch,
+svn_branch_map_update(svn_branch_state_t *branch,
                       int eid,
                       svn_branch_eid_t new_parent_eid,
                       const char *new_name,
@@ -353,7 +352,7 @@ svn_branch_map_update(svn_branch_instanc
 }
 
 void
-svn_branch_map_update_as_subbranch_root(svn_branch_instance_t *branch,
+svn_branch_map_update_as_subbranch_root(svn_branch_state_t *branch,
                                         int eid,
                                         svn_branch_eid_t new_parent_eid,
                                         const char *new_name)
@@ -375,12 +374,12 @@ svn_branch_map_update_as_subbranch_root(
 }
 
 svn_branch_subtree_t *
-svn_branch_get_subtree(const svn_branch_instance_t *branch,
+svn_branch_get_subtree(const svn_branch_state_t *branch,
                        int eid,
                        apr_pool_t *result_pool)
 {
   svn_branch_subtree_t *new_subtree;
-  SVN_ITER_T(svn_branch_instance_t) *bi;
+  SVN_ITER_T(svn_branch_state_t) *bi;
 
   SVN_BRANCH_SEQUENCE_POINT(branch);
 
@@ -438,17 +437,17 @@ map_purge_orphans(apr_hash_t *e_map,
 }
 
 void
-svn_branch_map_purge_orphans(svn_branch_instance_t *branch,
+svn_branch_map_purge_orphans(svn_branch_state_t *branch,
                              apr_pool_t *scratch_pool)
 {
   map_purge_orphans(branch->e_map, branch->root_eid, scratch_pool);
 }
 
 void
-svn_branch_purge_r(svn_branch_instance_t *branch,
+svn_branch_purge_r(svn_branch_state_t *branch,
                    apr_pool_t *scratch_pool)
 {
-  SVN_ITER_T(svn_branch_instance_t) *bi;
+  SVN_ITER_T(svn_branch_state_t) *bi;
 
   /* first, remove elements that have no parent element */
   svn_branch_map_purge_orphans(branch, scratch_pool);
@@ -457,7 +456,7 @@ svn_branch_purge_r(svn_branch_instance_t
   for (SVN_ARRAY_ITER(bi, svn_branch_get_all_sub_branches(
                             branch, scratch_pool, scratch_pool), scratch_pool))
     {
-      svn_branch_instance_t *b = bi->val;
+      svn_branch_state_t *b = bi->val;
 
       if (svn_branch_map_get(branch, b->outer_eid))
         {
@@ -465,13 +464,13 @@ svn_branch_purge_r(svn_branch_instance_t
         }
       else
         {
-          svn_branch_delete_branch_instance_r(b, bi->iterpool);
+          svn_branch_delete_branch_r(b, bi->iterpool);
         }
     }
 }
 
 const char *
-svn_branch_get_root_rrpath(const svn_branch_instance_t *branch,
+svn_branch_get_root_rrpath(const svn_branch_state_t *branch,
                            apr_pool_t *result_pool)
 {
   const char *root_rrpath;
@@ -511,7 +510,7 @@ svn_branch_subtree_get_path_by_eid(const
 }
 
 const char *
-svn_branch_get_path_by_eid(const svn_branch_instance_t *branch,
+svn_branch_get_path_by_eid(const svn_branch_state_t *branch,
                            int eid,
                            apr_pool_t *result_pool)
 {
@@ -532,7 +531,7 @@ svn_branch_get_path_by_eid(const svn_bra
 }
 
 const char *
-svn_branch_get_rrpath_by_eid(const svn_branch_instance_t *branch,
+svn_branch_get_rrpath_by_eid(const svn_branch_state_t *branch,
                              int eid,
                              apr_pool_t *result_pool)
 {
@@ -548,7 +547,7 @@ svn_branch_get_rrpath_by_eid(const svn_b
 }
 
 int
-svn_branch_get_eid_by_path(const svn_branch_instance_t *branch,
+svn_branch_get_eid_by_path(const svn_branch_state_t *branch,
                            const char *path,
                            apr_pool_t *scratch_pool)
 {
@@ -577,7 +576,7 @@ svn_branch_get_eid_by_path(const svn_bra
 }
 
 int
-svn_branch_get_eid_by_rrpath(svn_branch_instance_t *branch,
+svn_branch_get_eid_by_rrpath(svn_branch_state_t *branch,
                              const char *rrpath,
                              apr_pool_t *scratch_pool)
 {
@@ -594,7 +593,7 @@ svn_branch_get_eid_by_rrpath(svn_branch_
 }
 
 svn_error_t *
-svn_branch_map_add_subtree(svn_branch_instance_t *to_branch,
+svn_branch_map_add_subtree(svn_branch_state_t *to_branch,
                            int to_eid,
                            svn_branch_eid_t new_parent_eid,
                            const char *new_name,
@@ -652,7 +651,7 @@ svn_branch_map_add_subtree(svn_branch_in
 }
 
 svn_error_t *
-svn_branch_instantiate_subtree(svn_branch_instance_t *to_branch,
+svn_branch_instantiate_subtree(svn_branch_state_t *to_branch,
                                svn_branch_eid_t new_parent_eid,
                                const char *new_name,
                                svn_branch_subtree_t new_subtree,
@@ -707,7 +706,7 @@ svn_branch_instantiate_subtree(svn_branc
 }
 
 apr_array_header_t *
-svn_branch_get_subbranches(const svn_branch_instance_t *branch,
+svn_branch_get_subbranches(const svn_branch_state_t *branch,
                            int eid,
                            apr_pool_t *result_pool,
                            apr_pool_t *scratch_pool)
@@ -715,11 +714,11 @@ svn_branch_get_subbranches(const svn_bra
   const char *top_rrpath = svn_branch_get_rrpath_by_eid(branch, eid,
                                                         scratch_pool);
   svn_array_t *subbranches = svn_array_make(result_pool);
-  SVN_ITER_T(svn_branch_instance_t) *bi;
+  SVN_ITER_T(svn_branch_state_t) *bi;
 
-  for (SVN_ARRAY_ITER(bi, branch->rev_root->branch_instances, scratch_pool))
+  for (SVN_ARRAY_ITER(bi, branch->rev_root->branches, scratch_pool))
     {
-      svn_branch_instance_t *subbranch = bi->val;
+      svn_branch_state_t *subbranch = bi->val;
       const char *sub_branch_root_rrpath
         = svn_branch_get_root_rrpath(subbranch, bi->iterpool);
 
@@ -732,14 +731,14 @@ svn_branch_get_subbranches(const svn_bra
 }
 
 apr_array_header_t *
-svn_branch_get_all_sub_branches(const svn_branch_instance_t *branch,
+svn_branch_get_all_sub_branches(const svn_branch_state_t *branch,
                                 apr_pool_t *result_pool,
                                 apr_pool_t *scratch_pool)
 {
   svn_array_t *subbranches = svn_array_make(result_pool);
-  SVN_ITER_T(svn_branch_instance_t) *bi;
+  SVN_ITER_T(svn_branch_state_t) *bi;
 
-  for (SVN_ARRAY_ITER(bi, branch->rev_root->branch_instances, scratch_pool))
+  for (SVN_ARRAY_ITER(bi, branch->rev_root->branches, scratch_pool))
     {
       /* Is it an immediate child? */
       if (bi->val->outer_branch == branch)
@@ -748,14 +747,14 @@ svn_branch_get_all_sub_branches(const sv
   return subbranches;
 }
 
-svn_branch_instance_t *
-svn_branch_get_subbranch_at_eid(svn_branch_instance_t *branch,
+svn_branch_state_t *
+svn_branch_get_subbranch_at_eid(svn_branch_state_t *branch,
                                 int eid,
                                 apr_pool_t *scratch_pool)
 {
-  SVN_ITER_T(svn_branch_instance_t) *bi;
+  SVN_ITER_T(svn_branch_state_t) *bi;
 
-  /* TODO: more efficient to search in branch->rev_root->branch_instances */
+  /* TODO: more efficient to search in branch->rev_root->branches */
   for (SVN_ARRAY_ITER(bi, svn_branch_get_all_sub_branches(
                             branch, scratch_pool, scratch_pool), scratch_pool))
     {
@@ -765,61 +764,61 @@ svn_branch_get_subbranch_at_eid(svn_bran
   return NULL;
 }
 
-svn_branch_instance_t *
-svn_branch_add_new_branch_instance(svn_branch_instance_t *outer_branch,
-                                   int outer_eid,
-                                   int root_eid,
-                                   apr_pool_t *scratch_pool)
+svn_branch_state_t *
+svn_branch_add_new_branch(svn_branch_state_t *outer_branch,
+                          int outer_eid,
+                          int root_eid,
+                          apr_pool_t *scratch_pool)
 {
-  svn_branch_instance_t *branch_instance
-    = svn_branch_instance_create(root_eid, outer_branch->rev_root,
-                                 outer_branch, outer_eid,
-                                 outer_branch->rev_root->repos->pool);
+  svn_branch_state_t *new_branch
+    = svn_branch_state_create(root_eid, outer_branch->rev_root,
+                              outer_branch, outer_eid,
+                              outer_branch->rev_root->repos->pool);
 
-  SVN_ARRAY_PUSH(branch_instance->rev_root->branch_instances) = branch_instance;
+  SVN_ARRAY_PUSH(new_branch->rev_root->branches) = new_branch;
 
-  return branch_instance;
+  return new_branch;
 }
 
-/* Remove branch-instance BRANCH from the list of branches in REV_ROOT.
+/* Remove branch BRANCH from the list of branches in REV_ROOT.
  */
 static void
-svn_branch_revision_root_delete_branch_instance(
+svn_branch_revision_root_delete_branch(
                                 svn_branch_revision_root_t *rev_root,
-                                svn_branch_instance_t *branch,
+                                svn_branch_state_t *branch,
                                 apr_pool_t *scratch_pool)
 {
-  SVN_ITER_T(svn_branch_instance_t) *bi;
+  SVN_ITER_T(svn_branch_state_t) *bi;
 
   SVN_ERR_ASSERT_NO_RETURN(branch->rev_root == rev_root);
 
-  for (SVN_ARRAY_ITER(bi, rev_root->branch_instances, scratch_pool))
+  for (SVN_ARRAY_ITER(bi, rev_root->branches, scratch_pool))
     {
       if (bi->val == branch)
         {
-          SVN_DBG(("deleting branch-instance b%s e%d",
-                   svn_branch_instance_get_id(bi->val, bi->iterpool),
+          SVN_DBG(("deleting branch b%s e%d",
+                   svn_branch_get_id(bi->val, bi->iterpool),
                    bi->val->root_eid));
-          svn_sort__array_delete(rev_root->branch_instances, bi->i, 1);
+          svn_sort__array_delete(rev_root->branches, bi->i, 1);
           break;
         }
     }
 }
 
 void
-svn_branch_delete_branch_instance_r(svn_branch_instance_t *branch,
-                                    apr_pool_t *scratch_pool)
+svn_branch_delete_branch_r(svn_branch_state_t *branch,
+                           apr_pool_t *scratch_pool)
 {
-  SVN_ITER_T(svn_branch_instance_t) *bi;
+  SVN_ITER_T(svn_branch_state_t) *bi;
 
   for (SVN_ARRAY_ITER(bi, svn_branch_get_all_sub_branches(
                             branch, scratch_pool, scratch_pool), scratch_pool))
     {
-      svn_branch_delete_branch_instance_r(bi->val, bi->iterpool);
+      svn_branch_delete_branch_r(bi->val, bi->iterpool);
     }
 
-  svn_branch_revision_root_delete_branch_instance(branch->outer_branch->rev_root,
-                                                  branch, scratch_pool);
+  svn_branch_revision_root_delete_branch(branch->outer_branch->rev_root,
+                                         branch, scratch_pool);
 }
 
 
@@ -834,7 +833,7 @@ svn_branch_get_default_r0_metadata(apr_p
 {
   static const char *default_repos_info
     = "r0:\n"
-      "family: eids 0 1 b-instances 1\n"
+      "family: eids 0 1 branches 1\n"
       "B0 root-eid 0 at .\n"
       "e0: normal -1 .\n";
 
@@ -910,17 +909,17 @@ parse_element_line(int *eid_p,
  * with info parsed from STREAM, allocated in RESULT_POOL.
  */
 static svn_error_t *
-svn_branch_instance_parse(svn_branch_instance_t **new_branch,
-                          svn_branch_revision_root_t *rev_root,
-                          svn_stream_t *stream,
-                          apr_pool_t *result_pool,
-                          apr_pool_t *scratch_pool)
+svn_branch_state_parse(svn_branch_state_t **new_branch,
+                       svn_branch_revision_root_t *rev_root,
+                       svn_stream_t *stream,
+                       apr_pool_t *result_pool,
+                       apr_pool_t *scratch_pool)
 {
   char bid[1000];
   int root_eid;
-  svn_branch_instance_t *branch_instance;
+  svn_branch_state_t *branch_state;
   const char *branch_root_rrpath;
-  svn_branch_instance_t *outer_branch;
+  svn_branch_state_t *outer_branch;
   int outer_eid;
   int eid;
   svn_branch_subtree_t *tree;
@@ -940,9 +939,9 @@ svn_branch_instance_parse(svn_branch_ins
       outer_branch = NULL;
       outer_eid = -1;
     }
-  branch_instance = svn_branch_instance_create(root_eid, rev_root,
-                                               outer_branch, outer_eid,
-                                               result_pool);
+  branch_state = svn_branch_state_create(root_eid, rev_root,
+                                         outer_branch, outer_eid,
+                                         result_pool);
 
   /* Read in the structure, leaving the content of each element as null */
   tree = svn_branch_subtree_create(NULL, root_eid, scratch_pool);
@@ -983,7 +982,7 @@ svn_branch_instance_parse(svn_branch_ins
               const char *relpath
                 = svn_branch_subtree_get_path_by_eid(tree, eid, scratch_pool);
               const char *rrpath
-                = svn_relpath_join(svn_branch_get_root_rrpath(branch_instance,
+                = svn_relpath_join(svn_branch_get_root_rrpath(branch_state,
                                                               result_pool),
                                    relpath, scratch_pool);
               svn_pathrev_t peg;
@@ -995,24 +994,24 @@ svn_branch_instance_parse(svn_branch_ins
               content = svn_element_content_create_ref(peg, scratch_pool);
 
               svn_branch_map_update(
-                branch_instance, eid, node->parent_eid, node->name, content);
+                branch_state, eid, node->parent_eid, node->name, content);
             }
           else
             {
               svn_branch_map_update_as_subbranch_root(
-                branch_instance, eid, node->parent_eid, node->name);
+                branch_state, eid, node->parent_eid, node->name);
             }
         }
     }
 
-  *new_branch = branch_instance;
+  *new_branch = branch_state;
   return SVN_NO_ERROR;
 }
 
 /* Parse a branch family from STREAM.
  */
 static svn_error_t *
-svn_branch_family_parse(int *num_branch_instances,
+svn_branch_family_parse(int *num_branches,
                         svn_branch_revision_root_t *rev_root,
                         svn_stream_t *stream,
                         apr_pool_t *scratch_pool)
@@ -1025,9 +1024,9 @@ svn_branch_family_parse(int *num_branch_
   SVN_ERR(svn_stream_readline(stream, &line, "\n", &eof, scratch_pool));
   SVN_ERR_ASSERT(!eof);
   n = sscanf(line->data, "family: eids %d %d "
-                         "b-instances %d",
+                         "branches %d",
              &first_eid, &next_eid,
-             num_branch_instances);
+             num_branches);
   SVN_ERR_ASSERT(n == 3);
 
   rev_root->first_eid = first_eid;
@@ -1060,21 +1059,21 @@ svn_branch_revision_root_parse(svn_branc
 
   /* parse the family */
     {
-      int num_branch_instances;
+      int num_branches;
       int j;
 
-      SVN_ERR(svn_branch_family_parse(&num_branch_instances,
+      SVN_ERR(svn_branch_family_parse(&num_branches,
                                       rev_root, stream,
                                       scratch_pool));
 
       /* parse the branches */
-      for (j = 0; j < num_branch_instances; j++)
+      for (j = 0; j < num_branches; j++)
         {
-          svn_branch_instance_t *branch;
+          svn_branch_state_t *branch;
 
-          SVN_ERR(svn_branch_instance_parse(&branch, rev_root, stream,
-                                            result_pool, scratch_pool));
-          SVN_ARRAY_PUSH(rev_root->branch_instances) = branch;
+          SVN_ERR(svn_branch_state_parse(&branch, rev_root, stream,
+                                         result_pool, scratch_pool));
+          SVN_ARRAY_PUSH(rev_root->branches) = branch;
 
           /* Note the revision-root branch */
           if (! branch->outer_branch)
@@ -1091,9 +1090,9 @@ svn_branch_revision_root_parse(svn_branc
 /* Write to STREAM a parseable representation of BRANCH.
  */
 static svn_error_t *
-svn_branch_instance_serialize(svn_stream_t *stream,
-                              svn_branch_instance_t *branch,
-                              apr_pool_t *scratch_pool)
+svn_branch_state_serialize(svn_stream_t *stream,
+                           svn_branch_state_t *branch,
+                           apr_pool_t *scratch_pool)
 {
   svn_branch_revision_root_t *rev_root = branch->rev_root;
   const char *branch_root_rrpath = svn_branch_get_root_rrpath(branch,
@@ -1102,7 +1101,7 @@ svn_branch_instance_serialize(svn_stream
 
   SVN_ERR(svn_stream_printf(stream, scratch_pool,
                             "%s root-eid %d at %s\n",
-                            svn_branch_instance_get_id(branch, scratch_pool),
+                            svn_branch_get_id(branch, scratch_pool),
                             branch->root_eid,
                             branch_root_rrpath[0] ? branch_root_rrpath : "."));
 
@@ -1142,16 +1141,16 @@ svn_branch_family_serialize(svn_stream_t
                             svn_branch_revision_root_t *rev_root,
                             apr_pool_t *scratch_pool)
 {
-  SVN_ITER_T(svn_branch_instance_t) *bi;
+  SVN_ITER_T(svn_branch_state_t) *bi;
 
   SVN_ERR(svn_stream_printf(stream, scratch_pool,
                             "family: eids %d %d "
-                            "b-instances %d\n",
+                            "branches %d\n",
                             rev_root->first_eid, rev_root->next_eid,
-                            rev_root->branch_instances->nelts));
+                            rev_root->branches->nelts));
 
-  for (SVN_ARRAY_ITER(bi, rev_root->branch_instances, scratch_pool))
-    SVN_ERR(svn_branch_instance_serialize(stream, bi->val, bi->iterpool));
+  for (SVN_ARRAY_ITER(bi, rev_root->branches, scratch_pool))
+    SVN_ERR(svn_branch_state_serialize(stream, bi->val, bi->iterpool));
   return SVN_NO_ERROR;
 }
 
@@ -1176,15 +1175,15 @@ svn_branch_revision_root_serialize(svn_s
 
 void
 svn_branch_find_nested_branch_element_by_rrpath(
-                                svn_branch_instance_t **branch_p,
+                                svn_branch_state_t **branch_p,
                                 int *eid_p,
-                                svn_branch_instance_t *root_branch,
+                                svn_branch_state_t *root_branch,
                                 const char *rrpath,
                                 apr_pool_t *scratch_pool)
 {
   const char *branch_root_path = svn_branch_get_root_rrpath(root_branch,
                                                             scratch_pool);
-  SVN_ITER_T(svn_branch_instance_t) *bi;
+  SVN_ITER_T(svn_branch_state_t) *bi;
 
   if (! svn_relpath_skip_ancestor(branch_root_path, rrpath))
     {
@@ -1201,7 +1200,7 @@ svn_branch_find_nested_branch_element_by
                             root_branch, scratch_pool, scratch_pool),
                       scratch_pool))
     {
-      svn_branch_instance_t *sub_branch;
+      svn_branch_state_t *sub_branch;
       int sub_branch_eid;
 
       svn_branch_find_nested_branch_element_by_rrpath(&sub_branch,
@@ -1255,8 +1254,8 @@ svn_branch_repos_find_el_rev_by_path_rev
  */
 
 const char *
-svn_branch_instance_get_id(svn_branch_instance_t *branch,
-                           apr_pool_t *result_pool)
+svn_branch_get_id(svn_branch_state_t *branch,
+                  apr_pool_t *result_pool)
 {
   const char *id = NULL;
 
@@ -1276,18 +1275,18 @@ svn_branch_instance_get_id(svn_branch_in
 }
 
 svn_error_t *
-svn_branch_branch_subtree_r2(svn_branch_instance_t **new_branch_p,
+svn_branch_branch_subtree_r2(svn_branch_state_t **new_branch_p,
                              svn_branch_subtree_t from_subtree,
-                             svn_branch_instance_t *to_outer_branch,
+                             svn_branch_state_t *to_outer_branch,
                              svn_branch_eid_t to_outer_eid,
                              apr_pool_t *scratch_pool)
 {
-  svn_branch_instance_t *new_branch;
+  svn_branch_state_t *new_branch;
 
-  /* create new inner branch instance */
-  new_branch = svn_branch_add_new_branch_instance(to_outer_branch, to_outer_eid,
-                                                  from_subtree.root_eid,
-                                                  scratch_pool);
+  /* create new inner branch */
+  new_branch = svn_branch_add_new_branch(to_outer_branch, to_outer_eid,
+                                         from_subtree.root_eid,
+                                         scratch_pool);
 
   /* Populate the new branch mapping */
   SVN_ERR(svn_branch_instantiate_subtree(new_branch, -1, "", from_subtree,
@@ -1299,10 +1298,10 @@ svn_branch_branch_subtree_r2(svn_branch_
 }
 
 svn_error_t *
-svn_branch_branch(svn_branch_instance_t **new_branch_p,
-                  svn_branch_instance_t *from_branch,
+svn_branch_branch(svn_branch_state_t **new_branch_p,
+                  svn_branch_state_t *from_branch,
                   int from_eid,
-                  svn_branch_instance_t *to_outer_branch,
+                  svn_branch_state_t *to_outer_branch,
                   svn_branch_eid_t to_outer_parent_eid,
                   const char *new_name,
                   apr_pool_t *scratch_pool)
@@ -1316,7 +1315,7 @@ svn_branch_branch(svn_branch_instance_t
       return svn_error_createf(SVN_ERR_BRANCHING, NULL,
                                _("cannot branch from b%s e%d: "
                                  "does not exist"),
-                               svn_branch_instance_get_id(
+                               svn_branch_get_id(
                                  from_branch, scratch_pool), from_eid);
     }
 
@@ -1340,9 +1339,9 @@ svn_branch_branch(svn_branch_instance_t
 }
 
 svn_error_t *
-svn_branch_branch_into(svn_branch_instance_t *from_branch,
+svn_branch_branch_into(svn_branch_state_t *from_branch,
                        int from_eid,
-                       svn_branch_instance_t *to_branch,
+                       svn_branch_state_t *to_branch,
                        svn_branch_eid_t to_parent_eid,
                        const char *new_name,
                        apr_pool_t *scratch_pool)
@@ -1355,7 +1354,7 @@ svn_branch_branch_into(svn_branch_instan
       return svn_error_createf(SVN_ERR_BRANCHING, NULL,
                                _("cannot branch from b%s e%d: "
                                  "does not exist"),
-                               svn_branch_instance_get_id(
+                               svn_branch_get_id(
                                  from_branch, scratch_pool), from_eid);
     }
 
@@ -1370,7 +1369,7 @@ svn_branch_branch_into(svn_branch_instan
 
 svn_error_t *
 svn_branch_copy_subtree_r(const svn_branch_el_rev_id_t *from_el_rev,
-                          svn_branch_instance_t *to_branch,
+                          svn_branch_state_t *to_branch,
                           svn_branch_eid_t to_parent_eid,
                           const char *to_name,
                           apr_pool_t *scratch_pool)

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=1675277&r1=1675276&r2=1675277&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_delta/compat3e.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_delta/compat3e.c Wed Apr 22 08:54:38 2015
@@ -807,7 +807,7 @@ content_fetch(svn_element_content_t **co
 svn_error_t *
 svn_editor3_el_rev_get(svn_branch_el_rev_content_t **node_p,
                       svn_editor3_t *editor,
-                      svn_branch_instance_t *branch,
+                      svn_branch_state_t *branch,
                       int eid,
                       apr_pool_t *result_pool,
                       apr_pool_t *scratch_pool)
@@ -852,7 +852,7 @@ svn_editor3_find_el_rev_by_path_rev(svn_
 }
 
 void
-svn_editor3_find_branch_element_by_rrpath(svn_branch_instance_t **branch_p,
+svn_editor3_find_branch_element_by_rrpath(svn_branch_state_t **branch_p,
                                           int *eid_p,
                                           svn_editor3_t *editor,
                                           const char *rrpath,
@@ -870,7 +870,7 @@ static svn_error_t *
 editor3_add(void *baton,
             svn_branch_eid_t *eid_p,
             svn_node_kind_t new_kind,
-            svn_branch_instance_t *branch,
+            svn_branch_state_t *branch,
             svn_branch_eid_t new_parent_eid,
             const char *new_name,
             const svn_element_content_t *new_content,
@@ -904,7 +904,7 @@ editor3_add(void *baton,
 /* An #svn_editor3_t method. */
 static svn_error_t *
 editor3_instantiate(void *baton,
-                    svn_branch_instance_t *branch,
+                    svn_branch_state_t *branch,
                     svn_branch_eid_t eid,
                     svn_branch_eid_t new_parent_eid,
                     const char *new_name,
@@ -934,7 +934,7 @@ editor3_instantiate(void *baton,
 static svn_error_t *
 editor3_copy_one(void *baton,
                  const svn_branch_el_rev_id_t *src_el_rev,
-                 svn_branch_instance_t *branch,
+                 svn_branch_state_t *branch,
                  svn_branch_eid_t eid,
                  svn_branch_eid_t new_parent_eid,
                  const char *new_name,
@@ -955,7 +955,7 @@ editor3_copy_one(void *baton,
 static svn_error_t *
 editor3_copy_tree(void *baton,
                   const svn_branch_el_rev_id_t *src_el_rev,
-                  svn_branch_instance_t *to_branch,
+                  svn_branch_state_t *to_branch,
                   svn_branch_eid_t new_parent_eid,
                   const char *new_name,
                   apr_pool_t *scratch_pool)
@@ -974,12 +974,12 @@ editor3_copy_tree(void *baton,
 static svn_error_t *
 editor3_delete(void *baton,
                    svn_revnum_t since_rev,
-                   svn_branch_instance_t *branch,
+                   svn_branch_state_t *branch,
                    svn_branch_eid_t eid,
                    apr_pool_t *scratch_pool)
 {
   SVN_DBG(("delete(b%s e%d)",
-           svn_branch_instance_get_id(branch, scratch_pool), eid));
+           svn_branch_get_id(branch, scratch_pool), eid));
 
   svn_branch_map_delete(branch, eid /* ### , since_rev? */);
 
@@ -990,7 +990,7 @@ editor3_delete(void *baton,
 static svn_error_t *
 editor3_alter(void *baton,
               svn_revnum_t since_rev,
-              svn_branch_instance_t *branch,
+              svn_branch_state_t *branch,
               svn_branch_eid_t eid,
               svn_branch_eid_t new_parent_eid,
               const char *new_name,
@@ -1024,7 +1024,7 @@ editor3_alter(void *baton,
  */
 static void
 convert_branch_to_paths(apr_hash_t *paths,
-                        svn_branch_instance_t *branch,
+                        svn_branch_state_t *branch,
                         apr_pool_t *result_pool,
                         apr_pool_t *scratch_pool)
 {
@@ -1055,12 +1055,12 @@ convert_branch_to_paths(apr_hash_t *path
                                            result_pool);
           svn_hash_sets(paths, rrpath, ba);
           /*SVN_DBG(("branch-to-path[%d]: b%s e%d -> %s",
-                   i, svn_branch_instance_get_id(branch, scratch_pool), eid, rrpath));*/
+                   i, svn_branch_get_id(branch, scratch_pool), eid, rrpath));*/
         }
       else
         {
           SVN_DBG(("branch-to-path: b%s e%d -> <already present; not overwriting> (%s)",
-                   svn_branch_instance_get_id(branch, scratch_pool), eid, rrpath));
+                   svn_branch_get_id(branch, scratch_pool), eid, rrpath));
         }
     }
 }
@@ -1074,14 +1074,14 @@ convert_branch_to_paths(apr_hash_t *path
  */
 static void
 convert_branch_to_paths_r(apr_hash_t *paths_union,
-                          svn_branch_instance_t *branch,
+                          svn_branch_state_t *branch,
                           apr_pool_t *result_pool,
                           apr_pool_t *scratch_pool)
 {
-  SVN_ITER_T(svn_branch_instance_t) *bi;
+  SVN_ITER_T(svn_branch_state_t) *bi;
 
   /*SVN_DBG(("[%d] branch={b%s e%d at '%s'}", idx,
-           svn_branch_instance_get_id(branch, scratch_pool), branch->root_eid,
+           svn_branch_get_id(branch, scratch_pool), branch->root_eid,
            svn_branch_get_root_rrpath(branch, scratch_pool)));*/
   convert_branch_to_paths(paths_union, branch,
                           result_pool, scratch_pool);

Modified: subversion/branches/move-tracking-2/subversion/libsvn_delta/editor3e.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_delta/editor3e.c?rev=1675277&r1=1675276&r2=1675277&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_delta/editor3e.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_delta/editor3e.c Wed Apr 22 08:54:38 2015
@@ -189,7 +189,7 @@ svn_error_t *
 svn_editor3_add(svn_editor3_t *editor,
                 svn_branch_eid_t *local_eid_p,
                 svn_node_kind_t new_kind,
-                svn_branch_instance_t *branch,
+                svn_branch_state_t *branch,
                 svn_branch_eid_t new_parent_eid,
                 const char *new_name,
                 const svn_element_content_t *new_content)
@@ -220,7 +220,7 @@ svn_editor3_add(svn_editor3_t *editor,
 
 svn_error_t *
 svn_editor3_instantiate(svn_editor3_t *editor,
-                        svn_branch_instance_t *branch,
+                        svn_branch_state_t *branch,
                         svn_branch_eid_t local_eid,
                         svn_branch_eid_t new_parent_eid,
                         const char *new_name,
@@ -243,7 +243,7 @@ svn_editor3_instantiate(svn_editor3_t *e
 svn_error_t *
 svn_editor3_copy_one(svn_editor3_t *editor,
                      const svn_branch_el_rev_id_t *src_el_rev,
-                     svn_branch_instance_t *branch,
+                     svn_branch_state_t *branch,
                      svn_branch_eid_t local_eid,
                      svn_branch_eid_t new_parent_eid,
                      const char *new_name,
@@ -268,7 +268,7 @@ svn_editor3_copy_one(svn_editor3_t *edit
 svn_error_t *
 svn_editor3_copy_tree(svn_editor3_t *editor,
                       const svn_branch_el_rev_id_t *src_el_rev,
-                      svn_branch_instance_t *branch,
+                      svn_branch_state_t *branch,
                       svn_branch_eid_t new_parent_eid,
                       const char *new_name)
 {
@@ -287,7 +287,7 @@ svn_editor3_copy_tree(svn_editor3_t *edi
 svn_error_t *
 svn_editor3_delete(svn_editor3_t *editor,
                    svn_revnum_t since_rev,
-                   svn_branch_instance_t *branch,
+                   svn_branch_state_t *branch,
                    svn_branch_eid_t eid)
 {
   SVN_ERR_ASSERT(VALID_EID(eid));
@@ -303,7 +303,7 @@ svn_editor3_delete(svn_editor3_t *editor
 svn_error_t *
 svn_editor3_alter(svn_editor3_t *editor,
                   svn_revnum_t since_rev,
-                  svn_branch_instance_t *branch,
+                  svn_branch_state_t *branch,
                   svn_branch_eid_t eid,
                   svn_branch_eid_t new_parent_eid,
                   const char *new_name,
@@ -425,7 +425,7 @@ static const char *
 el_rev_str(const svn_branch_el_rev_id_t *el_rev,
            apr_pool_t *result_pool)
 {
-  const char *bid = svn_branch_instance_get_id(el_rev->branch, result_pool);
+  const char *bid = svn_branch_get_id(el_rev->branch, result_pool);
 
   return apr_psprintf(result_pool, "r%ldb%se%d",
                       el_rev->rev, bid, el_rev->eid);
@@ -443,7 +443,7 @@ static svn_error_t *
 wrap_add(void *baton,
          svn_branch_eid_t *local_eid,
          svn_node_kind_t new_kind,
-         svn_branch_instance_t *branch,
+         svn_branch_state_t *branch,
          svn_branch_eid_t new_parent_eid,
          const char *new_name,
          const svn_element_content_t *new_content,
@@ -462,7 +462,7 @@ wrap_add(void *baton,
 
 static svn_error_t *
 wrap_instantiate(void *baton,
-                 svn_branch_instance_t *branch,
+                 svn_branch_state_t *branch,
                  svn_branch_eid_t local_eid,
                  svn_branch_eid_t new_parent_eid,
                  const char *new_name,
@@ -483,7 +483,7 @@ wrap_instantiate(void *baton,
 static svn_error_t *
 wrap_copy_one(void *baton,
               const svn_branch_el_rev_id_t *src_el_rev,
-              svn_branch_instance_t *branch,
+              svn_branch_state_t *branch,
               svn_branch_eid_t local_eid,
               svn_branch_eid_t new_parent_eid,
               const char *new_name,
@@ -505,7 +505,7 @@ wrap_copy_one(void *baton,
 static svn_error_t *
 wrap_copy_tree(void *baton,
                const svn_branch_el_rev_id_t *src_el_rev,
-               svn_branch_instance_t *branch,
+               svn_branch_state_t *branch,
                svn_branch_eid_t new_parent_eid,
                const char *new_name,
                apr_pool_t *scratch_pool)
@@ -524,7 +524,7 @@ wrap_copy_tree(void *baton,
 static svn_error_t *
 wrap_delete(void *baton,
             svn_revnum_t since_rev,
-            svn_branch_instance_t *branch,
+            svn_branch_state_t *branch,
             svn_branch_eid_t eid,
             apr_pool_t *scratch_pool)
 {
@@ -540,7 +540,7 @@ wrap_delete(void *baton,
 static svn_error_t *
 wrap_alter(void *baton,
            svn_revnum_t since_rev,
-           svn_branch_instance_t *branch,
+           svn_branch_state_t *branch,
            svn_branch_eid_t eid,
            svn_branch_eid_t new_parent_eid,
            const char *new_name,
@@ -684,8 +684,8 @@ svn_branch_subtree_differences(apr_hash_
   int e;
 
   /*SVN_DBG(("svn_branch_subtree_differences(b%s r%ld, b%s r%ld, e%d)",
-           svn_branch_instance_get_id(left->branch, scratch_pool), left->rev,
-           svn_branch_instance_get_id(right->branch, scratch_pool), right->rev,
+           svn_branch_get_id(left->branch, scratch_pool), left->rev,
+           svn_branch_get_id(right->branch, scratch_pool), right->rev,
            right->eid));*/
   SVN_ERR_ASSERT(EID_IS_ALLOCATED(left->branch, left->eid));
   SVN_ERR_ASSERT(EID_IS_ALLOCATED(left->branch, right->eid));

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=1675277&r1=1675276&r2=1675277&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c (original)
+++ subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c Wed Apr 22 08:54:38 2015
@@ -79,10 +79,10 @@ static const svn_token_map_t ui_mode_map
       {NULL, SVN_TOKEN_UNKNOWN} };
 
 /* Is BRANCH1 the same branch as BRANCH2? Compare by full branch-ids; don't
-   require identical branch-instance objects. */
+   require identical branch objects. */
 #define BRANCH_IS_SAME_BRANCH(branch1, branch2, scratch_pool) \
-  (strcmp(svn_branch_instance_get_id(branch1, scratch_pool), \
-          svn_branch_instance_get_id(branch2, scratch_pool)) == 0)
+  (strcmp(svn_branch_get_id(branch1, scratch_pool), \
+          svn_branch_get_id(branch2, scratch_pool)) == 0)
 
 /*  */
 __attribute__((format(printf, 1, 2)))
@@ -340,13 +340,13 @@ find_el_rev_by_rrpath_rev(svn_branch_el_
  * Return "" if SUBBRANCH is null.
  */
 static const char *
-branch_str(svn_branch_instance_t *subbranch,
+branch_str(svn_branch_state_t *subbranch,
            apr_pool_t *result_pool)
 {
   if (subbranch)
     return apr_psprintf(result_pool,
                       " (branch %s)",
-                      svn_branch_instance_get_id(subbranch, result_pool));
+                      svn_branch_get_id(subbranch, result_pool));
   return "";
 }
 
@@ -355,20 +355,20 @@ branch_str(svn_branch_instance_t *subbra
  * Return "" if the element is not a subbranch root element.
  */
 static const char *
-subbranch_str(svn_branch_instance_t *branch,
+subbranch_str(svn_branch_state_t *branch,
               int eid,
               apr_pool_t *result_pool)
 {
-  svn_branch_instance_t *subbranch
+  svn_branch_state_t *subbranch
     = svn_branch_get_subbranch_at_eid(branch, eid, result_pool);
 
   return branch_str(subbranch, result_pool);
 }
 
-/* List all elements in branch-instance BRANCH, in path notation.
+/* List all elements in branch BRANCH, in path notation.
  */
 static svn_error_t *
-list_branch_elements(svn_branch_instance_t *branch,
+list_branch_elements(svn_branch_state_t *branch,
                      apr_pool_t *scratch_pool)
 {
   apr_hash_t *paths_to_eid = apr_hash_make(scratch_pool);
@@ -399,10 +399,10 @@ list_branch_elements(svn_branch_instance
   return SVN_NO_ERROR;
 }
 
-/* List all elements in branch-instance BRANCH, in element notation.
+/* List all elements in branch BRANCH, in element notation.
  */
 static svn_error_t *
-list_branch_elements_by_eid(svn_branch_instance_t *branch,
+list_branch_elements_by_eid(svn_branch_state_t *branch,
                             apr_pool_t *scratch_pool)
 {
   int eid;
@@ -432,17 +432,17 @@ list_branch_elements_by_eid(svn_branch_i
   return SVN_NO_ERROR;
 }
 
-/* List all branch instances rooted at EID.
+/* List all branches rooted at EID.
  */
 static svn_error_t *
-branch_info(svn_branch_instance_t *branch,
+branch_info(svn_branch_state_t *branch,
             svn_boolean_t verbose,
             apr_pool_t *scratch_pool)
 {
   if (the_ui_mode == UI_MODE_PATHS)
     {
       printf("  %s /%s\n",
-             svn_branch_instance_get_id(branch, scratch_pool),
+             svn_branch_get_id(branch, scratch_pool),
              svn_branch_get_root_rrpath(branch, scratch_pool));
       if (verbose)
         SVN_ERR(list_branch_elements(branch, scratch_pool));
@@ -450,7 +450,7 @@ branch_info(svn_branch_instance_t *branc
   else
     {
       printf("  %s /%s root=e%d\n",
-             svn_branch_instance_get_id(branch, scratch_pool),
+             svn_branch_get_id(branch, scratch_pool),
              svn_branch_get_root_rrpath(branch, scratch_pool),
              branch->root_eid);
       if (verbose)
@@ -460,7 +460,7 @@ branch_info(svn_branch_instance_t *branc
   return SVN_NO_ERROR;
 }
 
-/* List all branch instances rooted at EID.
+/* List all branches rooted at EID.
  */
 static svn_error_t *
 list_branches(svn_branch_revision_root_t *rev_root,
@@ -468,12 +468,12 @@ list_branches(svn_branch_revision_root_t
               svn_boolean_t verbose,
               apr_pool_t *scratch_pool)
 {
-  SVN_ITER_T(svn_branch_instance_t) *bi;
+  SVN_ITER_T(svn_branch_state_t) *bi;
 
-  for (SVN_ARRAY_ITER(bi, svn_branch_get_all_branch_instances(
+  for (SVN_ARRAY_ITER(bi, svn_branch_revision_root_get_branches(
                             rev_root, scratch_pool), scratch_pool))
     {
-      svn_branch_instance_t *branch = bi->val;
+      svn_branch_state_t *branch = bi->val;
 
       if (branch->root_eid != eid)
         continue;
@@ -483,21 +483,21 @@ list_branches(svn_branch_revision_root_t
   return SVN_NO_ERROR;
 }
 
-/* List all branch instances.
+/* List all branches.
  */
 static svn_error_t *
-list_all_branch_instances(svn_branch_revision_root_t *rev_root,
-                          svn_boolean_t verbose,
-                          apr_pool_t *scratch_pool)
+list_all_branches(svn_branch_revision_root_t *rev_root,
+                  svn_boolean_t verbose,
+                  apr_pool_t *scratch_pool)
 {
-  SVN_ITER_T(svn_branch_instance_t) *bi;
+  SVN_ITER_T(svn_branch_state_t) *bi;
 
   printf("branches:\n");
 
-  for (SVN_ARRAY_ITER(bi, svn_branch_get_all_branch_instances(
+  for (SVN_ARRAY_ITER(bi, svn_branch_revision_root_get_branches(
                             rev_root, scratch_pool), scratch_pool))
     {
-      svn_branch_instance_t *branch = bi->val;
+      svn_branch_state_t *branch = bi->val;
 
       SVN_ERR(branch_info(branch, verbose, bi->iterpool));
     }
@@ -710,11 +710,11 @@ merge_subbranch(svn_editor3_t *editor,
                 int eid,
                 apr_pool_t *scratch_pool)
 {
-  svn_branch_instance_t *src_subbranch
+  svn_branch_state_t *src_subbranch
     = svn_branch_get_subbranch_at_eid(src->branch, eid, scratch_pool);
-  svn_branch_instance_t *tgt_subbranch
+  svn_branch_state_t *tgt_subbranch
     = svn_branch_get_subbranch_at_eid(tgt->branch, eid, scratch_pool);
-  svn_branch_instance_t *yca_subbranch
+  svn_branch_state_t *yca_subbranch
     = svn_branch_get_subbranch_at_eid(yca->branch, eid, scratch_pool);
   svn_branch_el_rev_id_t *subbr_src = NULL;
   svn_branch_el_rev_id_t *subbr_tgt = NULL;
@@ -796,16 +796,16 @@ branch_merge_subtree_r(svn_editor3_t *ed
 
   SVN_DBG(("merge src: r%2ld b%s e%3d",
            src->rev,
-           svn_branch_instance_get_id(src->branch, scratch_pool), src->eid));
+           svn_branch_get_id(src->branch, scratch_pool), src->eid));
   SVN_DBG(("merge tgt: r%2ld b%s e%3d",
            tgt->rev,
-           svn_branch_instance_get_id(tgt->branch, scratch_pool), tgt->eid));
+           svn_branch_get_id(tgt->branch, scratch_pool), tgt->eid));
   SVN_DBG(("merge yca: r%2ld b%s e%3d",
            yca->rev,
-           svn_branch_instance_get_id(yca->branch, scratch_pool), yca->eid));
+           svn_branch_get_id(yca->branch, scratch_pool), yca->eid));
 
   notify("merging into branch %s",
-         svn_branch_instance_get_id(tgt->branch, scratch_pool));
+         svn_branch_get_id(tgt->branch, scratch_pool));
   /*
       for (eid, diff1) in element_differences(YCA, FROM):
         diff2 = element_diff(eid, YCA, TO)
@@ -908,7 +908,7 @@ branch_merge_subtree_r(svn_editor3_t *ed
     }
 
   notify("merging into branch %s -- finished",
-         svn_branch_instance_get_id(tgt->branch, scratch_pool));
+         svn_branch_get_id(tgt->branch, scratch_pool));
 
   if (had_conflict)
     {
@@ -1131,7 +1131,7 @@ svn_branch_diff(svn_editor3_t *editor,
  * Return an empty hash if BRANCH is null.
  */
 static apr_hash_t *
-get_subbranches(svn_branch_instance_t *branch,
+get_subbranches(svn_branch_state_t *branch,
                 apr_pool_t *result_pool,
                 apr_pool_t *scratch_pool)
 {
@@ -1139,15 +1139,15 @@ get_subbranches(svn_branch_instance_t *b
 
   if (branch)
     {
-      SVN_ITER_T(svn_branch_instance_t) *bi;
+      SVN_ITER_T(svn_branch_state_t) *bi;
 
       for (SVN_ARRAY_ITER(bi, svn_branch_get_all_sub_branches(
                                 branch, result_pool, scratch_pool),
                           scratch_pool))
         {
-          svn_branch_instance_t *b = bi->val;
+          svn_branch_state_t *b = bi->val;
 
-          svn_hash_sets(result, svn_branch_instance_get_id(b, result_pool), b);
+          svn_hash_sets(result, svn_branch_get_id(b, result_pool), b);
         }
     }
   return result;
@@ -1163,11 +1163,11 @@ svn_branch_diff_func_t(svn_editor3_t *ed
 
 /*  */
 static char *
-branch_id_and_path(svn_branch_instance_t *branch,
+branch_id_and_path(svn_branch_state_t *branch,
                    apr_pool_t *result_pool)
 {
   return apr_psprintf(result_pool, "%s at /%s",
-                      svn_branch_instance_get_id(branch, result_pool),
+                      svn_branch_get_id(branch, result_pool),
                       svn_branch_get_root_rrpath(branch, result_pool));
 }
 
@@ -1228,8 +1228,8 @@ svn_branch_diff_r(svn_editor3_t *editor,
        hi; hi = apr_hash_next(hi))
     {
       const char *branch_id = apr_hash_this_key(hi);
-      svn_branch_instance_t *branch_l = svn_hash_gets(subbranches_l, branch_id);
-      svn_branch_instance_t *branch_r = svn_hash_gets(subbranches_r, branch_id);
+      svn_branch_state_t *branch_l = svn_hash_gets(subbranches_l, branch_id);
+      svn_branch_state_t *branch_r = svn_hash_gets(subbranches_r, branch_id);
       svn_branch_el_rev_id_t *sub_left = NULL, *sub_right = NULL;
 
       if (branch_l)
@@ -1267,7 +1267,7 @@ svn_branch_diff_r(svn_editor3_t *editor,
 static svn_error_t *
 move_by_branch_and_delete(svn_editor3_t *editor,
                           svn_branch_el_rev_id_t *el_rev,
-                          svn_branch_instance_t *to_branch,
+                          svn_branch_state_t *to_branch,
                           int to_parent_eid,
                           const char *to_name,
                           apr_pool_t *scratch_pool)
@@ -1313,7 +1313,7 @@ move_by_branch_and_delete(svn_editor3_t
 static svn_error_t *
 move_by_copy_and_delete(svn_editor3_t *editor,
                         svn_branch_el_rev_id_t *el_rev,
-                        svn_branch_instance_t *to_branch,
+                        svn_branch_state_t *to_branch,
                         int to_parent_eid,
                         const char *to_name,
                         apr_pool_t *scratch_pool)
@@ -1392,16 +1392,16 @@ svn_branch_find_predecessor_el_rev(svn_b
   const svn_branch_repos_t *repos = old_el_rev->branch->rev_root->repos;
   const svn_branch_revision_root_t *rev_root;
   const char *branch_id;
-  svn_branch_instance_t *branch;
+  svn_branch_state_t *branch;
   svn_branch_el_rev_id_t *new_el_rev;
 
   if (old_el_rev->rev <= 0)
     return NULL;
 
-  branch_id = svn_branch_instance_get_id(old_el_rev->branch, result_pool);
+  branch_id = svn_branch_get_id(old_el_rev->branch, result_pool);
   rev_root = svn_array_get(repos->rev_roots, (int)(old_el_rev->rev - 1));
-  branch = svn_branch_get_branch_instance_by_id(rev_root, branch_id,
-                                                      result_pool);
+  branch = svn_branch_revision_root_get_branch_by_id(rev_root, branch_id,
+                                                     result_pool);
 
   new_el_rev = svn_branch_el_rev_id_create(branch, old_el_rev->eid,
                                            old_el_rev->rev - 1,
@@ -1444,9 +1444,9 @@ svn_branch_log(svn_editor3_t *editor,
  * The subbranch will consist of a single element given by CONTENT.
  */
 static svn_error_t *
-mk_branch(svn_branch_instance_t **new_branch_p,
+mk_branch(svn_branch_state_t **new_branch_p,
           svn_editor3_t *editor,
-          svn_branch_instance_t *outer_branch,
+          svn_branch_state_t *outer_branch,
           int outer_parent_eid,
           const char *outer_name,
           svn_element_content_t *content,
@@ -1454,12 +1454,12 @@ mk_branch(svn_branch_instance_t **new_br
 {
   int new_root_eid = svn_branch_allocate_new_eid(outer_branch->rev_root);
   int new_outer_eid;
-  svn_branch_instance_t *new_branch;
+  svn_branch_state_t *new_branch;
 
   SVN_ERR(svn_editor3_add(editor, &new_outer_eid, svn_node_unknown,
                           outer_branch, outer_parent_eid, outer_name,
                           NULL /*content*/));
-  new_branch = svn_branch_add_new_branch_instance(
+  new_branch = svn_branch_add_new_branch(
                  outer_branch, new_outer_eid, new_root_eid,
                  iterpool);
   svn_branch_map_update(new_branch, new_root_eid,
@@ -1675,9 +1675,8 @@ execute(const apr_array_header_t *action
                       &el_rev[0], editor, SVN_INVALID_REVNUM, base_relpath,
                       pool, pool));
 
-            SVN_ERR(list_all_branch_instances(
-                      el_rev[0]->branch->rev_root,
-                      TRUE, iterpool));
+            SVN_ERR(list_all_branches(el_rev[0]->branch->rev_root, TRUE,
+                                      iterpool));
           }
           break;
         case ACTION_LS:
@@ -1695,7 +1694,7 @@ execute(const apr_array_header_t *action
           VERIFY_EID_NONEXISTENT("branch", 1);
           VERIFY_PARENT_EID_EXISTS("branch", 1);
           {
-            svn_branch_instance_t *new_branch;
+            svn_branch_state_t *new_branch;
 
             SVN_ERR(svn_branch_branch(&new_branch,
                                       el_rev[0]->branch, el_rev[0]->eid,
@@ -1729,7 +1728,7 @@ execute(const apr_array_header_t *action
             apr_hash_t *props = apr_hash_make(iterpool);
             svn_element_content_t *content
               = svn_element_content_create_dir(props, iterpool);
-            svn_branch_instance_t *new_branch;
+            svn_branch_state_t *new_branch;
 
             SVN_ERR(mk_branch(&new_branch,
                               editor, parent_el_rev[0]->branch,



Mime
View raw message