Checkout Tools
  • last updated 2 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
On the 'move-tracking-2' branch: Rename and move some files and content away

from 'editor3' towards 'branch_compat'.

This continues the refactoring to use branch txn/state objects instead of

a single 'editor'.

* subversion/include/private/svn_branch_compat.h

Copy from svn_editor3e.h. Delete all 'editor' stuff; keep all

compatibility stuff.

* subversion/include/private/svn_editor3e.h

Delete all 'editor' implementation details and compatibility stuff; keep

only the lengthy discussions about editor design and its methods.

* subversion/libsvn_delta/compat3e.c

Rename this file...

* subversion/libsvn_delta/branch_compat.c

... to this.

* subversion/libsvn_delta/editor3e.c

Delete this file.

* subversion/include/private/svn_ra_private.h,

* subversion/include/private/svn_wc_private.h,

* subversion/libsvn_repos/commit.c

* subversion/svnmover/svnmover.c

Update the #include from 'svn_editor3e.h' to 'svn_branch_compat.h'.

  1. … 8 more files in changeset.
On the 'move-tracking-2' branch: Rename some identifiers away from 'editor3'

towards 'branch_compat'.

This continues the refactoring to use branch txn/state objects instead of

a single 'editor'.

  1. … 10 more files in changeset.
On the 'move-tracking-2' branch: Let the compatibility layer work with a

'branch txn' class instead of an 'editor'.

This continues the refactoring to use branch txn/state objects instead of

a single 'editor'.

* subversion/include/private/svn_editor3e.h

(svn_editor3__ev3_from_delta_for_commit,

svn_editor3__delta_from_ev3_for_commit,

svn_update_editor3_t): Use a 'branch txn' instead of an 'editor'.

* subversion/include/private/svn_ra_private.h,

subversion/libsvn_ra/ra_loader.c

(svn_ra_get_commit_editor_ev3): Remove the 'editor' output parameter.

* subversion/libsvn_delta/compat3e.c

(svn_editor3__insert_shims,

(svn_editor3__delta_from_ev3_for_commit,

(svn_editor3__delta_from_ev3_for_update): Use a 'branch txn' instead of an

'editor'.

(editor3_*): Delete.

(svn_branch_txn_priv_t,

compat_branch_txn_*): New, replacing editor3_*.

(svn_editor3__ev3_from_delta_for_commit,

svn_editor3__ev3_from_delta_for_update): Use a 'branch txn' instead of an

'editor'.

* subversion/svnmover/svnmover.c

(wc_checkout): Wrap the basic txn in a branch-nesting txn wrapper.

(wc_commit): Use a 'branch txn' instead of an 'editor'.

(replay,

svn_branch_merge,

do_branch_and_delete,

execute): Don't wrap in a branch-nesting txn wrapper here.

  1. … 4 more files in changeset.
On the 'move-tracking-2' branch: Hide some data members in the branch txn

class.

This continues the refactoring to use branch txn/state objects instead of

a single 'editor'.

* subversion/include/private/svn_branch.h

(svn_branch_txn_t): Move 'first_eid', 'next_eid' from here.

(svn_branch_txn_get_num_new_eids): New.

* subversion/libsvn_delta/branch.c

(svn_branch_txn_priv_t): Move 'first_eid', 'next_eid' to here.

(branch_txn_get_num_new_eids,

svn_branch_txn_get_num_new_eids): New.

(branch_txn_create): Add it to the vtable.

(EID_IS_ALLOCATED,

branch_txn_new_eid,

svn_branch_txn_finalize_eids,

svn_branch_txn_parse,

svn_branch_txn_serialize): Track the move.

* subversion/libsvn_delta/branch_nested.c

(nested_branch_txn_get_num_new_eids): New.

(svn_nested_branch_txn_create): Add it to the vtable.

* subversion/libsvn_delta/branch_private.h

(branch_txn_v_get_num_new_eids_t): New.

(svn_branch_txn_vtable_t): Add it to the vtable.

* subversion/libsvn_delta/compat3e.c

(editor3_alter): Remove an obsolete usage.

* subversion/svnmover/svnmover.c

(subtree_replay): Remove direct access to the 'first_eid' field.

(allocate_eids): New.

(wc_commit): Allocate here instead, using the new method instead of direct

access.

  1. … 5 more files in changeset.
On the 'move-tracking-2' branch: Remove the use of a now redundant

'in-memory editor' in the svnmover WC code.

This continues the refactoring to use branch txn/state objects instead of

a single 'editor'.

* subversion/include/private/svn_editor3e.h

(svn_editor3_in_memory): Delete.

(svn_branch_get_migration_editor): Take a 'txn' instead of an 'editor'.

* subversion/libsvn_delta/compat3e.c

(editor3_mem_complete,

editor3_mem_abort,

svn_editor3_in_memory): Delete.

* subversion/libsvn_delta/migrate.c

(edit_baton,

svn_branch_get_migration_editor): Take a 'txn' instead of an 'editor'.

(At present there is no implementation here to use it, either way.)

* subversion/svnmover/svnmover.c

(wc_checkout): Don't initialize an 'editor'.

(do_switch,

do_commit,

final_commit): Use txn->sequence_point() instead of editor->complete().

(migrate_replay_rev_started,

do_migrate): Pass a 'txn' instead of an 'editor'.

* subversion/svnmover/svnmover.h

(svnmover_wc_t): Remove the 'editor' field.

  1. … 4 more files in changeset.
On the 'move-tracking-2' branch: Remove a premature optimization, the

ability to fetch element payloads from the repository on demand.

Instead, read all payloads in full at start-up. A real implementation

certainly could not afford to work this way, but this will make some other

refactorings easier in the short term.

* subversion/include/private/svn_editor3e.h

(svn_editor3_payload_resolve,

svn_editor3_cb_payload_resolve_t,

svn_editor3_cb_funcs_t): Delete the 'payload_resolve' method.

(svn_payload_fetch): New.

* subversion/libsvn_delta/compat3e.c

(svn_payload_fetch): New.

(editor3_payload_resolve,

svn_editor3_in_memory,

svn_editor3__ev3_from_delta_for_commit): Delete the 'payload_resolve'

method.

* subversion/libsvn_delta/editor3e.c

(svn_editor3_payload_resolve,

wrap_payload_resolve,

svn_editor3__get_debug_editor): Delete the 'payload_resolve' method.

* subversion/libsvn_ra/ra_loader.c

(txn_fetch_payloads): New.

(svn_branch_repos_fetch_info,

svn_branch_get_mutable_state,

svn_ra_load_branching_state): Fetch payloads.

* subversion/svnmover/svnmover.c

(element_differences,

do_put_file,

do_cat): No longer call 'svn_editor3_payload_resolve'.

  1. … 4 more files in changeset.
On the 'move-tracking-2' branch: Make branch txn methods return branch state

objects instead of branch ids.

* subversion/include/private/svn_branch.h,

subversion/libsvn_delta/branch.c

(branch_txn_open_branch,

branch_txn_branch,

svn_branch_txn_open_branch,

svn_branch_txn_branch): Output a branch state object instead of a branch

id.

* subversion/libsvn_delta/branch_private.h

(branch_txn_v_open_branch_t,

branch_txn_v_branch_t): Same.

* subversion/libsvn_delta/branch_nested.c

(nested_branch_txn_open_branch,

nested_branch_txn_branch): Same.

* subversion/libsvn_delta/compat3e.c

(editor3_open_branch,

editor3_branch): Adjust callers.

  1. … 4 more files in changeset.
On the 'move-tracking-2' branch: Refactoring: Move the handling of nested

branches into a branch txn class that wraps a basic branch txn class.

* subversion/include/private/svn_branch_nested.h

(svn_nested_branch_txn_create): New.

* subversion/libsvn_delta/branch_nested.c

(branch_in_rev_or_txn): Move here from compat3e.c.

(svn_branch_txn_priv_t,

svn_nested_branch_txn_create): New.

nested_branch_txn_new_eid,

nested_branch_txn_open_branch,

nested_branch_txn_branch,

nested_branch_txn_sequence_point): New, with implementations moved from

compat3e.c.

* subversion/libsvn_delta/compat3e.c

(branch_in_rev_or_txn): Move to branch_nested.c.

(editor3_new_eid,

editor3_open_branch,

editor3_branch,

editor3_sequence_point): Move implementations to branch_nested.c, and

instead wrap a nested-branch-txn object around the plain txn.

  1. … 2 more files in changeset.
On the 'move-tracking-2' branch: Refactoring: give the 'branch txn' and

'branch state' objects some virtual methods.

These methods are intended to take over from the separate 'editor API'. At

this point, however, this is an additional layer below the editor API.

Only the more significant identifiers and changes are mentioned below.

* subversion/include/private/svn_branch.h,

subversion/libsvn_delta/branch.c

(svn_branch_txn_priv_t,

svn_branch_state_priv_t): New.

(svn_branch_txn_t,

svn_branch_state_t): Insert an opaque pointer to a private structure that

contains the function vtable and any private data.

(branch_txn_*,

branch_state_*): New method implementations, some from code that was here

already and some code moved from compat3e.c.

(svn_branch_txn_create,

svn_branch_state_create): Fill in the vtable and private data.

(svn_branch_txn_open_branch,

svn_branch_txn_branch,

svn_branch_txn_sequence_point,

svn_branch_state_copy_tree): New methods, based on editor3 methods, with

implementations moved here from compat3e.c.

(svn_branch_txn_new_eid,

svn_branch_state_delete_one,

svn_branch_state_alter_one,

svn_branch_state_purge): Methods renamed and/or changed to the regular

form (output results via a pointer parameter, take a scratch pool,

return an error).

* subversion/libsvn_delta/compat3e.c

(editor3_new_eid,

editor3_open_branch,

editor3_branch,

editor3_alter,

editor3_copy_one,

editor3_copy_tree,

editor3_delete,

editor3_sequence_point): Move the implementations of these methods to

'branch.c', and call the branch object methods instead.

  1. … 2 more files in changeset.
On the 'move-tracking-2' branch: Minor refactoring.

* subversion/include/private/svn_branch.h,

subversion/libsvn_delta/branch.c

(svn_branch_txn_add_new_branch): Rename from 'svn_branch_add_new_branch'.

Move 'txn' parameter to the first parameter.

(svn_branch_txn_delete_branch): Take a branch-id instead of a branch

pointer. Allow returning an error.

Delete an old commented-out suggestion for an element structure.

* subversion/libsvn_delta/branch_nested.c

(svn_branch_instantiate_elements_r): Track the changes.

* subversion/libsvn_delta/compat3e.c

(editor3_open_branch,

editor3_branch,

editor3_sequence_point): Track the changes.

  1. … 3 more files in changeset.
On the 'move-tracking-2' branch: Rename 'revision_root' to 'txn'.

* subversion/include/private/svn_branch.h

(svn_branch_txn_t,

svn_branch_txn_create,

svn_branch_txn_get_branches,

svn_branch_txn_get_branch_by_id,

svn_branch_txn_new_eid,

svn_branch_txn_finalize_eids,

svn_branch_txn_delete_branch,

svn_branch_txn_parse,

svn_branch_txn_serialize): Rename from *_revision_root_*.

Rename struct members and function arguments similarly.

* subversion/include/private/svn_branch_repos.h,

subversion/include/private/svn_editor3e.h,

subversion/include/private/svn_ra_private.h,

subversion/libsvn_delta/branch.c,

subversion/libsvn_delta/branch_nested.c,

subversion/libsvn_delta/branch_repos.c,

subversion/libsvn_delta/compat3e.c,

subversion/libsvn_ra/ra_loader.c,

subversion/svnmover/svnmover.c

Track these changes, and make similar changes nearly everywhere.

  1. … 9 more files in changeset.
On the 'move-tracking-2' branch: Tweak, completing r1708952.

* subversion/libsvn_delta/compat3e.c

(editor3_sequence_point): Use svn_branch_revision_root_get_branches()

instead of direct access.

On the 'move-tracking-2' branch: Minor refactoring.

* subversion/include/private/svn_branch.h,

subversion/libsvn_delta/branch.c

(svn_branch_revision_root_get_branches): Return a copy of the array.

* subversion/libsvn_delta/compat3e.c

(drive_changes): Use svn_branch_revision_root_get_branches() instead

of direct access.

(editor3_sequence_point): Use svn_branch_revision_root_get_branches()

instead of direct access, and thus simplify a little.

  1. … 2 more files in changeset.
On the 'move-tracking-2' branch: Some fixes for top-level branching.

This isn't completely fixed, however.

* subversion/libsvn_delta/branch.c

(branch_state_pool_get): New.

(branch_finalize_eids): Allocate state data in the right pool.

* subversion/libsvn_delta/compat3e.c

(editor3_open_branch): Don't assert what isn't always true.

* subversion/svnmover/svnmover.c

(wc_checkout): Allocate state data in the right pool.

(do_topbranch): Allocate a unique id for the new branch.

  1. … 2 more files in changeset.
On the 'move-tracking-2' branch: Rename a struct and its functions,

following r1708631.

* subversion/include/private/svn_element.h,

subversion/libsvn_delta/element.c

(svn_element_content_t,

svn_element_content_create,

svn_element_content_dup,

svn_element_content_equal): Renamed from 'svn_branch_el_rev_content_*'.

* subversion/include/private/svn_branch.h,

subversion/include/private/svn_editor3e.h,

subversion/libsvn_delta/branch.c,

subversion/libsvn_delta/branch_nested.c,

subversion/libsvn_delta/compat3e.c,

subversion/libsvn_delta/editor3e.c,

subversion/svnmover/svnmover.c

Update all callers/users.

  1. … 8 more files in changeset.
On the 'move-tracking-2' branch: More refactoring, disentangling the concept

of nested branches from the basic concept of branches, following r1708550.

* subversion/include/private/svn_branch.h,

subversion/libsvn_delta/branch.c

(svn_branch_state_t): Move the element mapping into a sub-structure.

(svn_branch_root_eid,

svn_branch_get_element_tree,

svn_branch_get_element_tree_at_eid): New.

(svn_branch_el_rev_content_t,

svn_branch_el_rev_content_create,

svn_branch_el_rev_content_dup,

svn_branch_el_rev_content_equal): Move to element.c/h.

(svn_branch_subtree_t,

svn_branch_subtree_create,

svn_branch_subtree_get_subbranch_at_eid): Move to branch_nested.c/h.

(svn_branch_get_element_tree_at_eid): Rename from

'svn_branch_get_subtree_n' and change the return type.

(svn_branch_instantiate_elements,

svn_branch_map_add_subtree): Change an input parameter type.

(svn_branch_subtree_get_path_by_eid): Delete; the replacement is

'svn_element_tree_get_path_by_eid'.

(map_purge_orphans): Delete; the replacement is

'svn_element_tree_purge_orphans'.

* subversion/include/private/svn_branch_nested.h,

subversion/libsvn_delta/branch_nested.c

(svn_branch_subtree_t,

svn_branch_subtree_create,

(svn_branch_subtree_get_subbranch_at_eid): Moved from branch.c/h.

* subversion/include/private/svn_element.h,

subversion/libsvn_delta/element.c

(svn_branch_el_rev_content_t,

svn_branch_el_rev_content_create,

svn_branch_el_rev_content_dup,

svn_branch_el_rev_content_equal): Move from branch.c/h.

(svn_element_tree_t,

svn_element_tree_create,

svn_element_tree_get,

svn_element_tree_set,

svn_element_tree_purge_orphans,

svn_element_tree_get_path_by_eid): New.

* subversion/libsvn_delta/compat3e.c

Update all callers/users.

* subversion/svnmover/svnmover.c

Update all callers/users.

  1. … 7 more files in changeset.
On the 'move-tracking-2' branch: Following r1708550, remove the 'root

branches' field of the branch state object.

* subversion/include/private/svn_branch.h

(svn_branch_revision_root_t): Remove the 'root branches' field. Update a

comment.

* subversion/libsvn_delta/branch.c

(svn_branch_revision_root_create,

svn_branch_add_new_branch,

svn_branch_revision_root_delete_branch,

svn_branch_revision_root_parse): No longer update the 'root branches'

field.

* subversion/libsvn_delta/compat3e.c

(drive_changes): Adjust the way of looping over all 'root branches'.

  1. … 2 more files in changeset.
On the 'move-tracking-2' branch: Disentangle the concept of nested branches

from the basic concept of branches.

* subversion/include/private/svn_branch.h,

subversion/libsvn_delta/branch.c

(svn_branch_state_t,

svn_branch_state_create,

svn_branch_add_new_branch): Add a branch-id field, and delete the outer-

branch and outer-eid fields.

(svn_branch_get_element): Remove an assertion which need not be true, and

which with the new code is not always true.

Move some functions to svn_branch_nested.h and branch_nested.c.

* subversion/include/private/svn_branch_repos.h,

subversion/libsvn_delta/branch_repos.c

Move some functions to svn_branch_nested.h and branch_nested.c.

* subversion/include/private/svn_branch_nested.h,

subversion/libsvn_delta/branch_nested.c

New files.

* subversion/libsvn_delta/compat3e.c

(branch_get_top_num): Delete.

(branch_get_storage_root_rrpath,

editor3_open_branch,

editor3_branch,

drive_changes,

editor3_sequence_point): Adjust accordingly.

* subversion/svnmover/svnmover.c

(branch_id_str,

do_branch_into,

point_to_outer_element_instead,

execute): Adjust accordingly.

* subversion/tests/cmdline/svnmover_tests.py

(merge_swap_abc,

move_to_related_branch_2): Adjust expected outputs of the '--ui=serial'

listing to account for branch root paths no longer being included in the

serialization format.

* subversion/tests/cmdline/svntest/wc.py

(_re_parse_eid_branch,

State.from_eids): Adjust to account for branch root paths no longer being

included in the serialization format.

  1. … 9 more files in changeset.
On the 'move-tracking-2' branch: Refactoring towards moving the

subbranch-root element concept to a higher level. Represent a subbranch-root

payload by a payload object with a flag set, rather than by null, and

eliminate some special handling of a subbranch-root element.

* subversion/include/private/svn_branch.h

(svn_branch_update_subbranch_root_element): Delete.

* subversion/include/private/svn_element.h

(svn_element_payload_t): Add an 'is_subbranch_root' field.

(svn_element_payload_create_subbranch): New.

* subversion/libsvn_delta/branch.c

(svn_branch_update_subbranch_root_element): Delete.

(branch_validate_element,

map_purge_orphans,

svn_branch_map_add_subtree,

svn_branch_state_parse,

svn_branch_state_serialize): Update the callers/users.

* subversion/libsvn_delta/compat3e.c

(editor3_alter): Update the callers/users.

* subversion/libsvn_delta/editor3e.c

(svn_editor3_alter,

svn_editor3_copy_one,

svn_editor3_payload_resolve,

wrap_alter): Update the callers/users.

* subversion/libsvn_delta/element.c

(svn_element_payload_invariants,

svn_element_payload_equal): Update the callers/users.

(svn_element_payload_create_subbranch): New.

* subversion/svnmover/svnmover.c

(subtree_replay,

element_merge,

mk_branch,

do_branch): Update the callers/users.

  1. … 6 more files in changeset.
On the 'move-tracking-2' branch: Simpify an API.

* subversion/include/private/svn_branch.h,

subversion/libsvn_delta/branch.c

(svn_branch_instantiate_elements): Rename from

'svn_branch_instantiate_subtree'. Don't take new parent-eid and name

parameters; instead, take these from the 'elements' input.

* subversion/libsvn_delta/compat3e.c

(editor3_branch): Adjust the caller.

* subversion/svnmover/svnmover.c

(do_branch_into): Adjust the caller.

  1. … 3 more files in changeset.
On the 'move-tracking-2' branch: Record where branches were branched from.

* subversion/include/private/svn_branch.h,

subversion/libsvn_delta/branch.c

(svn_branch_rev_bid_t,

svn_branch_rev_bid_create,

svn_branch_rev_bid_dup): New.

(svn_branch_state_t,

svn_branch_state_create,

svn_branch_add_new_branch,

svn_branch_subtree_t): Add a 'predecessor' field.

(svn_branch_get_subtree): Fill in the 'predecessor' field.

(svn_branch_instantiate_subtree): Pass on the predecessor when creating

any nested branches.

(parse_branch_line,

svn_branch_state_parse,

svn_branch_state_serialize): Read and write the branch predecessor info.

(svn_branch_revision_root_serialize): Finalize the predecessor 'rev' field

by converting '-1' to the committed revision number.

* subversion/include/private/svn_editor3e.h,

subversion/libsvn_delta/editor3e.c

(svn_editor3_open_branch,

svn_editor3_open_branch_t): Add a 'predecessor' field.

(wrap_open_branch,

change_detection_open_branch): Adjust accordingly.

* subversion/libsvn_delta/compat3e.c

(editor3_open_branch,

editor3_branch): Pass on the predecessor when creating a new branch.

* subversion/libsvn_ra/ra_loader.c

(svn_branch_get_mutable_state): Update all the 'predecessor' info to point

to the base revision instead of to that revision's predecessor.

* subversion/svnmover/svnmover.c

(svn_branch_replay): Pass on the predecessor when creating a new branch.

(mk_branch): Pass null for the predecessor of the new branch.

* subversion/tests/cmdline/svntest/wc.py

(re_parse_eid_branch,

State.from_eids): Adjust the regex for matching the branch metadata.

  1. … 7 more files in changeset.
On the 'move-tracking-2' branch: Some tidying up.

* subversion/include/private/svn_branch.h,

subversion/libsvn_delta/branch.c

(svn_branch_id_nest): New.

(svn_branch_id_unnest): Rename from 'svn_branch_id_split'. Move the doc

string to the declaration.

(svn_branch_branch_subtree): Delete.

(svn_branch_rev_bid_eid_dup): Allow a null input.

(svn_branch_instantiate_subtree): Avoid using svn_branch_branch_subtree().

(svn_branch_state_parse): Track the rename.

* subversion/libsvn_delta/compat3e.c

(editor3_open_branch): Use svn_branch_id_nest().

* subversion/libsvn_delta/editor3e.c

(svn_editor3_open_branch,

svn_editor3_branch): Allow the output pointer to be null.

* subversion/svnmover/svnmover.c

(subtree_subbranch_str): Use svn_branch_id_nest().

(merge_subbranch): Avoid using svn_branch_branch_subtree().

(branch_merge_subtree_r): Add comments.

(subtree_diff_r): Use svn_branch_id_nest().

  1. … 4 more files in changeset.
On the 'move-tracking-2' branch: Add a 'branch' method to the editor and use

it instead of direct access to the branch API.

* subversion/include/private/svn_editor3e.h

(svn_editor3_branch,

svn_editor3_cb_branch_t): New.

(svn_editor3_cb_funcs_t): Add the method to the vtable.

* subversion/libsvn_delta/editor3e.c

(svn_editor3_branch,

wrap_branch,

change_detection_branch): New.

(svn_editor3__get_debug_editor,

svn_editor3__change_detection_editor): Add the method to the vtable.

* subversion/libsvn_delta/compat3e.c

(branch_in_rev_or_txn): New, factored out...

(editor3_copy_tree): ... from here.

(editor3_branch): New.

(svn_editor3_in_memory,

svn_editor3__ev3_from_delta_for_commit): Add the method to the vtable.

* subversion/svnmover/svnmover.c

(do_branch,

do_topbranch): Use the method.

(do_branch_and_delete,

execute): Track the changes to do_branch() and do_topbranch().

  1. … 3 more files in changeset.
On the 'move-tracking-2' branch: Keep track of new EIDs assigned with a

transaction, and only convert them to permanent EIDs at commit time.

This allows us to add elements in a txn based on an old revision, and then

'update' the txn to be based on a newer revision, and the EIDs added in the

newer revision will not clash with the EIDs added in the txn. (This 'update'

could be either a client-side WC update or the automatic rebase-on-commit.)

* subversion/libsvn_delta/editor3e.c

(VALID_EID): Adjust for local EIDs being negative.

* subversion/include/private/svn_branch.h,

subversion/libsvn_delta/branch.c

(svn_branch_revision_root_t): Document that 'first_eid' holds less than

zero for transaction-local EIDs.

(svn_branch_txn_new_eid): Rename from 'svn_branch_revision_root_new_eid'.

Allocate negative EIDs instead of positive EIDs.

(branch_finalize_eids,

svn_branch_txn_finalize_eids): New.

(svn_branch_map_add_subtree): Track the rename.

* subversion/libsvn_delta/compat3e.c

(editor3_new_eid): Track the rename.

(editor3_alter): Track the rename. Adjust for local EIDs being negative.

(editor3_complete): Finalize the txn EIDs before committing.

* subversion/libsvn_delta/element.c

(svn_element_payload_invariants): Adjust for local EIDs being negative.

* subversion/svnmover/svnmover.c

(do_branch): Track the rename.

  1. … 5 more files in changeset.
On the 'move-tracking-2' branch: Tweak an editor function to support top-level

branching.

* subversion/libsvn_delta/compat3e.c

(editor3_open_branch): Tweak indentation. Allow 'outer_branch_id' to be

null, to create a top-level branch.

On the 'move-tracking-2' branch: Add an editor method 'open_branch'.

This gets rid of some direct access to the editor's txn.

* subversion/include/private/svn_branch.h,

subversion/libsvn_delta/branch.c

(svn_branch_id_split): Newly public; renamed from 'branch_id_split'.

(svn_branch_state_parse): Track the rename.

* subversion/include/private/svn_editor3e.h

(svn_editor3_open_branch,

svn_editor3_cb_open_branch_t): New.

(svn_editor3_cb_funcs_t): Add the new method.

* subversion/libsvn_delta/editor3e.c

(svn_editor3_open_branch,

wrap_open_branch,

change_detection_open_branch): New.

(svn_editor3__get_debug_editor,

svn_editor3__change_detection_editor): Add the new method to the vtable.

* subversion/libsvn_delta/compat3e.c

(editor3_open_branch): New.

(svn_editor3_in_memory,

svn_editor3__ev3_from_delta_for_commit): Add it to the vtable.

(editor3_alter): Move the EID allocation hack to here...

* subversion/svnmover/svnmover.c

(subtree_replay): ... from here. Take a branch id instead of a pointer.

(svn_branch_replay): Use the new editor method. Use branch ids instead of

pointers.

(replay): Pass a branch id instead of a pointer.

(mk_branch): Use the new editor method. Return a branch id instead of a

pointer.

(execute): Adjust the call to mk_branch.

  1. … 5 more files in changeset.
On the 'move-tracking-2' branch: Rename a function for consistency.

* subversion/include/private/svn_branch.h

subversion/libsvn_delta/branch.c

(svn_branch_revision_root_new_eid): Renamed from

'svn_branch_allocate_new_eid'.

(svn_branch_map_add_subtree,

svn_branch_add_new_branch): Track the rename.

* subversion/libsvn_delta/compat3e.c

(editor3_new_eid): Track the rename.

* subversion/svnmover/svnmover.c

(subtree_replay,

do_branch): Track the rename.

  1. … 3 more files in changeset.
On the 'move-tracking-2' branch: Separate the repository-object API from the

rest of the branching API, into its own header and implementation files.

* subversion/include/private/svn_branch.h,

subversion/libsvn_delta/branch.c

(svn_branch_repos_t): Leave the typedef here; make the struct definition

opaque, moving it to 'branch_repos.c'.

(svn_branch_repos_create,

svn_branch_repos_get_revision,

svn_branch_repos_get_root_branch,

svn_branch_repos_get_branch_by_id,

svn_branch_repos_find_el_rev_by_id,

svn_branch_repos_find_el_rev_by_path_rev,

svn_branch_revision_root_get_base): Move these...

* subversion/include/private/svn_branch_repos.h,

subversion/libsvn_delta/branch_repos.c

... to these new files.

(svn_branch_repos_get_base_revision_root): Renamed from

'svn_branch_revision_root_get_base'.

(svn_branch_repos_add_revision): New.

* subversion/libsvn_delta/compat3e.c

Include 'svn_branch_repos.h'.

* subversion/libsvn_ra/ra_loader.c

Include 'svn_branch_repos.h'.

(svn_branch_repos_fetch_info,

commit_callback_wrapper): Use 'svn_branch_repos_add_revision' instead of

direct access to the 'repos' structure.

* subversion/svnmover/svnmover.c

Include 'svn_branch_repos.h'.

(wc_checkout,

display_diff_of_commit): Track the rename.

  1. … 6 more files in changeset.
On the 'move-tracking-2' branch: Combine the near-identical 'add' and

'alter' methods in the editor API.

* BRANCH-README

Remove this TODO item.

* subversion/include/private/svn_editor3e.h,

subversion/libsvn_delta/editor3e.c

Combine the 'alter' and 'add' methods into a single 'alter' method.

* subversion/libsvn_delta/compat3e.c

(editor3_add,

editor3_alter): Combine as 'editor3_alter'.

(svn_editor3_in_memory,

svn_editor3__ev3_from_delta_for_commit): Update the editor vtables.

* subversion/svnmover/svnmover.c

(do_mkdir,

do_put_file,

mk_branch): Adjust calls: s/svn_editor3_add/svn_editor3_alter/.

  1. … 4 more files in changeset.
On the 'move-tracking-2' branch: Get branch-state pointers out of the editor

API. The API now uses only references (branch-id).

* subversion/include/private/svn_branch.h,

subversion/libsvn_delta/branch.c

(svn_branch_rev_bid_eid_t,

svn_branch_rev_bid_eid_create,

svn_branch_rev_bid_eid_dup): New type and its constructors, similar to

svn_branch_el_rev_id_t but containing a branch-id instead of a branch

state pointer.

* subversion/include/private/svn_editor3e.h,

subversion/libsvn_delta/editor3e.c

In all editor API methods, replace an svn_branch_state_t pointer with a

branch-id or in the case of svn_editor3_new_eid get rid of it entirely,

and replace svn_branch_el_rev_id_t with svn_branch_rev_bid_eid_t.

* subversion/libsvn_delta/compat3e.c

(editor3_new_eid): Track the API change, accessing the transaction through

the editor's private data instead of through the previously passed-in

branch state pointer.

(editor3_add,

editor3_copy_one,

editor3_copy_tree,

editor3_delete,

editor3_alter): Track the API change, looking up branches from their ids.

* subversion/svnmover/svnmover.c

(subtree_replay,

branch_merge_subtree_r,

do_copy,

do_delete,

do_mkdir,

do_put_file,

mk_branch,

do_move): Track the API change, looking up branch ids as needed.

  1. … 5 more files in changeset.