Checkout Tools
  • last updated 5 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Fix a comment. No functional changes.

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

(test_query_expectations): Minor fix in a comment: too -> to.

Update Sqlite query parsing code in wc-queries-test to handle some new

intermediate explanation lines without warnings.

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

(explanation_item): Add some booleans.

(parse_explanation_item): Allow a few more constructs that caused

unneeded warnings.

Follow-up to r1853580: Fix test fallout.

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

(slow_statements): Add STMT_SELECT_COPIES_OF_REPOS_RELPATH here.

Fix issue #4804: avoid test failures just because some SQLite compile-time

feature was enabled that changes its query plan descriptions.

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

(test_query_expectations): Mostly ignore the sqlite_master table.

Found by: Thomas Deutschmann

Follow-up to r1836409: Fix test fallout.

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

(slow_statements): Add the new query added in r1836409.

Record the move target path in a moved-away tree conflict skel.

Updates can modify the NODES table in ways which discard local move

information about tree conflict victims. One example is:

echo foo >> epsilon/foo.txt

svn mv epsilon alpha

svn ci # create r2

svn up -r1

svn mv epsilon beta

svn up -r2

When 'epsilon' is updated to r2, a tree conflict is raised and the move

'epsilon' -> 'beta' is deleted from the NODES table. 'beta' remains a copy.

$ svn status

A + beta

! C epsilon

> local dir moved away, incoming dir delete or move upon update

$

The conflict skel for the tree conflict on 'epsilon' now contains:

(tree () moved-away deleted epsilon)

This leaves the resolver with insufficient information about the local

move 'epsilon' -> 'beta' which existed before the update. To resolve this

conflict we must be able to identify the copy 'beta' as one potential move

target. The fact that copyfrom on 'beta' points to 'epsilon' is insufficient

because, in the general case, this copy could have occurred independently

of the tree conflict.

As of this commit, the tree conflict skel also records a move destination

path, 'beta' in our example:

(tree () moved-away deleted epsilon beta)

Apart from recording the path in the skel, this commit introduces no other

visible change in behaviour. In the future, the conflict resolver will be

able to make use of this new information to correlate the copy 'beta' with

the conflict victim 'epsilon' in the above example.

Note that old clients will simply ignore the new extra element at the end

of the conflict skel.

* subversion/libsvn_wc/conflicts.c

(svn_wc__conflict_skel_add_tree_conflict): Add move_dst_op_root_abspath

parameter and append it to the skel if it is non-NULL.

(svn_wc__conflict_read_tree_conflict): Return the move_dst_op_root_abspath

if present in the conflict skel.

(read_tree_conflict_desc, resolve_tree_conflict_on_node,

svn_wc__conflict_tree_update_break_moved_away,

svn_wc__conflict_tree_update_incoming_move,

svn_wc__conflict_tree_update_local_add): Update callers.

* subversion/libsvn_wc/conflicts.h

(svn_wc__conflict_skel_add_tree_conflict,

svn_wc__conflict_read_tree_conflict): Update declaration and docstring.

* subversion/libsvn_wc/questions.c

(internal_conflicted_p): Update caller.

* subversion/libsvn_wc/tree_conflicts.c

(svn_wc__add_tree_conflict): Update caller.

* subversion/libsvn_wc/update_editor.c

(open_root, check_tree_conflict, add_directory, open_directory,

add_file, open_file, change_file_prop): Update callers.

* subversion/libsvn_wc/upgrade.c

(svn_wc__upgrade_conflict_skel_from_raw): Update caller.

* subversion/libsvn_wc/wc_db.c

(revert_maybe_raise_moved_away): Update caller.

* subversion/libsvn_wc/wc_db_update_move.c

(create_tree_conflict, fetch_conflict_details): Update callers.

* subversion/tests/libsvn_wc/conflict-data-test.c

(test_serialize_tree_conflict): Update test expectations.

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

(check_db_conflicts): Update caller.

  1. … 8 more files in changeset.
Bump calls to svn_wc_revert5() to svn_wc_revert6() following r1822534.

* subversion/libsvn_client/conflicts.c

(resolve_incoming_move_dir_merge): Bump.

* subversion/tests/libsvn_wc/utils.c

(sbox_wc_revert): Bump.

  1. … 1 more file in changeset.
Following up on r1807584, remove unnecessary SQL statements from

the WC schema definition and simplify a step in the upgrade process.

* subversion/libsvn_wc/wc-metadata.sql

(STMT_CREATE_NODES): Remove and include into STMT_CREATE_SCHEMA.

(STMT_CREATE_NODES_TRIGGERS): Likewise.

(STMT_CREATE_EXTERNALS): Likewise.

(STMT_UPGRADE_TO_31_ALTER_TABLE, STMT_UPGRADE_TO_31_FINALIZE):

Combine these statements into a single ...

(STMT_UPGRADE_TO_31): ... which is new.

(STMT_UPGRADE_TO_32): Remove as unused.

(-- format: YYY): Remove as unused, it converted to a comment anyway.

* subversion/libsvn_wc/wc_db.c

(init_db): Remove use of deleted SQL statements.

* subversion/libsvn_wc/upgrade.c

(bump_to_31): Remove the manual check for the existence of the

NODES.inherited_props column since we no longer support the

unreleased formats prior to format 20 that did not have

a NODES table.

* subversion/tests/libsvn_wc/utils.c

(svn_test__create_fake_wc): Remove use of deleted SQL statements.

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

(schema_statements): Remove use of deleted SQL statements.

  1. … 3 more files in changeset.
Add basic tests for svn_wc__internal_file_modified_p() function.

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

(test_internal_file_modified): New.

(test_funcs): Add test_internal_file_modified to the list.

Apply the 'incoming add ignore' conflict resolver option to update and switch,

and add a regression test for the update case.

It is currently impossible to create an add vs add update tree conflict with

the 'svn' command line client because it sets 'adds_as_modifications' to TRUE

when calling svn_client_update(). The new test relies on the fact that the test

suite sets it to FALSE instead.

* subversion/include/svn_client.h

(svn_client_conflict_option_merge_incoming_add_ignore): Rename to ...

(svn_client_conflict_option_incoming_add_ignore): ... this, because the option

does not only apply to merge anymore.

* subversion/libsvn_client/conflicts.c

(resolve_merge_incoming_add_ignore): Rename to ...

(resolve_incoming_add_ignore): ... this.

(configure_option_merge_incoming_add_ignore): Track renames. Allow this option

for update and switch, too.

* subversion/svn/conflict-callbacks.c

(builtin_resolver_options): Track renames.

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

(test_option_merge_incoming_added_file_ignore,

test_option_merge_incoming_added_dir_ignore): Track renames.

(create_wc_with_file_add_vs_file_add_update_conflict): New helper function.

(test_option_update_incoming_added_file_ignore): New test.

(test_funcs): Adjust a docstring and add new test.

* subversion/tests/libsvn_wc/utils.c

(sbox_wc_update_depth): Add a comment pointing out the dependency of the

newly added test on this function passing FALSE for adds_as_modifications.

  1. … 4 more files in changeset.
* subversion/tests/libsvn_wc/wc-queries-test.c

(slow_statements): Add STMT_FIND_REPOS_PATH_IN_WC here. It does a full

table scan, but isn't in a hot code path. Should make wc-queries-test

test 3 pass again.

Mark 2 tests that depend on directory moves containing file externals as

XFail to fix the build until a proper solution is found.

* subversion/tests/cmdline/externals_tests.py

(move_with_file_externals): Mark XFail.

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

(test_list): Mark move_delete_file_externals XFail.

  1. … 1 more file in changeset.
Fix compiler warning about empty while statement body.

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

(SQLITE_ERR): Add the missing 'do' keyword.

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

(revert_file_externals): Extend with another update.

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

(test_funcs): Make test description unique.

Optimize STMT_SELECT_EXTERNALS_DEFINED when using Sqlite 3.8.9, by

adding two more rows to the sqlite_stat1 table.

This fixes a test failure in wc-queries-test.c, but actual users most

likely don't notice a difference as a tablescan on an EXTERNALS tables

index is not that expensive, given that most working copies don't have

many externals.

* subversion/libsvn_wc/wc-metadata.sql

(STMT_INSTALL_SCHEMA_STATISTICS): Add two rows.

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

(test_schema_statistics): Add a dummy externals row to allow

verifying schema.

  1. … 1 more file in changeset.
When obtaining conflicts from wc-db, also allow directly obtaining properties.

We already read from the records that have the data, so this doesn't have a

real cost, while reading them separately (introduced in r1667228) does.

The final result after the combination of these patches is that we provide

better information using less database transactions, so this provides an

overall performance improvement.

This patch also makes the resolver avoid creating temporary files during

resolves where the code already knows that nobody is using these files,

because there is no resolver callback.

* subversion/libsvn_wc/conflicts.c

(read_prop_conflict_descs): Stop abusing no tempfile flag for not showing

details. Only read base properties if we don't already have them.

(svn_wc__read_conflicts): Allow obtaining skel in one step, and not reading

not-tree conflicts.

(resolve_tree_conflict_on_node,

svn_wc__mark_resolved_text_conflict,

svn_wc__mark_resolved_prop_conflicts): Update caller.

(conflict_status_walker): Use one db operation instead of two.

* subversion/libsvn_wc/copy.c

(copy_versioned_file,

remove_node_conflict_markers): Update caller.

* subversion/libsvn_wc/delete.c

(create_delete_wq_items): Update caller.

* subversion/libsvn_wc/entries.c

(read_one_entry): Update caller.

* subversion/libsvn_wc/info.c

(build_info_for_node): Update caller.

(svn_wc__get_info): Update caller.

* subversion/libsvn_wc/props.c

(svn_wc__create_prejfile): Update caller.

* subversion/libsvn_wc/questions.c

(internal_conflicted_p): Update caller.

* subversion/libsvn_wc/tree_conflicts.c

(svn_wc__get_tree_conflict): Update caller.

* subversion/libsvn_wc/wc.h

(svn_wc__read_conflicts): Add two arguments.

* subversion/libsvn_wc/wc_db.c

(op_revert_txn): Update caller.

(svn_wc__db_read_conflict,

svn_wc__db_read_conflict_internal): Handle properties.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_read_conflict): Add optional properties argument.

* subversion/libsvn_wc/wc_db_private.h

(svn_wc__db_read_conflict_internal): Add optional properties argument.

* subversion/libsvn_wc/wc_db_update_move.c

(create_tree_conflict,

bump_moved_layer,

svn_wc__db_op_raise_moved_away): Update caller.

* subversion/libsvn_wc/workqueue.c

(run_prej_install,

run_set_text_conflict_markers,

run_set_property_conflict_marker): Update caller.

* subversion/tests/libsvn_wc/conflict-data-test.c

(test_prop_conflict_resolving,

test_binary_file_conflict): Update caller.

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

(check_db_conflicts): Update caller.

  1. … 14 more files in changeset.
* subversion/tests/libsvn_wc/conflict-data-test.c

(test_binary_file_conflict): Ensure that file size changes when

the binary file is changed. Makes sleep for timestamp unnecessary.

Suggested by: rhuijben

Fix text conflict description for binary files.

The is_binary flag in conflict description was set to zero even

for binary files. As a result, 'svn resolve' offered 'mine-conflict'

and 'theirs-conflict' options which don't make any sense for binaries.

Add a regression test to catch this problem in the future.

* subversion/libsvn_wc/conflicts.c

(read_text_conflict_desc): Drop is_binary paramter. Use the mime type to

detemine whether the conflicted file is binary.

(svn_wc__conflict_invoke_resolver): Stop passing FALSE for is_binary.

Let read_text_conflict_desc figure it out based on the mime type.

(svn_wc__read_conflicts): Read WORKING properties for text-conflicted files

and pass the mime type to read_text_conflict_desc().

* subversion/tests/libsvn_wc/conflict-data-test.c

(test_binary_file_conflict, test_funcs): New test.

  1. … 1 more file in changeset.
Add another regression test for the commit problem fixed in r1663991.

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

(test_global_commit_switched): New test.

(test_list): Add test_global_commit_switched.

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.
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.
Following up on r1663338, enable resolving individual property conflicts

via svn_wc__resolve_conflicts(). This allows accessing a feature that was

already available when passing a callback, but not directly.

Use this to add a regression test for the problems fixed in r1663338.

* subversion/libsvn_wc/conflicts.c

(svn_wc__resolve_conflicts): Remove limitation.

* subversion/tests/libsvn_wc/conflict-data-test.c

(test_prop_conflict_resolving): New function

(test_list): Add test_prop_conflict_resolving.

* subversion/tests/libsvn_wc/utils.c

(sbox_wc_resolve_prop): New function.

* subversion/tests/libsvn_wc/utils.h

(sbox_wc_resolve_prop): New function.

  1. … 1 more file in changeset.
Following up on r1662412, add test assertion.

* subversion/tests/libsvn_wc/entries-compat.c

(test_stubs): Add another assertion, this time validating that

the non stub is really from the subdir.

Fix the most acute problems in the regression in the entries compatibility

code that made it impossible to read the 'parent stubs' of nodes when there

is an obstructing working copy. This fixes the status/entry run in the

revert test that didn't work with entries, and a case in the entries

compatibility tests that only happened to work, just because the child

directory was similar to what was recorded in the ancestor.

This makes entries.c include the private wc_db api, which is ugly.

But I think it is a better solution than using sqlite directly,

and hardcoding wc_id 1 as we did before.

There are still a few remaining cases where we read info from the

obstructing working copy, but these don't affect the creation

of the stub fields.

* subversion/libsvn_wc/entries.c

(SVN_WC__I_AM_WC_DB): Define.

(includes): Add wc_db_private.h

(get_info_for_deleted,

read_one_entry): Add wcroot, relpath arguments as alternate

for the still passed db, abspath. Use wc_db internal

functions where available to be able to read below obstruction

when reading from the parent dir.

(read_entries_new): Pass wcroot, dir_relpath.

(read_entry_pair): Rename to...

(read_entry_pair_txn): ... this and pass wcroot, dir_relpath.

(read_entry_pair): New wrapper function. Obtaining wcroot and lock.

(read_entries): Rename wcroot_* arguments to dir_* as wcroot isn't

the right name in wc-ng. Obtain wcroot instance and use wc_db lock

around call.

(svn_wc__entries_read_internal): Remove sqlite level lock, as read

entries obtains a better lock itself.

* subversion/libsvn_wc/wc_db.c

(scan_deletion_txn): Rename to..

(scan_deletion): ... this.

(svn_wc__db_scan_deletion_internal): New function.

(svn_wc__db_scan_deletion): Update caller.

(get_info_for_copy,

db_read_repos_info,

relocate_txn): Update caller.

(svn_wc__db_scan_addition_internal): New function.

* subversion/libsvn_wc/wc_db_private.h

(svn_wc__db_scan_addition_internal,

svn_wc__db_scan_deletion_internal): New function.

* subversion/tests/cmdline/revert_tests.py

(revert_obstructing_wc): Expect status to work normally.

* subversion/tests/libsvn_wc/entries-compat.c

(test_stubs): Add assertion that would have failed before this patch.

  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.
Dedicate a new op-depth 100 test to svn_wc__db_global_commit and

testing its move breaking skills.

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

(STMT_INSERT_NODE): Add a few columns.

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

(insert_dirs): Support setting move info and properties.

(test_global_commit): New function/test.

(test_list): Add test_global_commit.

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.
* subversion/tests/libsvn_wc/op-depth-test.c

(incomplete_switch): Remove local unversioned directory that affects

testcase after r1661664 fixed unversioned detections.

Make svn_wc__db_base_delete() take a single argument to specify that you

either want to keep the working copy the same (by copying to WORKING

if necessary), or want to remove everything.

This removes some of the calculation logic from the callers and as

such causes some behavior changes that need further tweaks. The current

behavior already fixes a few bugs, but I'm not entirely sure why this

has so much effect on the conflict resolver without changing the

NODES layout, nor the conflict skels.

* subversion/libsvn_wc/crop.c

(crop_children,

svn_wc_exclude): Update caller.

* subversion/libsvn_wc/externals.c

(svn_wc__external_remove): Update caller.

* subversion/libsvn_wc/update_editor.c

(delete_entry): Simplify calculations that can be done in the

db layer.

(close_edit): Update caller.

* subversion/libsvn_wc/wc_db.c

(db_base_remove): Calculate what must be done on a single argument.

Always process moves, not only when somebody installs a new conflict.

Remove a bit of double work.

(svn_wc__db_base_remove): Update caller.

(svn_wc__db_op_make_copy_internal): Make moving the moves to the direct

delete of BASE optional in the internal api.

(svn_wc__db_op_make_copy): Update caller.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_base_remove): Update prototype and docs.

* subversion/libsvn_wc/wc_db_private.h

(svn_wc__db_op_make_copy_internal): Add argument.

* subversion/libsvn_wc/wc_db_update_move.c

(tc_editor_delete): Update caller.

* subversion/libsvn_wc/workqueue.c

(run_base_remove): Update caller.

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

(base_dir_insert_remove): Update caller.

(move_away_delete_update): Assume still moved.

(move_retract): Update assumptions.

(move_update_parent_replace): Assume still moved.

(make_copy_and_delete_mixed): Update caller. Assume one move fixed.

(test_funcs): Mark some more functions XFail that can't be resolved

by the existing conflict resolver setting.

  1. … 8 more files in changeset.