Checkout Tools
  • last updated 4 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates

Changeset 1710167 is being indexed.

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.
Make the (non recursive) revert db operation properly report tree conflicts

that it creates by both fixing what is stored in the tree conflict and by

properly creating notifications.

Note that a recursive revert wouldn't encounter this problem as it

would just break the moves.

* subversion/libsvn_wc/token-map.h

(kind_map): New array.

* subversion/libsvn_wc/wc-queries.sql

(STMT_CREATE_REVERT_LIST): Only add interesting rows.

(STMT_SELECT_REVERT_LIST_RECURSIVE): Make the revert information available

instead of just the name.

(STMT_CREATE_UPDATE_MOVE_LIST): Store kind as token like in other places,

to allow transforming to revert information.

(STMT_MOVE_NOTIFY_TO_REVERT): New statement.

* subversion/libsvn_wc/wc_db.c

(op_revert_txn): Only bump moved nodes after they have been moved to the

final op-depth. Transform move_update information into revert information.

(revert_list_read): Simplify, since we can now assume only normal reverts

are in the list.

(svn_wc__db_revert_list_notify): Handle new tree conflict notifications and

pass kind when available.

* subversion/libsvn_wc/wc_db_private.h

(svn_wc__db_op_raise_moved_away_internal): New function.

* subversion/libsvn_wc/wc_db_update_move.c

(update_move_list_add): Set kind as token instead of as integer.

(svn_wc__db_update_move_list_notify): Read kind as token.

(resolve_delete_raise_moved_away): Rename to...

(svn_wc__db_op_raise_moved_away_internal): ... this. Make public and add

delete_op_depth argument, to allow bumping from a higher root node.

(break_moved_away_children): Use existing kind column to improve

notifications.

* subversion/tests/cmdline/move_tests.py

(revert_del_root_of_move): New function.

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

(move_in_delete): Remove ### comment.

(test_funcs): Remove XFail marker from move_in_delete.

  1. … 6 more files in changeset.
Improve depth correctness during tree conflict resolving a bit more by

requiring that the proper op-depth of the nodes is passed around instead

of some 'good enough depth'. This made some buggy corner cases around not-

present nodes visible, which are now also fixed.

* subversion/libsvn_wc/wc-queries.sql

(STMT_SELECT_DEPTH_NODE): Add moved fields. Remove nonsensical field.

(STMT_SELECT_OP_DEPTH_CHILDREN): Request strict ordering via existing index.

(STMT_SELECT_OP_DEPTH_CHILDREN_EXISTS): New query with presence filter.

(STMT_SELECT_OP_DEPTH_MOVED_TO): Require that the node actually exists

or it wouldn't be a move.

* subversion/libsvn_wc/wc_db.c

(svn_wc__db_get_children_op_depth): Remove function.

(svn_wc__db_depth_get_info): Update column index.

(svn_wc__db_op_depth_moved_to): Redefine function as...

(svn_wc__db_scan_moved_to_internal): ... this, with stricter op-depth

definition.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_base_moved_to): Tweak documentation.

* subversion/libsvn_wc/wc_db_private.h

(svn_wc__db_get_children_op_depth): Remove function.

(svn_wc__db_op_depth_moved_to): Rename to...

(svn_wc__db_scan_moved_to_internal): ... this and update docs.

* subversion/libsvn_wc/wc_db_update_move.c

(find_src_op_depth): New function.

(mark_tc_on_op_root): If there is no old kind, there can't be

a replacement.

(tc_editor_delete): Pass new kind to improve tree conflict.

(get_info): Directly use db query to get items pre-sorted without

copying twice, and to avoid not-present node bugs.

(drive_tree_conflict_editor): Remove unused arguments. Move check

to caller.

(update_moved_away_conflict_victim): Use scan_moved_to after obtaining

the source op-depth. Move assertion here. Update caller.

(svn_wc__db_bump_moved_away): Update caller.

(break_moved_away): Obtain proper depth instead of passing some

good enough depth.

  1. … 4 more files in changeset.
Fix yet another case where we corrupted the move tracking information during

conflict resolving. When breaking a move it was possible that moved_here

was reset, but moved_to kept.

As part of this fix I made two database statements more similar.

* subversion/libsvn_wc/wc-queries.sql

(STMT_SELECT_OP_DEPTH_MOVED_PAIR): Rename to...

(STMT_SELECT_MOVED_DESCENDANTS_SHD): and rename some aliases.

(STMT_SELECT_MOVED_DESCENDANTS): Rename to...

(STMT_SELECT_MOVED_DESCENDANTS_SRC): and update query layout and result

columns.

* subversion/libsvn_wc/wc_db.c

(op_revert_txn): Update caller to avoid db query that might fail to

obtain information we already have.

(moved_descendant_commit): Update statement usage.

* subversion/libsvn_wc/wc_db_private.h

(svn_wc__db_resolve_break_moved_away_internal): Remove function.

(svn_wc__db_op_break_move_internal): New function.

* subversion/libsvn_wc/wc_db_update_move.c

(resolve_delete_raise_moved_away): Update query usage.

(break_move): Rename to...

(svn_wc__db_op_break_move_internal): ... this and verify if the move

source actually exists (which in some cases it didn't)

(svn_wc__db_resolve_break_moved_away_internal): Rename to...

(break_moved_away): ... this. Update caller.

(break_moved_away_children_internal): Rename to...

(break_moved_away_children): ... this. Update statement usage.

The original code read a non existing op-depth column and as

such always got op-depth 0.

(svn_wc__db_resolve_break_moved_away,

svn_wc__db_resolve_break_moved_away_children): Update caller.

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

(del4_update_edit_AAA): Extend test. The original version had an

assumption on the bug, but masked the real problem because it

only tested the move source.

  1. … 4 more files in changeset.
Instead of transforming nodes into an copy by changing their op-depth make

a proper copy, to allow the layer bump code to handle further edge cases

like things that are recorded while shadowing.

* subversion/libsvn_wc/wc-queries.sql

(STMT_UPDATE_OP_DEPTH_RECURSIVE): Remove query.

(STMT_COPY_OP_DEPTH_RECURSIVE): New query.

* subversion/libsvn_wc/wc_db.c

(make_copy_txn): Remove two unused arguments and their handling.

Move the flush, conflict and work item code to caller.

(svn_wc__db_op_make_copy_internal): New function, containing some

bits from make_copy_txn() and some from svn_wc__db_op_make_copy(),

running inside a transaction. Allow handling the other valid make-copy

case.

(svn_wc__db_op_make_copy): Call svn_wc__db_op_make_copy_internal to

do several queries inside a transaction.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_op_make_copy): Extend documentation.

* subversion/libsvn_wc/wc_db_private.h

(svn_wc__db_op_make_copy_internal): New function.

* subversion/libsvn_wc/wc_db_update_move.c

(tc_editor_delete): Use svn_wc__db_op_make_copy_internal() to make

the copy.

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

(STMT_SELECT_OP_DEPTH_MOVED_PAIR): The op-depth we want to use is the

same for all records, so only query it once.