Checkout Tools
  • last updated 7 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
On the 'move-tracking-2' branch: Move 'svnmover' into the 'tools/dev'

subdirectory, as it is not intended for end users.

* build.conf

(private-includes): Update the paths.

(svnmover): Move down to the 'tools' section of the file, and update the

paths.

(__ALL__): Move the 'svnmover' lib from here...

(__MORE__): ... to here.

* subversion/svnmover

Move from here...

* tools/dev/svnmover

... to here.

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

(svnmover_binary): Update the default path.

(execute_tests): Update the path given by '--bin' and '--tools-bin' options.

* LICENSE

Update the path to the 'linenoise' library.

  1. … 4 more files in changeset.
On the 'move-tracking-2' branch: Fix oddities in 'linenoise.c' to avoid

several compiler warnings.

* subversion/svnmover/linenoise/linenoise.c

(unsupported_term): Add 'const', as it is initialized with string

constants.

(linenoiseHistoryAdd): Don't redeclare, as it was already declared in the

header.

(linenoiseEditInsert,

linenoiseEditMoveLeft,

linenoiseEditMoveRight,

linenoiseEditMoveHome,

linenoiseEditMoveEnd,

linenoiseEditHistoryNext,

linenoiseEditDelete,

linenoiseEditBackspace,

linenoiseEditDeletePrevWord): Declare as 'static', as they are not

declared in the header.

On the 'move-tracking-2' branch: Move the 'linenoise' command-line input and

completion library from libsvn_subr into 'svnmover', as it is not (yet)

needed by any other part of Subversion.

* build.conf

Track the move of the 'linenoise' library files.

* subversion/libsvn_subr/prompt.c

(svn_cmdline_prompt_user2): Remove the linenoise' code from here.

* subversion/libsvn_subr/linenoise

Move from here...

* subversion/svnmover/linenoise

... to here.

* subversion/svnmover/svnmover.c

(read_words): Call svnmover_prompt_user() instead of

svn_cmdline_prompt_user2().

* subversion/svnmover/svnmover.h

(svnmover_prompt_user): New.

* subversion/svnmover/util.c

New file.

Include 'linenoise/linenoise.c' in order to build it.

(svnmover_prompt_user): New, moved out of svn_cmdline_prompt_user2().

  1. … 3 more files in changeset.
On the 'move-tracking-2' branch: Factor out a duplicated function.

* subversion/svnmover/svnmover.h

(svnmover_element_differences): Move and rename to here...

* subversion/svnmover/merge3.c

(element_differences): ... from here (updating callers as well)...

* subversion/svnmover/svnmover.c

(element_differences): ... and from here (updating callers as well).

On the 'move-tracking-2' branch: Make all externally visible identifiers

private, by renaming them to contain a double underscore and begin with a

limited number of prefixes (svn_branch__, svn_element__, svn_eid__).

  1. … 22 more files in changeset.
On the 'move-tracking-2' branch: Remove/hide/replace all SVN_DBG calls.

* subversion/libsvn_delta/branch.c

Remove SVN_DBG calls.

* subversion/libsvn_delta/branch_compat.c

Comment out SVN_DBG calls.

* subversion/libsvn_delta/element.c

Remove SVN_DBG calls.

* subversion/libsvn_ra_local/ra_plugin.c

Remove SVN_DBG calls.

* subversion/libsvn_ra/ra_loader.c

Comment out SVN_DBG calls.

* subversion/libsvn_wc/update_editor.c

Comment out SVN_DBG calls.

* subversion/svnmover/merge3.c

Comment out SVN_DBG calls.

* subversion/svnmover/svnmover.c

Remove SVN_DBG calls.

(migrate_replay_rev_started,

migrate_replay_rev_finished): Convert SVN_DBG calls to notifications.

  1. … 6 more files in changeset.
On the 'move-tracking-2' branch: Remove a special debug message suppression

control that I added to the branch in r1663372.

* subversion/include/private/svn_debug.h,

subversion/libsvn_subr/debug.c

(_quiet_mode,

svn_dbg__set_quiet_mode,

svn_dbg__quiet_mode): Delete.

(svn_dbg__preamble,

debug_vprintf): Return to just honouring the 'SVN_DBG_QUIET' env-var.

* subversion/svnmover/svnmover.c

(parse_actions,

sub_main): Let the '-v' option control the local notifications mode

instead of the debug message mode.

  1. … 2 more files in changeset.
On the 'move-tracking-2' branch: Remove most of my special hash and array

iteration utilities, leaving just a few particularly useful variants.

* subversion/include/svn_iter.h,

subversion/libsvn_subr/iter.c

(svn_array_*,

svn_hash_*,

svn_iter_t,

etc.): Delete.

(svn_int_hash_get,

svn_int_hash_set,

svn_int_hash_this_key): Rename and move ...

* subversion/include/private/svn_element.h

subversion/libsvn_delta/element.c

(svn_eid_hash_get,

svn_eid_hash_set,

svn_eid_hash_this_key): ... to these.

(svn_eid__hash_iter_t,

svn_eid__hash_sorted_first,

svn_eid__hash_sorted_next,

svn_eid__hash_sort_compare_items_by_eid,

SVN_EID__HASH_ITER_SORTED,

SVN_EID__HASH_ITER_SORTED_BY_EID): New.

Update all callers to use either existing APR functions or the new

svn_eid_* functions.

  1. … 9 more files in changeset.
On the 'move-tracking-2' branch: Make 'svnmover revert' also discard all

conflicts, like 'svn revert' does, and don't raise an error when a merge

raises conflicts.

Also fix some memory allocation bugs.

* subversion/svnmover/merge3.c

(branch_merge_subtree_r): Allocate conflicts in the result pool.

* subversion/svnmover/svnmover.c

(do_switch): Don't raise an error just because there are conflicts.

(do_revert): Discard all conflicts.

(execute): After 'merge', don't raise an error just because there are

conflicts. Remember conflicts in the WC pool so they will persist beyond

this iteration of the command loop.

On the 'move-tracking-2' branch: Factor out conflict printing into separate

functions.

* subversion/svnmover/merge3.c

(element_merge3_conflict_str,

name_clash_conflict_str,

cycle_conflict_str,

orphan_conflict_str): New, extracted...

(svnmover_display_conflicts): ... from here.

On the 'move-tracking-2' branch: Tweak doc string.

* subversion/svnmover/svnmover.h,

subversion/svnmover/svnmover.c

(svnmover_notify,

svnmover_notify_v): Correct a doc string; remove redundant doc strings.

On the 'move-tracking-2' branch: Tweak a work-around for strange behaviour

of APR functions apr_hash_overlay() and apr_hash_merge().

* subversion/svnmover/svnmover.h

(hash_overlay,

hash_merge): New macros.

* subversion/svnmover/merge3.c

(element_differences,

branch_merge_subtree_r):): s/apr_hash_overlay/hash_overlay/.

* subversion/svnmover/svnmover.c

(element_differences,

get_union_of_subbranches,

subtree_diff_r): s/apr_hash_overlay/hash_overlay/.

(commit,

execute): Remove the old work-around.

On move-tracking-2 branch: fix a pool lifetime issue similar to r1690654.

* subversion/svnmover/svnmover.c

(commit): Allocate subpool from svnmover_wc_t pool.

On the 'move-tracking-2' branch: Remove a redundant data field.

* subversion/svnmover/svnmover.h

(svnmover_wc_version_t): Remove the 'branch_id' field.

* subversion/svnmover/svnmover.c

(wc_checkout,

wc_commit,

find_el_rev_by_rrpath_rev,

do_commit,

execute): Don't initialize or use that field; use 'branch->bid' instead.

On the 'move-tracking-2' branch: Refactoring: remove the plain function

'svn_branch_get_element_tree_at_eid' and use virtual class methods instead.

Also tweak the signature of 'svn_branch_state_get_elements' following

r1713431.

* subversion/include/private/svn_branch.h

(svn_branch_get_element_tree_at_eid): Delete.

(SVN_BRANCH_SEQUENCE_POINT): Delete.

(svn_branch_state_get_elements): Remove 'const' from the return type.

* subversion/include/private/svn_branch_impl.h

(branch_state_v_get_elements_t): Remove 'const' from the return type.

* subversion/include/private/svn_element.h,

subversion/libsvn_delta/element.c

(svn_element_tree_get_subtree_at_eid): New, extracted from

'svn_branch_get_element_tree_at_eid'.

* subversion/libsvn_delta/branch.c

(branch_txn_branch,

copy_subtree): Use 'svn_element_tree_get_subtree_at_eid' instead of

'svn_branch_get_element_tree_at_eid'.

(branch_state_get_element,

svn_branch_state_get_elements): Remove 'const' from the return type.

(svn_branch_get_element_tree_at_eid): Delete.

* subversion/libsvn_delta/branch_compat.c

(convert_branch_to_paths): Track the constness change.

* subversion/libsvn_delta/branch_nested.c

(svn_branch_get_immediate_subbranches): Track the constness change.

(svn_branch_get_subtree): Use 'svn_element_tree_get_subtree_at_eid'

instead of 'svn_branch_get_element_tree_at_eid'.

* subversion/libsvn_ra/ra_loader.c

(txn_fetch_payloads): Track the constness change.

* subversion/svnmover/merge3.c

(detect_clashes,

detect_cycles,

detect_orphans,

branch_merge_subtree_r): Track the constness change.

* subversion/svnmover/svnmover.c

(txn_is_changed,

svn_branch_replay,

list_branch_elements,

list_branch_elements_by_eid): Track the constness change.

  1. … 8 more files in changeset.
On the 'move-tracking-2' branch: Refactoring in the 'branch state' class:

replace some plain functions with virtual methods.

* subversion/include/private/svn_branch.h,

subversion/libsvn_delta/branch.c

(svn_branch_state_get_elements,

svn_branch_state_get_element): New methods...

(svn_branch_get_element_tree,

svn_branch_get_elements,

svn_branch_get_element): ... replacing these.

(branch_state_create): Add them to the vtable.

(svn_branch_get_path_by_eid,

svn_branch_state_serialize): Update callers.

* subversion/libsvn_delta/branch_private.h

(branch_state_v_get_elements_t,

branch_state_v_get_element_t): New function types.

(svn_branch_state_vtable_t): Add them to the vtable.

* subversion/include/private/svn_branch_nested.h,

subversion/libsvn_delta/branch_nested.c

(svn_branch_find_nested_branch_element_by_relpath,

svn_branch_get_immediate_subbranches,

svn_branch_get_subbranch_at_eid,

svn_branch_get_subtree): Change function signatures to include an error

return.

Update all callers.

* subversion/libsvn_delta/branch_compat.c

subversion/libsvn_delta/branch_repos.c,

subversion/libsvn_ra/ra_loader.c,

subversion/svnmover/merge3.c,

subversion/svnmover/svnmover.c

Update all callers, changing local function signatures to return an error

where necessary.

  1. … 8 more files in changeset.
On the 'move-tracking-2' branch: Make 'svnmover' more strict about

'flattening' a branch state into a proper tree and only querying for paths

when it is 'flat'.

* subversion/libsvn_delta/branch.c

(svn_branch_state_priv_t): Add an 'is_flat' flag.

(branch_txn_branch,

branch_state_purge,

branch_state_create,

svn_branch_state_parse): Mark the branch state as 'flat'.

(branch_map_set): Mark the branch state as 'not flat'.

(svn_branch_get_element_tree_at_eid,

svn_branch_get_path_by_eid,

svn_branch_get_eid_by_path): Assert the branch state is 'flat'

* subversion/svnmover/svnmover.c

(do_copy,

do_mkdir,

do_put_file,

mk_branch,

do_branch,

do_branch_into,

do_copy_and_delete,

do_branch_and_delete,

do_branch_into_and_delete,

do_move): Always calculate the paths for display before modifying the

branch.

  1. … 1 more file in changeset.
On the 'move-tracking-2' branch: Make 'svnmover' store conflicts in the WC,

and add subcommands 'conflicts' and 'resolved' to manipulate them.

* subversion/svnmover/merge3.c

(conflict_kind_t,

conflict_object_t,

conflict_object_create,

find_conflict,

svnmover_conflict_resolved,

svnmover_any_conflicts): New.

(svnmover_branch_merge): Use svnmover_any_conflicts().

* subversion/svnmover/svnmover.c

(action_code_t,

action_defn_t): Add new subcommands.

(do_switch): Store conflicts in the WC.

(commit): New, factored out of do_commit() and final_commit(). Raise an

error if there are unresolved conflicts.

(do_commit): Factor out some code as commit().

(final_commit): Delete.

(execute): Store conflicts in the WC. Reimplement final_commit() inline.

* subversion/svnmover/svnmover.h

(svnmover_wc_t): Add a 'conflicts' member.

(svnmover_conflict_resolved,

svnmover_any_conflicts): New.

On the 'move-tracking-2' branch: Detect cycle conflicts -- the last of the

four kinds of tree conflict. Add basic tests for tree conflict detection.

* subversion/svnmover/merge3.c

(element_merge3_conflict_create): Deep-copy the input parameters.

(element_merge3_conflict_dup): New.

(cycle_conflict_t,

cycle_conflict_create): New.

(orphan_conflict_create): Deep-copy the input parameter.

(svnmover_display_conflicts): Include details of cycle conflicts. Tweak

the display format of orphan conflicts. Display a summary, after the

details.

(detect_cycles): New.

(branch_merge_subtree_r): Include cycle conflicts. Allocate all conflicts

in the result pool.

(svnmover_branch_merge): Set the 'conflicts' output to null when there are

no conflicts, rather than an empty conflict object.

* subversion/svnmover/svnmover.c

(do_switch,

execute): Update the usage of svnmover_branch_merge().

* subversion/svnmover/svnmover.h

(conflict_storage_t): Add a 'cycle conflicts' member.

(svnmover_branch_merge): Add a result pool parameter. Update doc string.

(svnmover_display_conflicts): Remove the 'prefix' parameter.

* subversion/tests/cmdline/svnmover_tests.py

(merge_detects_clash_conflicts): Delete (replaced by tree_conflict_clash_1).

(tree_conflict_element_1,

tree_conflict_clash_1,

tree_conflict_clash_2,

tree_conflict_cycle_1,

tree_conflict_orphan_1): New tests.

(test_list): Update.

  1. … 1 more file in changeset.
On the 'move-tracking-2' branch: Fix assumptions about EIDs.

* subversion/svnmover/svnmover.c

(show_subtree_diff,

do_put_file): Allow negative EIDs.

On the 'move-tracking-2' branch: Tweak 'svnmover' notifications.

* subversion/svnmover/svnmover.c

(svnmover_notify_v): Print these verbose-mode-only notifications in blue

instead of green.

(list_branch):Use a normal notification, not verbose-mode-only, for the

branch description.

(execute): Let the 'info-wc' subcommand also state whether the WC has

modifications.

On the 'move-tracking-2' branch: Deduplicate the notification functions in

'svnmover' and use them consistently.

* subversion/svnmover/svnmover.h,

subversion/svnmover/svnmover.c

(svnmover_notify): Rename from 'notify'; make public.

(svnmover_notify_v): Rename from 'notify_v'; make public.

(... everywhere ...): Track the renames.

* subversion/svnmover/merge3.c

(notify_v): Delete.

(svnmover_display_conflicts): Use svnmover_notify() instead of printf().

(branch_merge_subtree_r): Track the renames.

On the 'move-tracking-2' branch: Let the use of coloured output in

'svnmover' be controllable by an option, and let the default depend on

whether standard output is connected to a terminal.

This unbreaks the tests, following r1711012.

* subversion/include/private/svn_cmdline_private.h,

subversion/libsvn_subr/cmdline.c

(svn_cmdline__stdin_is_a_terminal,

svn_cmdline__stdout_is_a_terminal,

svn_cmdline__stderr_is_a_terminal): New.

* subversion/svnmover/svnmover.c

(use_coloured_output): New global variable.

(settext,

settext_stderr): Operate only if 'use_coloured_output' is true.

(usage): Describe the new '--colour' (and '--color') option.

(sub_main): Implement the new '--colour' (and '--color') option.

  1. … 2 more files in changeset.
On the 'move-tracking-2' branch: Use coloured text output in 'svnmover',

on non-Windows systems.

* subversion/svnmover/svnmover.c

(ANSI_*): New constants.

(settext,

settext_stderr): New macros.

(notify,

notify_v): Print notifications in green.

(do_interactive_cross_branch_move,

read_words): Print promts and user input in yellow.

(sub_main,

main): Print errors in red.

On the 'move-tracking-2' branch: Display notification and debug messages

more consistently.

* subversion/svnmover/svnmover.c

(list_branches,

list_all_branches,

commit_callback,

migrate_replay_rev_started,

migrate_replay_rev_finished,

execute,

parse_actions):

Always use notify() for notifications and SVN_DBG() for debug messages.

On the 'move-tracking-2' branch: Allow merge/update/switch to operate even

when the branch root eid differs, as this is well defined, but give a

warning at the application level as it is unusual.

Such merges don't quite work as intended at the moment -- they tend to lose

changes silently -- but that's a separate bug.

* subversion/svnmover/merge3.c

(branch_merge_subtree_r): Remove assertion.

(svnmover_branch_merge): Remove error.

* subversion/svnmover/svnmover.c

(do_switch): Detect the existence of local changes, instead of assuming

there are some. Warn if switching to a branch with different root

element if there are local changes. Correct some doc string errors.

(execute): Warn if merging branches with differing root element.

On the 'move-tracking-2' branch: Move the merge code to a separate source

file.

* subversion/svnmover/merge3.c

New file, copied from 'svnmover.c'. Keep only the merge-related code.

* subversion/svnmover/svnmover.c

Remove all merge-related code.

(do_switch,

execute): Track the two renames.

* subversion/svnmover/svnmover.h

(conflict_storage_t): Move the definition to here.

(svnmover_branch_merge,

svnmover_display_conflicts): New declarations, with new names, for two

functions that were previously local to 'svnmover.c'.

On the 'move-tracking-2' branch: Remove a remnant of nesting from the branch

txn API: take the new branch id directly, rather an outer branch id and an

outer eid.

* 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): Take the new branch id directly, rather an outer

branch id and an outer eid.

* subversion/libsvn_delta/branch_compat.c

(compat_branch_txn_open_branch,

compat_branch_txn_branch): Same.

* subversion/libsvn_delta/branch_nested.c

(nested_branch_txn_open_branch,

nested_branch_txn_branch): Same.

* subversion/libsvn_delta/branch_private.h

(branch_txn_v_open_branch_t,

branch_txn_v_branch_t): Same.

* subversion/svnmover/svnmover.c

(svn_branch_replay,

merge_subbranch,

mk_branch,

do_branch,

do_topbranch): Adjust callers to provide the new branch id.

  1. … 5 more files in changeset.
On the 'move-tracking-2' branch: Start making 'svnmover merge' (and

'svnmover switch') report conflicts more programmatically and thoroughly.

* subversion/svnmover/svnmover.c

(element_merge3_conflict_t,

element_merge3_conflict_create,

name_clash_conflict_t,

name_clash_conflict_create,

orphan_conflict_t,

orphan_conflict_create,

conflict_storage_t,

conflict_storage_create,

brief_eid_and_name_or_nil,

display_conflicts): New.

(element_merge): Return a conflict object instead of just a boolean.

(merge_subbranch): Ignore, for now, any conflicts from merging a

subbranch.

(detect_clashes): Store clash-conflict objects instead of just some

elements.

(detect_orphans): New.

(branch_merge_subtree_r): Collect and return the conflicts instead

of just raising an error.

(svn_branch_merge): Return the conflicts.

(do_switch,

execute): If the merge returns any conflicts, display them and then

raise an error.

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.