On the 'move-tracking-2' branch: Implement '^B<branch-id>/path' syntax for svnmover path inputs.
The full syntax is
When BRANCH-ID is given, this means the relative path RELPATH within the branch. When branches are nested, this may identify an element in a branch that is nested inside branch <branch-id>; in case of multiple nesting, the most deeply nested branch is found.
When the '^B<branch-id>/' prefix is not given, look inside the same branch id as the WC base branch when a revision number is given, and look inside the WC working branch when a revision number is not given.
* subversion/include/private/svn_branch.h, subversion/libsvn_delta/branch.c (svn_branch_repos_find_el_rev_by_path_rev): Take an arbitrary branch id and a branch-relative path instead of a top-level branch number and a repository-relative path. (svn_branch_find_nested_branch_element_by_relpath): Rename from svn_branch_find_nested_branch_element_by_rrpath. Take a branch-relative path instead of a repository-relative path. (svn_branch_repos_get_branch_by_id): New. (svn_branch_repos_find_el_rev_by_id): Simplify by using svn_branch_repos_get_branch_by_id; this also means it will throw an error instead of crashing if the branch is not found.
* subversion/libsvn_delta/compat3e.c (drive_changes_r, drive_changes_branch): Track the change to svn_branch_repos_find_el_rev_by_path_rev(), by identifying the top-level branch by its branch-id rather than its top-level branch number.
* subversion/svnmover/svnmover.h (svnmover_wc_t): Remove the 'top_branch_num' field.
* subversion/svnmover/svnmover.c (wc_create): Remove initialization of the obsolete 'top_branch_num' field. (action_t): Add a 'branch_id' field. (find_el_rev_by_rrpath_rev): Look up the path in a given branch, defaulting to the base branch when looking in a given revision or the working branch otherwise. (execute): Pass on the branch id when looking up a path. Remove a re-initialization of the obsolete 'top_branch_num' field. (parse_actions): Parse "^B<branch-id>/path" syntax. (sub_main): No longer pass the obsolete 'top_branch_num' parameter to wc_create().
(The syntax is redundant, as <existing-branch-id> implies <path-to-existing-branch>.)
TODO: * change svnmover syntax so that paths given are relative to the branch designated by the "-B" option; * mkbranch <top-level-branch> * rmbranch <top-level-branch> * command-line syntax for addressing things in other top-level branches, e.g. <path>@[<rev>].[B<branch-id>] or ^B<branch-id>/path[@rev]
* subversion/include/private/svn_branch.h (svn_branch_add_new_branch, svn_branch_branch_subtree): Take the revision root as a separate parameter.
* subversion/libsvn_delta/branch.c (svn_branch_instantiate_subtree): Adjust calls to track the API changes. (svn_branch_add_new_branch, svn_branch_branch_subtree): Take the revision root as a separate parameter. (svn_branch_revision_root_delete_branch): Also update the list of top-level branches, in preparation for when we can delete a top-level branch. (svn_branch_delete_branch_r): Remove a dereference that was redundant for nested branches but would have broken when deleting a top-level branch. (svn_branch_repos_find_el_rev_by_path_rev): Error out nicely if asked to look in a nonexistent top-level branch.
* subversion/libsvn_delta/compat3e.c (drive_changes_branch): Create the top-level storage node for any newly created top-level branch.
* subversion/svnmover/svnmover.c (commit_callback_baton_t, display_diff_of_commit): Rename a baton field, for clarity. (wc_commit): Support creating a new top-level branch as part of the commit. (action_code_t, action_defn): Add a 'tbranch' subcommand. (do_topbranch): New. (execute): Implement the 'tbranch' subcommand. (find_el_rev_by_rrpath_rev): Adjust doc string now that it can return an error if the given top-level branch does not exist at the requested rev. (svn_branch_replay, merge_subbranch, mk_branch, do_branch): Adjust calls to track the API changes.