Checkout Tools
  • last updated 4 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Add resolver support for moved-file vs moved-file upon update.

The resolver now supports move vs move tree conflicts for files after

an update operation.

Two new resolution operations are available:

(m) - override incoming move and merge incoming changes from 'alpha-moved'

to 'alpha-also-moved'

(M) - accept incoming move and merge local changes from 'alpha-also-moved'

to 'alpha-moved'

Where the file was originally called 'alpha', was renamed to 'alpha-moved'

in the repository, and renamed to 'alpha-also-moved' in the working copy.

Because the local move is broken during the update operation when the

delete-half of the move is updated, the resolver only has the copied half

move available in the working copy. To find the local move destination the

resolver queries the working copy database for nodes which are copies of

the conflict victim's repository path. This can of course lead to ambiguous

results in case a node is first copied and then moved, in which case the

resolver offers the user a choice of local move targets in the usual way.

* subversion/include/private/svn_wc_private.h

(svn_wc__find_copies_of_repos_path): Declare.

* subversion/libsvn_client/conflicts.c

(conflict_tree_update_local_moved_away_details): New conflict details struct.

(resolve_both_moved_file_update_keep_local_move,

resolve_both_moved_file_update_keep_incoming_move): New resolution handlers.

(conflict_tree_get_details_update_local_moved_away): New details fetcher

which locates copied nodes corresponding to the local move.

(get_both_moved_file_paths): New helper function.

(conflict_tree_get_description_update_both_moved_file_merge,

conflict_tree_get_description_update_both_moved_file_move_merge): New

functions which describe incoming move vs local move conflicts flagged

during updates of files.

(configure_option_both_moved_file_merge): Hook up the new options.

(svn_client_conflict_option_get_moved_to_abspath_candidates2,

svn_client_conflict_option_set_moved_to_abspath2,

conflict_type_specific_setup): Support the newly added conflict options.

* subversion/libsvn_wc/node.c

(svn_wc__find_copies_of_repos_path): New.

* subversion/libsvn_wc/wc-queries.sql

(STMT_SELECT_COPIES_OF_REPOS_RELPATH): New query which locates copies of a

particular repository relpath with a particular node kind in working copy.

* subversion/libsvn_wc/wc_db.c

(svn_wc__db_find_copies_of_repos_path): New wc_db API to execute above query.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_find_copies_of_repos_path): Declare.

* subversion/tests/libsvn_client/conflicts-test.c

(create_file_move_vs_file_move_update_conflict): New helper function.

(test_update_file_move_vs_file_move,

test_update_file_move_vs_file_move_accept_move, test_funcs): New tests

which exercise both of the newly added conflict resolution options.

  1. … 6 more files in changeset.
Fix issue #4694 "cherry-pick edit after file was moved on source branch"

Add conflict resolver support for cherry-picking changes from files which

have been moved on the merge source branch. Support multiple merge target

candidates, and run a file merge by default if only one candidate exists.

This implementation extends the existing "local move file text merge"

resolution option with support for 'move siblings' as merge targets.

I am still considering whether this case conceptually deserves a dedicated

resolution option. However, it would be nice to backport this feature to

SVN 1.10. The only API change required by this implementation is allowing

another 'option' parameter value for the existing API functions

svn_client_conflict_option_get_moved_to_abspath_candidates()

and svn_client_conflict_option_set_moved_to_abspath(). This change is

ABI compatible, with the only caveat that a new 'svn' binary running

on top of an older libsvn_client could trigger an input assertion.

Because we require 'svn' to be kept in sync with the libraries this

should not be a problem in practice.

We can still improve the API for >= 1.11 later.

* subversion/include/private/svn_wc_private.h

(svn_wc__find_working_nodes_with_basename): Declare.

* subversion/include/svn_client.h

(svn_client_conflict_option_get_moved_to_abspath_candidates,

svn_client_conflict_option_set_moved_to_abspath): Document that

svn_client_conflict_option_local_move_file_text_merge is now

a valid option parameter for these functions.

* subversion/libsvn_client/conflicts.c

(conflict_tree_local_missing_details): Add and document wc_siblings

and preferred_sibling_idx fields.

(collect_sibling_move_candidates): New helper function.

(conflict_tree_get_details_local_missing): Try to find the 'local missing'

node which corresponds to the conflict victim in the working copy.

Technically, this would require scanning the log for every item in the WC.

However, assuming a cherry-pick from a moved file to a non-moved file, we

can use a short-cut: The basename of the non-moved file is already known

because it must match one of the locations which the moved file was moved

from. So we can restrict tracing of log history to nodes with a basename

which occurs in the chain of file moves on the merge source branch.

(resolve_local_move_file_merge, configure_option_local_move_file_merge):

Add support for merging to WC siblings of conflict victims which are

'locally missing'.

(svn_client_conflict_option_get_moved_to_abspath_candidates,

svn_client_conflict_option_set_moved_to_abspath): Add support for the

svn_client_conflict_option_local_move_file_text_merge resolution option.

* subversion/libsvn_wc/node.c

(svn_wc__find_working_nodes_with_basename): New private API function which

simply forwards to wc_db.

* subversion/libsvn_wc/wc-queries.sql

(STMT_SELECT_PRESENT_HIGHEST_WORKING_NODES_BY_BASENAME_AND_KIND): New query.

* subversion/libsvn_wc/wc_db.c

(svn_wc__db_find_working_nodes_with_basename): New wc_db API function which

finds present working nodes with a given basename.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_find_working_nodes_with_basename): Declare.

* subversion/svn/conflict-callbacks.c

(build_tree_conflict_options, handle_tree_conflict): Support multiple merge target

candidates with the svn_client_conflict_option_local_move_file_text_merge option.

* subversion/tests/libsvn_client/conflicts-test.c

(test_funcs): Mark test_cherry_pick_post_move_edit as PASS.

  1. … 8 more files in changeset.
In the conflict resolver, fix the locating of move targets in the

working copy during merges. The previous implementation only worked

for update/switch, because it assumed that a move target's revision

would always match the incoming-new revision of the conflict victim.

This was a design mistake, since this condition won't hold for merges.

Found by: brane

* subversion/include/private/svn_wc_private.h

(svn_wc__guess_incoming_move_target_nodes): Remove 'rev' parameter.

* subversion/libsvn_client/conflicts.c

(follow_move_chains): Move target candidates from libsvn_wc are now

identified only by URL. So check ancestry between the conflict victim

and each move target candiate in case their revisions do not match.

Add 'victim_repos_relpath' parameter.

(init_wc_move_targets, configure_option_local_move_file_merg): Pass the

victim's repos relpath to follow_move_chains().

* subversion/libsvn_wc/conflicts.c

(svn_wc__guess_incoming_move_target_nodes): Remove 'rev' parameter.

* subversion/libsvn_wc/wc-queries.sql

(STMT_FIND_REPOS_PATH_IN_WC): Ignore the revision column.

* subversion/libsvn_wc/wc_db.c

(svn_wc__find_repos_node_in_wc): Remove 'rev' parameter.

* subversion/libsvn_wc/wc_db.h

(svn_wc__find_repos_node_in_wc): Remove 'rev' parameter.

  1. … 5 more files in changeset.
Add a conflict resolver option which follows an incoming file move.

This new option works for update, switch, and merge operations.

There is no unit test for this option yet.

I have not tested reverse-updates or reverse-merges yet.

We need many many additional tests anyway.

* subversion/include/private/svn_wc_private.h

(svn_wc__guess_incoming_move_target_node): Declare.

* subversion/include/svn_client.h

(svn_client_conflict_option_incoming_move_file_text_merge): New option ID.

* subversion/libsvn_client/conflicts.c

(conflict_tree_incoming_delete_details): Add 'moved_to_abspath'.

(resolve_merge_incoming_added_file_text_merge): Fix typo in comment.

(resolve_incoming_move_file_text_merge): New resolver function.

(configure_option_incoming_move_file_merge): New option config function.

(svn_client_conflict_tree_get_resolution_options): Configure new option.

* subversion/libsvn_wc/conflicts.c

(svn_wc__guess_incoming_move_target_node): Implement. This function

attempts to map a deleted tree conflict victim to a working copy node

which corresponds to the incoming move target.

* subversion/libsvn_wc/wc-queries.sql

(STMT_FIND_REPOS_PATH_IN_WC): New query. Returns all local relpaths at

the 'working' layer (i.e. from nodes_current) which map to a particular

repository path at a particular revision.

* subversion/libsvn_wc/wc_db.c

(svn_wc__find_repos_node_in_wc): New. Runs the above query.

* subversion/libsvn_wc/wc_db.h

(svn_wc__find_repos_node_in_wc): Declare.

* subversion/svn/conflict-callbacks.c

(builtin_resolver_options): Wire up the new option in the conflict menu.

  1. … 7 more files in changeset.
Remove some dead code from libsvn_wc. We always use the function that

also looks in parent directories instead of this function that gives

just a result when the node itself has the data.

* subversion/libsvn_wc/wc-queries.sql

(STMT_SELECT_IPROPS): Remove unused query.

* subversion/libsvn_wc/wc_db.c

(db_read_cached_iprops,

svn_wc__db_read_cached_iprops): Remove functions.

  1. … 1 more file in changeset.
Make exclusive-locking mode set the SQLite journal mode as well, this

gives better performance on NFS and exclusive-locking is a feature

intended to help performance on remote filesystems.

* subversion/libsvn_wc/wc-queries.sql

(STMT_PRAGMA_LOCKING_MODE): Set journal mode as well.

* subversion/libsvn_subr/sqlite.c

(svn_sqlite__open): Add comment.

  1. … 1 more file in changeset.
Following up on r1664476, r1664480, r1664481 fix statement definition to not

fail the wc-queries tests.

* subversion/libsvn_wc/wc-queries.sql

(STMT_HAVE_STAT1_TABLE): Remove unneeded ';' that made sqlite ignore the

LIMIT. Use lower case for column names.

* subversion/tests/libsvn_wc/wc-queries-test.c

(slow_statements): Add STMT_HAVE_STAT1_TABLE.

  1. … 1 more file in changeset.
* subversion/libsvn_wc/wc-queries.sql

(STMT_HAVE_STAT1_TABLE): Use uppercase to match other statements.

* subversion/libsvn_wc/wc-queries.sql

(STMT_HAVE_STAT1_TABLE): Following up on r1664476, fix stupid thinko.

Remove a db transaction on opening wc.db, and at the same time

also verify if the sqlite_stat1 table exists on opening a db

from svn_wc__db_wcroot_parse_local_abspath().

If the table exists we try to add the table, but ignore

errors to avoid problems when the database is read only

(This last part will need verification on other platforms)

* subversion/libsvn_wc/wc-queries.sql

(STMT_HAVE_STAT1_TABLE): New statement.

* subversion/libsvn_wc/wc.h

(SVN_WC__ENSURE_STAT1_TABLE): New define.

* subversion/libsvn_wc/wc_db_wcroot.c

(svn_wc__db_pdh_create_wcroot): Only read format from db when requested

by caller, instead of always when we open the db.

(verify_stats_table,

fetch_db_info): New function.

(svn_wc__db_wcroot_parse_local_abspath): Update caller.

  1. … 2 more files in changeset.
Don't lose files that replace file externals, when they are replaced

by actual file. The regression test for this issue uncovered the

commit fix in r1663991, but the change to db_base_remove() in this

revision resolves the problem in a different way.

* subversion/libsvn_wc/externals.c

(svn_wc__external_remove): When deleting a file external, request

addition of a not-present marker in its place.

* subversion/libsvn_wc/wc-queries.sql

(STMT_DELETE_BASE_RECURSIVE): Include node itself.

* subversion/libsvn_wc/wc_db.c

(db_base_remove): Detect if a deleted file external really needs

to be replaced by a marker. Update caller.

* subversion/tests/cmdline/externals_tests.py

(file_external_to_normal_file): New test.

(test_list): Add file_external_to_normal_file.

* subversion/tests/libsvn_wc/op-depth-test.c

(check_db_rows): Don't use print_row before all values are set

in the row struct to avoid segfaults.

(revert_file_externals): Expect not_present rows to appear.

  1. … 4 more files in changeset.
Tell sqlite when we are interested in the locks and when not in

a few queries where this wasn't obvious.

* subversion/libsvn_wc/wc-queries.sql

(STMT_SELECT_NODE_INFO_WITH_LOCK): Only obtain lock for op_depth 0.

(STMT_SELECT_NODE_CHILDREN_INFO): Make op_depth check more visible.

(STMT_SELECT_BASE_NODE_CHILDREN_INFO): Remove unneeded double op_depth check.

Make the working copy status reporter always report tree conflicts; even if

the node with the tree conflict is shadowed by a file, somewhere up the

tree.

Usually the status walker doesn't descend below files that used to be

directories, but after this patch it will descend if there are tree

conflicts below this file.

This fixes the ugly case that currently the tree conflict resolver doesn't

even see these tree conflicts, unless it just created them. So it certainly

wouldn't have resolved them properly.

* subversion/libsvn_wc/status.c

(svn_wc__internal_status_t): New struct.

(edit_baton): Update status type.

(internal_status,

assemble_status,

assemble_unversioned): Produce svn_wc__internal_status_t instead of

svn_wc_status3_t.

(send_status_structure,

send_unversioned_item): Update caller.,

(one_child_status): Update has descendants check.

(hash_stash): Copy private values.

(tweak_status_hash): Update init.

(find_dir_repos_relpath): Update usage.

(make_dir_baton): Update has descendants check.

(is_sendable_status): Update type.

(handle_statii): Update has descendants check.

(close_directory): Update caller.

(svn_wc__internal_walk_status): Update has descendants check.

(internal_status): Update output type.

(svn_wc_status3): Update caller.

(svn_wc_dup_status3): Create svn_wc__internal_status_t, but duplicate

only svn_wc_status3_t.

* subversion/libsvn_wc/wc-queries.sql

(STMT_FIND_CONFLICT_DESCENDANT): New query.

* subversion/libsvn_wc/wc_db.c

(find_conflict_descendants): New function.

(read_children_info): Set has_descendants on a node if it is a directory in

WORKING/ACTUAL or it was a directory at some layer, and has actual

descendants.

(read_single_info): Set has_descendants.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_info_t): Add boolean.

* subversion/tests/cmdline/stat_tests.py

(status_missing_conflicts): New test.

(test_list): Add status_missing_conflicts.

  1. … 4 more files in changeset.
Fix another misreported reason in the update editor, and the resolver to

handle this change without affecting features.

As part of this fix a few TODO's in the move-update conflict resolver code,

by combining the group of functions that handled breaking moves, and creating

moved_away conflicts to just two functions, that can handle the direct move

and descendant cases alike, and with proper op-depth handling.

Combining the functions uncovered yet another op-depth bug where the break

moves operation was applied to the wrong layer.

* subversion/libsvn_wc/conflicts.c

(resolve_tree_conflict_on_node): Update caller.

(conflict_status_walker_baton): Add boolean.

(conflict_status_walker): Set value in baton if we resolved something.

(svn_wc__resolve_conflicts): Continue as long as we resolved something

in the previous batch. Handle depth filtering in second pass.

Use the resolved_one boolean.

* subversion/libsvn_wc/update_editor.c

(check_tree_conflict): Report local replacements as replacements, even when

whatever was there was moved to make the conflict resolver pick the

right strategy.

* subversion/libsvn_wc/wc-queries.sql

(STMT_SELECT_MOVED_DESCENDANTS_SHD): Remove now unused query.

* subversion/libsvn_wc/wc_db.c

(svn_wc__db_op_break_move_internal): Rename argument to match task.

(db_op_mark_resolved): Rename to...

(svn_wc__db_op_mark_resolved_internal): ... this.

(svn_wc__db_op_mark_resolved): Update caller.

(op_revert_txn): Update caller. Pass proper origin depth.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_resolve_delete_raise_moved_away): Rename to...

(svn_wc__db_op_raise_moved_away): ... this.

(svn_wc__db_resolve_break_moved_away,

svn_wc__db_resolve_break_moved_away_children): Combine into..

(svn_wc__db_op_break_moved_away): ... this.

* subversion/libsvn_wc/wc_db_private.h

(svn_wc__db_op_break_move_internal): Rename argument.

(svn_wc__db_op_mark_resolved_internal): Rename argument.

* subversion/libsvn_wc/wc_db_update_move.c

(find_src_op_depth): Return a more generic error, as this function

is used in more places than inside the conflict resolver.

(get_tc_info): Remove function.

(fetch_conflict_details): New function, partially based on get_tc_info.

(svn_wc__db_op_raise_moved_away_internal): Update argument. Fetch true

delete depth for created conflicts.

(svn_wc__db_resolve_delete_raise_moved_away): Rename to...

(svn_wc__db_op_raise_moved_away): ... this. Use SVN_WC__DB_WITH_TXN4()

to obtain everything inside a transaction. Mark conflict resolved

before installing new tree conflicts.

(break_moved_away_children): Rename to...

(break_moved_away): ... this and handle both cases in a single function.

(svn_wc__db_resolve_break_moved_away): Rename to...

(svn_wc__db_op_break_moved_away): ... this. Update caller. Use

SVN_WC__DB_WITH_TXN4() to calculate values inside txn.

* subversion/tests/libsvn_wc/op-depth-test.c

(FILE_EXTERNAL): New macro.

(print_row): Handle a few more cases with C compatible output.

(del4_update_edit_AAA,

move4_update_delself_AAA): Update expected results.

  1. … 7 more files in changeset.
Allow depth limited reverts of nodes that only have not-present and/or

excluded child nodes.

* subversion/libsvn_wc/wc-queries.sql

(STMT_SELECT_GE_OP_DEPTH_CHILDREN): Check for present children.

Make 'svn info' return its WC results in a stable order, by making

the db funtion that returns these paths provide an array instead

of an hash. Info is the only function using this db operation.

Found by: brane

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_read_single_info): Add name.

(svn_wc__db_read_children_walker_info): Change return type.

* subversion/libsvn_wc/wc_db.c

(svn_wc__db_read_children_walker_info): Create array instead of hash.

Add name to item.

* subversion/libsvn_wc/wc-queries.sql

(STMT_SELECT_NODE_CHILDREN_WALKER_INFO): Request stable ordering,

which we get by default (as that is how the parent index works).

* subversion/libsvn_wc/node.c

[(includes): Accidentally add svn_nodes_private.h Reverted in r1662033.]

(walker_helper): Update caller.

  1. … 3 more files in changeset.
Fix the move state corruption problem found during the recent wc-db

work, where an incoming delete was turned into a copy, but some moves

that can't be represented after making a copy were only half broken.

* subversion/libsvn_wc/wc-queries.sql

(STMT_SELECT_MOVED_DESCENDANTS_SHD,

STMT_SELECT_MOVED_DESCENDANTS_SRC): Also scan the node itself for moves.

* subversion/libsvn_wc/wc_db.c

(db_move_moved_to): New function. Similar to the old make_copy_move_moved_to.

(db_move_moved_to_down_recursive): New function.

Extracted from svn_wc__db_op_make_copy_internal.

(make_copy_txn): Introduce not present nodes after recursing, to avoid making

the move information invalid. Move moves to the original shadowing layer

if we can't represent them in WORKING. Update caller.

(svn_wc__db_op_make_copy_internal): Update caller.

* subversion/tests/libsvn_wc/op-depth-test.c

(verify_db_callback,

verify_db): New function.

(make_copy_mixed,

make_copy_and_delete_mixed): Call verify_db to fail on

invalid db state.

(test_list): Remove XFail marker from make_copy_and_delete_mixed.

  1. … 2 more files in changeset.
Consolidate all places in libsvn_wc where we 'determine if a tree has

modifications', because all of them had similar shortcomings where

they missed certain kinds of changes.

This consolidates the svnversion, crop and update checks for

modifications to a single function that handles all cases.

* subversion/include/private/svn_wc_private.h

(svn_wc__has_local_mods): Add ignore_unversioned argument.

* subversion/libsvn_client/copy.c

(pin_externals_prop): Update caller.

* subversion/libsvn_client/merge.c

(ensure_wc_is_suitable_merge_target): Update caller.

* subversion/libsvn_wc/crop.c

(modcheck_baton_t): Remove struct.

(modcheck_callback,

allow_crop): Remove function.

* subversion/libsvn_wc/questions.c

(modcheck_baton_t,

modcheck_callback): Move here from update_editor.c.

Support ignore_unversioned.

(svn_wc__node_has_local_mods): Move here. Perform db changes check first.

(svn_wc__has_local_mods): Use svn_wc__node_has_local_mods.

* subversion/libsvn_wc/revision_status.c

(svn_wc_revision_status2): Update caller.

* subversion/libsvn_wc/update_editor.c

(modcheck_baton_t,

modcheck_callback,

svn_wc__node_has_local_mods): Move to questions.c.

(check_tree_conflict): Update caller.

* subversion/libsvn_wc/wc-queries.sql

(STMT_SELECT_BASE_FILES_RECURSIVE): Remove statement.

* subversion/libsvn_wc/wc.h

(svn_wc__node_has_local_mods): Add argument.

* subversion/libsvn_wc/wc_db.c

(has_local_mods): Rename to...

(has_db_mods): ... and leave walking the working copy to the status walker.

(svn_wc__db_has_local_mods): Rename to...

(svn_wc__db_has_db_mods): ... this.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_revision_status): Remove cancel callbacks. Update documentation.

* subversion/libsvn_wc/wc_db_update_move.c

(tc_editor_delete): Update caller.

  1. … 11 more files in changeset.
* subversion/libsvn_wc/wc-queries.sql

(STMT_SELECT_BASE_PRESENT): Following up on r1661591, remove unused query.

Make svn update --set-depth <something-limiting> properly avoid removing

local changes, instead of leaving just some items as unversioned, following

the same handling as we do with updates.

It already handled some changes of the root properly, but in most cases

it could be as destructive as as 'svn revert -R TARGET'

In the background this makes the crop/exclude operation the BASE operation

that it should have been using from the start.

* subversion/libsvn_wc/crop.c

(crop_children): Only try to remove BASE nodes affected by the depth

filter. Don't remove nodes that are changed/shadowed.

* subversion/libsvn_wc/wc-queries.sql

(STMT_UPDATE_NODE_BASE_DEPTH): Only store depth when presence specifies

there is an actual directory (to make the wc-db function fail if it

isn't).

* subversion/tests/cmdline/depth_tests.py

(fold_tree_with_unversioned_modified_items): Update expected results.

  1. … 2 more files in changeset.
Avoid a db query per childnode when walking children during merge calculations

by performing the 'hidden' filtering inside sqlite on a common operation.

* subversion/include/private/svn_wc_private.h

(svn_wc__node_get_children_of_working_node): Remove show_hidden argument as

non of the callers really wanted all nodes, including hidden.

(svn_wc__node_get_not_present_children): New function, for commit processing.

* subversion/libsvn_client/commit_util.c

(harvest_not_present_for_copy): Fetch just the not-present children. commit_relpath

is always set in copy mode, so no need to check.

* subversion/libsvn_client/merge.c

(insert_parent_and_sibs_of_sw_absent_del_subtree,

get_mergeinfo_paths): Ignore base-children when shadowed (as expected during merge

and to gain a performance bump)

* subversion/libsvn_wc/node.c

(svn_wc__node_get_children_of_working_node): Remove argument. Update caller.

(svn_wc__node_get_not_present_children): New function.

* subversion/libsvn_wc/wc-queries.sql

(STMT_SELECT_WORKING_CHILDREN): Select only existing children.

(STMT_SELECT_BASE_NOT_PRESENT_CHILDREN): New query.

* subversion/libsvn_wc/wc_db.c

(svn_wc__db_base_read_not_present_children): New function.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_base_read_not_present_children): New function.

* subversion/tests/libsvn_wc/op-depth-test.c

(test_children_of_replaced_dir): Update test.

  1. … 7 more files in changeset.
Following up on r1661143, use even more free sqlite power:

ask sqlite to provide sorted and unique results for the children

queries that could provide multiple results.

Sqlite can do this for +- free, because all of that is stored

in the index it should use.

(The wc-queries test would provide an error if it used

intermediate storage for its calculations)

Verified with Sqlite 3.7, 3.8 (and by our wc-queries tests)

* subversion/libsvn_wc/wc-queries.sql

(STMT_SELECT_NODE_CHILDREN,

STMT_SELECT_WORKING_CHILDREN): Add DISTINCT and ORDER BY, to

guarantee stable results.

* subversion/libsvn_wc/wc_db.c

(gather_children): Remove now unneeded duplicate filtering.

  1. … 1 more file in changeset.
Make sure a depth limited commit that touches a move, but doesn't

commit it doesn't break move recording by moving some parts into

BASE (creating invalid state) and discarding other parts.

* subversion/libsvn_wc/wc-queries.sql

(STMT_COMMIT_DESCENDANTS_TO_BASE): Clear moved_to information.

* subversion/libsvn_wc/wc_db.c

(moved_descendant_collect): New function extracted from...

(moved_descendant_commit): ... this. Update recursive call.

(commit_node): Collect moves that are about to be removed,

and properly remove their recording if necessary.

Stop removing locks recursively, let libsvn_client handle

this properly.

* subversion/tests/libsvn_wc/op-depth-test.c

(commit_moved_away_descendant): Extend test to verify for

bad recording that previously occurred.

  1. … 2 more files in changeset.
Bring the wc-db tests in the world where we store moves in WORKING, and

fix the db query that allowed this test to survive so long.

* subversion/libsvn_wc/wc-queries.sql

(STMT_SELECT_DELETION_INFO): Rewrite as join to allow access to more

columns. Add moved_to result.

(STMT_SELECT_DELETION_INFO_SCAN): Remove known bad statement.

* subversion/libsvn_wc/wc_db.c

(scan_deletion_txn): Always use STMT_SELECT_DELETION_INFO.

* subversion/tests/libsvn_wc/db-test.c

(TESTING_DATA): Stop storing moves in the pre 1.8.x locations,

move them to WORKING instead.

  1. … 2 more files in changeset.
Fix svn_wc__db_op_make_copy_internal()'s handling of mixed revision BASE trees.

This fixes some issues around tree conflict handling, and improves

database consistency.

* build/transform_sql.py

(process_file): Allow passing columns and binding variables as argument of

IS_STRICT_DESCENDANT_OF, like the other macros.

* subversion/libsvn_wc/wc-checks.sql

(STMT_STATIC_VERIFY): Add documentation to the older statements. Extend.

* subversion/libsvn_wc/wc-queries.sql

(STMT_DELETE_WORKING_BASE_DELETE): Split into non-recursive...

(STMT_DELETE_WORKING_BASE_DELETE_RECURSIVE): ... and recursive variants.

(STMT_INSERT_WORKING_NODE_FROM_BASE_COPY): Allow replacing nodes, and

handle moved_to when doing that.

* subversion/libsvn_wc/wc_db.c

(db_base_remove): Update caller.

(make_copy_txn): Add recursion arguments to determine when a new op-depth

is needed. Simplify code, by moving the initial shadowing to the calling

function.

(make_copy_move_moved_to): New function.

(svn_wc__db_op_make_copy_internal): Update caller. Shadow all nodes with

base-deleted before calling make_copy_txn. Move moved-to information

to this layer.

* subversion/tests/cmdline/tree_conflict_tests.py

(update_delete_mixed_rev): Remove XFail. Tweak status value.

* subversion/tests/libsvn_wc/op-depth-test.c

(make_copy_mixed): New function. Tests svn_wc__db_op_make_copy_internal.

make_copy_and_delete_mixed): New functions. Tests svn_wc__db_base_remove

and shows an existing issue with move handling on base-delete.

(test_list): Add new items.

  1. … 5 more files in changeset.
Stop creating empty ACTUAL_NODE records for directories when using

'svn changelist --depth infinty new WC'

* subversion/libsvn_wc/wc-queries.sql

(STMT_INSERT_ACTUAL_EMPTIES_FILES): New query.

(STMT_DELETE_ACTUAL_EMPTIES): Also try delete node itself.

* subversion/libsvn_wc/wc_db.c

(set_changelist_txn): Use STMT_INSERT_ACTUAL_EMPTIES_FILES to

avoid creating unneeded records.

* subversion/svn/changelist-cmd.c

(svn_cl__changelist): Remove long outdated comment. This bad

pattern was fixed a long time ago.

* subversion/tests/libsvn_wc/wc-queries-test.c

(slow_statements): Add STMT_INSERT_ACTUAL_EMPTIES_FILES.

(parse_explanation_item): Handle new output style in recent Sqlite versions.

  1. … 3 more files in changeset.
On move-update layer copying remove ACTUAL nodes for nodes that no longer

exist and are not delete-delete conflicted.

While not really a bug, leaving dangling ACTUAL records creates nonstandard

database states and therefore may trigger untested code paths.

(You might see this as changelists or property changes on newly added

files/directories)

* subversion/libsvn_wc/wc-queries.sql

(STMT_CLEAR_ACTUAL_NODE_LEAVING_CONFLICT): New statement.

* subversion/libsvn_wc/wc_db.c

(clear_or_remove_actual): New function.

(svn_wc__db_op_copy_layer_internal): Call clear_or_remove_actual on

removed nodes. Remove TODO comment.

* subversion/tests/libsvn_wc/op-depth-test.c

(move_update_delete_mods,

move4_update_delself_AAA): Extend expectations to make it easier

to spot problems.

  1. … 2 more files in changeset.
Following up on r1659509, extend the whitespace cleanup script to include

.sql and .sh files

* tools/dev/remove-trailing-whitespace.sh

Update script.

* autogen.sh

* subversion/libsvn_wc/wc-metadata.sql

* subversion/libsvn_wc/wc-queries.sql

* subversion/tests/cmdline/dav-mirror-autocheck.sh

* subversion/tests/cmdline/davautocheck.sh

* subversion/tests/cmdline/lock_tests.py

* tools/buildbot/slaves/i686-debian-sarge1/svnlog.sh

* tools/buildbot/slaves/svn-x64-centos/svnbuild.sh

* tools/buildbot/slaves/svn-x64-centos/svnlog.sh

* tools/buildbot/slaves/svn-x64-macosx-gnu-shared/svnlog.sh

* tools/buildbot/slaves/svn-x64-macosx-gnu-shared-daily-ra_serf/svnlog.sh

* tools/buildbot/slaves/ubuntu-x64/svnlog.sh

* tools/client-side/svn-ssl-fingerprints.sh

* tools/dev/benchmarks/large_dirs/create_bigdir.sh

* tools/dist/dist.sh

* tools/dist/nightly.sh

* tools/hook-scripts/mailer/tests/mailer-init.sh

* tools/po/po-update.sh

Apply whitespace cleanup.

  1. … 18 more files in changeset.
* subversion/libsvn_wc/wc-queries.sql

(STMT_COPY_NODE_MOVE): Keep recorded size and timestamp unless checksum

changes. The file merge code (on prop and text changes) should handle

all cases, but comparing checksum (again) here is a cheap safety net.

Resolve an old TODO from one of the op-depth bump helper functions:

Cleanup some test code.

* subversion/libsvn_wc/wc-queries.sql

(STMT_SELECT_LAYER_FOR_REPLACE): Remove unused inner query.

* subversion/libsvn_wc/wc_db.c

(db_extend_parent_delete): Remove unused diagnostics argument.

(insert_base_node): Update caller.

(svn_wc__db_op_copy_layer_internal): Use a simple check to see

when a parent delete might need extension.

  1. … 1 more file in changeset.