Checkout Tools
  • last updated 2 hours ago
Constraints: committers
Constraints: files
Constraints: dates
In 'svnmover', consolidate some branching methods: merge the 'branch' and

'open_branch' methods into one.

* subversion/include/private/svn_branch.h

(svn_branch__txn_open_branch): Add a 'tree_ref' parameter.

(svn_branch__txn_branch): Delete.

* subversion/include/private/svn_branch_impl.h

(svn_branch__txn_v_open_branch_t): Add a 'tree_ref' parameter.

(svn_branch__txn_v_branch_t): Delete.

(svn_branch__txn_vtable_t): Remove that method from the vtable.

* subversion/libsvn_delta/branch.c

(branch_txn_open_branch): Add a 'tree_ref' parameter, and apply it like

the 'branch' method used to do.

(branch_txn_branch): Delete.

(svn_branch__txn_open_branch): Add a 'tree_ref' parameter.

(svn_branch__txn_branch): Delete.

(branch_txn_create): Remove that method from the vtable.

* subversion/libsvn_delta/branch_compat.c

(compat_branch_txn_open_branch): Add a 'tree_ref' parameter.

(compat_branch_txn_branch): Delete.

(svn_branch__compat_txn_from_delta_for_commit): Remove that method from

the vtable.

* subversion/libsvn_delta/branch_nested.c

(svn_branch__instantiate_elements_r): Update caller: pass null.

(nested_branch_txn_open_branch): Add a 'tree_ref' parameter, and apply

recursion to it like nested_branch_txn_branch() used to do.

(nested_branch_txn_branch): Delete.

(svn_branch__nested_txn_create): Remove that method from the vtable.

* tools/dev/svnmover/merge3.c

(merge_subbranch): Use 'open_branch' instead of 'branch' method.

* tools/dev/svnmover/svnmover.c



do_mkbranch): Update caller: pass null.


do_topbranch): Use 'open_branch' instead of 'branch' method.

  1. … 6 more files in changeset.
In 'svnmover', consolidate some branching methods. Basically, delete the

two 'add branch' methods because 'open branch' can do the same job.

* subversion/include/private/svn_branch.h

(svn_branch__txn_get_branches): Add comments.

(svn_branch__txn_open_branch): Add comments. Rename a parameter.

(svn_branch__state_t): Add comments.


svn_branch__txn_add_new_branch): Delete.

* subversion/include/private/svn_branch_impl.h


svn_branch__txn_v_add_new_branch_t): Delete.

(svn_branch__txn_vtable_t): Delete those entries from the vtable.

* subversion/libsvn_delta/branch.c


branch_txn_add_new_branch): Delete.


branch_txn_branch): Don't use svn_branch__txn_add_new_branch().


svn_branch__txn_add_new_branch): Delete.

(svn_branch__txn_open_branch): Rename a parameter.

(branch_txn_create): Update the vtable.

(svn_branch__txn_parse): Don't use svn_branch__txn_add_branch().

* subversion/libsvn_delta/branch_compat.c


compat_branch_txn_add_new_branch): Delete.

(svn_branch__compat_txn_from_delta_for_commit): Update the vtable.

* subversion/libsvn_delta/branch_nested.c

(svn_branch__instantiate_elements_r): Use svn_branch__txn_open_branch()

instead of ...add_new_branch.


nested_branch_txn_add_new_branch): Delete.

(svn_branch__nested_txn_create): Update the vtable.

* tools/dev/svnmover/svnmover.c

(do_mkbranch): Add a comment.

  1. … 5 more files in changeset.
In 'svnmover', track history better.

For each version of each branch, store pointers to previous branch-versions,

called "parents" like in Git. Usually, a branch version has one parent that

points to the previous version of the same branch. Upon branching, the new

branch gets one parent that points to the chosen version of the source

branch. Upon merging, in the usual case of a complete merge from a source

branch into a target branch, the target branch gets two parents: its own

previous version, and the merge source.

* subversion/include/private/svn_branch.h


svn_branch__txn_add_new_branch): Don't take a 'predecessor' parameter.

(svn_branch__state_t): Don't track a 'predecessor' as a public field here.




svn_branch__history_dup): New.

(svn_branch__state_get_history): Rename from


(svn_branch__state_set_history): Rename from


* subversion/include/private/svn_branch_impl.h

Track the changes in svn_branch.h.

* subversion/libsvn_delta/branch.c

Implement the changes in svn_branch.h.

* subversion/libsvn_delta/branch_compat.c

Track the changes in svn_branch.h.

* subversion/libsvn_delta/branch_nested.c

Track the changes in svn_branch.h.

* subversion/tests/cmdline/

(reported_mg_diff): No longer expect any diff output describing a merge

history difference, as we don't print that in a diff any more.

* tools/dev/svnmover/ra.c

(branch_get_mutable_state): Initialize each branch's parent to point to

the same branch in the base revision.

* tools/dev/svnmover/svnmover.c



svn_branch__history_add_parent): New.

(history_diff): Rename from 'merge_history_diff'.

(txn_is_changed): Don't compare history, but leave some place-holder code

in case we want to do so later.

(get_union_of_subbranches): Make robust against either or both inputs

being null.

(svn_branch__replay): Update the replaying of a change of history.

(update_wc_base_r): Update the copying of history for a new branch.

(do_merge): Update the recording of history.

(do_auto_merge): Dummy implementation: does nothing.

(show_history_r): New.

(branch_diff_r): Don't show history differences.

(find_branch_main_parent): New.

(svn_branch__find_predecessor_el_rev): Update the finding of the main


(do_log): Also show the history before the diff of each revision.

(do_mkbranch): Track the API changes.

(do_branch): Initialize the history (parent) of the new branch.

(show_branch_history): New.

(execute): In the 'info-wc' subcommand, show the history of the working

branch (and not of the base branch).

  1. … 7 more files in changeset.
In 'svnmover', allow a couple of nested-branching functions to operate on a

non-flat branch hierarchy without raising an assertion failure.

The specific case this enables is where a branch-root element points to a

nested branch that doesn't currently exist. No test currently requires this,

but it makes the functions more widely applicable for future use.

* subversion/libsvn_delta/branch_nested.c

(svn_branch__get_immediate_subbranch_eids): New, extracted...

(svn_branch__get_immediate_subbranches): ... from here.


svn_branch__find_nested_branch_element_by_relpath): Use it, and ignore

any subbranch-root element that points to a nonexistent nested branch

instead of raising an assertion failure.

In 'svnmover', tweak the 'branch state' API to slightly simplify both the

implementation and some callers.

* subversion/include/private/svn_branch.h

(svn_branch__state_set_element): New.

* subversion/include/private/svn_branch_impl.h

(svn_branch__state_v_set_element_t): New.


svn_branch__state_v_delete_one_t): Delete.

(svn_branch__state_vtable_t): Replace 'alter_one' and 'delete_one' with


* subversion/include/private/svn_element.h,


(svn_element__tree_set): Constify the input.

* subversion/libsvn_delta/branch.c

(branch_map_set): Constify the input.


branch_state_alter): Delete.


svn_branch__state_set_element): New.


svn_branch__state_delete_one): Change implementations to forward to


(branch_state_create): Update the vtable.


svn_branch__state_parse): Update callers.

* subversion/libsvn_delta/branch_nested.c

(branch_instantiate_elements): Use the new method. Add a missing SVN_ERR().

* tools/dev/svnmover/merge3.c

(branch_merge_subtree_r): Use the new method.

* tools/dev/svnmover/svnmover.c


update_wc_base_r): Use the new method.

  1. … 7 more files in changeset.
Merge the 'svnmover' prototype from the 'move-tracking-2' branch to trunk.

See the dev@ email thread "Merge 'svnmover' demo tool to trunk" started on

2015-11-10, archived at e.g. <>.

This is a reintegration (performed as an automatic merge) followed by

reverting the unwanted parts. As such, those unwanted parts (such as shim

insertions in several libraries) will be treated as 'record-only merged' and

will not be picked up by any subsequent automatic merge to trunk.

A brief description of the changes follows.

* build.conf

Adjust to build the new files.


Adjust compiler warning flags to not warn about passing or returning a

structure, because some of the code does so.


Add the licence text for the embedded 'linenoise' library.

* notes/move-tracking/README

New file, describing this work.

* subversion/include/private/svn_branch.h,






New files.

* subversion/libsvn_delta/branch.c,






New files.

* subversion/include/private/svn_cmdline_private.h




svn_cmdline__stderr_is_a_terminal): New.

* subversion/tests/cmdline/

New file.

* subversion/tests/cmdline/svntest/


run_and_verify_svnmover2): New.

* subversion/tests/cmdline/svntest/


run_svnmover): New.

(execute_tests): Initialize 'svnmover_binary'.

* subversion/tests/cmdline/svntest/

(State): Add 'rename' and 'from_eids' methods.

(StateItem): Add an 'eid' attribute.

* tools/dev/svnmover

New tool.

  1. … 25 more files in changeset.