subversion

Checkout Tools
  • last updated 1 hour ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates

Changeset 1357950 is being indexed.

Following up on r1357929, also add conflict and work_items to

svn_wc__db_op_delete(). This allows reinstalling the tree_conflict

again in the update_editor for when it has just been deleted.

Avoid setting up and removing the notification table if no

notifications are required, such as from the update editor.

* subversion/libsvn_wc/adm_ops.c

(svn_wc__delete_internal): Update caller.

* subversion/libsvn_wc/update_editor.c

(delete_entry): Update caller.

(add_directory): Update caller. Pass conflict.

* subversion/libsvn_wc/wc_db.c

(op_delete_baton_t): Add variables.

(delete_node): Allow setting work_items and conflict. Make notify

handling optional.

(svn_wc__db_op_delete): Reorder arguments. Optimize non-notify case

Allow setting work_items and conflict.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_op_delete): Reorder arguments as suggested by TODO. Add standard

arguments.

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

(do_delete): Update caller.

Be more careful when trimming lines for display in the internal merge tool.

Convert lines to UTF-8 for internal handling, and make sure not to display

an invalid UTF-8 string.

We're still missing a way of determining the actual display width of

the string, i.e. the of equivalent of wcswidth(). However, not writing

invalid UTF-8 is already an improvement.

* subversion/svn/file-merge.c

(prepare_line_for_display): When trimming lines, take care not to produce

invalid UTF-8. Introduce local variable 'width' for clarity.

(merge_chunks): Always convert lines to UTF-8 before display.

Turn svn_wc__db_temp_op_set_new_dir_to_incomplete into a real wc_db

operation svn_wc__db_op_begin_update. We can't ignore that this database

operation is essential for the current update editor.

Add conflict and work_items argument and use this to avoid additional

db operations.

* subversion/libsvn_wc/update_editor.c

(add_directory): Update caller. Pass conflict skel.

* subversion/libsvn_wc/wc_db.c

(svn_wc__db_temp_op_set_new_dir_to_incomplete): Rename to ...

(svn_wc__db_op_begin_update): ... this and copy new arguments in baton.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_temp_op_set_new_dir_to_incomplete): Rename to ...

(svn_wc__db_op_begin_update): ... this.

* subversion/libsvn_wc/update_editor.c

(close_file): Store a special-status-changed tree conflict in the common

conflict skel instead of directly storing the conflict skel in the db.

During update a deleted node is not replaced until close_file or

close_directory is called to add the replacement, so we can safely

delay the updating of the tree conflict.

* subversion/libsvn_wc/update_editor.c

(add_directory,

add_file): Don't add the tree conflict here. Store it for a later install

instead.

* subversion/svn/file-merge.c: Fix build with APR versions that don't have

the APR_SIZE_MAX macro.

Add an internal text conflict merge tool to the 'svn' command line client.

The merge tool's interface was inspired by the UNIX tool sdiff ("side-by-side

diff"), which is used to merge configuration files during upgrades on OpenBSD,

for example.

The merge tool can be invoked during interactive conflict resolution using

the new "(m) merge" option. It is currently limited to picking either

version of each conflicted chunk. It can also postpone resolution of a chunk,

which will result in conflict markers in the merge result and the inability

to mark the entire file as "(r) resolved".

The merge tool will be extended later with per-conflict-chunk editing

capabilities which will make it more flexible than it is now.

* subversion/svn/cl.h

(svn_cl__merge_file): Declare.

* subversion/svn/conflict-callbacks.c

(svn_cl__conflict_handler): Add the "(m) merge" command to the interactive

conflict resolution prompt, allowing the user to invoke the internal file

merge tool.

* subversion/svn/file-merge.c: New file which contains merge tool code.

On the 'master-passphrase' branch, add the use-master-password runtime

configuration option and tie all the current auth providers to that

feature being disabled. (This won't necessarily be the shipped

behavior, but for now it makes for an easy way for me to work without

my cached credentials getting in the way.)

* subversion/include/svn_config.h

(SVN_CONFIG_OPTION_USE_MASTER_PASSWORD): New.

* subversion/libsvn_subr/config_file.c

(svn_config_ensure): Add configuration template bits for a new

'use-master-password' configuration option.

* subversion/libsvn_subr/cmdline.c

(get_old_auth_providers): New function, cored near-verbatim from...

(svn_cmdline_create_auth_baton): ...this one, which now only fetches

the old auth provider when master passphrase support is disabled.

* subversion/libsvn_wc/upgrade.c

(svn_wc__upgrade_sdb): Enable when working copy version >= 30.

* subversion/libsvn_wc/wc-metadata.sql

(STMT_UPGRADE_TO_30): Update schema version.

(STMT_UPGRADE_30_SET_CONFLICT): Fix argument indexes.

* build/generator/templates/svn_config.vcxproj.ezt

Following up on r1357765, update svn_config template to add the sql

dependencies to the generator project, to enable monitoring the files for

changes via the scc api.

Commit some schema file changes that should have been part of r1357760.

* subversion/libsvn_wc/wc-metadata.sql

(STMT_UPGRADE_30_SELECT_CONFLICT_SEPARATE,

STMT_UPGRADE_30_SET_CONFLICT): New statements.

* subversion/libsvn_wc/entries.c

(insert_actual_node): Following up on r1357760, unbreak compilation in

conflict skel mode.

Combine the code to convert from separate in-db values to a conflict skel in

one place instead of writing it a third time for the format bump code. Add

an initial version of the format bump code.

* subversion/libsvn_wc/entries.c

(insert_actual_node): Use svn_wc__upgrade_conflict_skel_from_raw().

* subversion/libsvn_wc/upgrade.c

(includes): Add conflicts.h

(svn_wc__upgrade_conflict_skel_from_raw): New function.

(bump_to_30): New function.

(svn_wc__upgrade_sdb): Add disabled bump to 30.

* subversion/libsvn_wc/wc.h

(svn_wc__upgrade_conflict_skel_from_raw): New function.

* subversion/libsvn_wc/wc_db.c

(svn_wc__upgrade_conflict_skel_from_raw): Use

svn_wc__upgrade_conflict_skel_from_raw instead of duplicating the code.

Make the upgrade from entries capable of upgrading to conflict skels.

This resolves the last 2 test failures when running with conflict skels.

* subversion/libsvn_wc/entries.c

(includes): Add conflicts.h.

(insert_actual_node): Add db and wri_abspath arguments to allow using the

conflict api. Check all columns like in other places.

Add conflict skel implementation.

(write_entry,

write_actual_only_entries,

svn_wc__write_upgraded_entries): Update caller.

Detect actual only nodes by checking if the node has only an actual record,

instead of detecting if the node is tree conflicted.

The result is only used for notifications if there is no other reason to tell

that the node used to be modified.

* subversion/libsvn_wc/wc-queries.sql

(STMT_CREATE_REVERT_LIST): Use subquery to determine if a node is actual

only twice.

* subversion/libsvn_wc/wc_db.c

(revert_list_read): Remove now unneeded check.

* subversion/libsvn_wc/conflicts.c

(svn_wc__conflict_invoke_resolver): Run the workqueue after resolving a text

conflict.

* tools/dev/benchmarks/suite1/run: disable debug flag.

* tools/dev/benchmarks/suite1/run.bat: Mark outdated.

Following up on the recent interactive conflict handling changes in svn, stop

abusing svn_client_ctx_t's resolver as a temporary variable by storing some

state in the option state.

This allows reverting some changes in libsvn_client that changed the library

behavior. And this then should fix the javahl tests.

* subversion/libsvn_client/merge.c

(merge_dir_props_changed): Restore old behavior. Provide left and right

locations for recording the conflict.

(merge_file_changed): Restore old behavior.

* subversion/svn/cl.h

(svn_cl__opt_state_t): Store interactive resolver in this.

(svn_cl__resolve_conflicts): Add opt_state argument.

* subversion/svn/conflict-callbacks.c

(svn_cl__resolve_conflicts): Just enable the interactive handling from

this specific point and restore old values.

* subversion/svn/main.c

(main): Set conflict handler in opt_state instead of ctx.

* subversion/svn/merge-cmd.c

(svn_cl__merge): Remove ctx changes. Call interactive resolver on opt_state.

* subversion/svn/resolve-cmd.c

(svn_cl__resolve): Verify the right variable. Set and restore interactive

handler.

* subversion/svn/switch-cmd.c

(svn_cl__switch): Remove ctx changes. Call interactive resolver on opt_state.

* subversion/svn/update-cmd.c

(svn_cl__update): Remove ctx changes. Call interactive resolver on opt_state.

* subversion/svn/export-cmd.c

(svn_cl__export): Don't leak 'err' if an externals error occurred and

'err' is not SVN_ERR_WC_OBSTRUCTED_UPDATE.

Don't lose the "Failure occurred processing one or more externals definitions"

error message if an unrelated error occurs. For instance, errors returned

from the conflict resolver would mask the "externals error" message.

* subversion/svn/switch-cmd.c

(svn_cl__switch): Don't return the "externals processing" error directly,

but merge it with any other potential errors from later function calls.

* subversion/svn/update-cmd.c

(svn_cl__update): As previous.

Follow-up to r1357363:

* subversion/svn/merge-cmd.c

(svn_cl__merge): Handle errors returned from reintegrate merges.

Fixes test failures due to abort() because of leaked errors.

Revamp benchmarks/suite1, as promised on the hackathon. A slight code bomb.

Use an SQLite db to record all timings ever measured. Add capability to

generate charts from recorded data. Commandline interface has changed,

featuring a way to indicate slices of recorded timings to show/compare/chart.

* tools/dev/benchmarks/suite1/benchmark.py: Revamp.

* tools/dev/benchmarks/suite1/run:

Adjust so that it does roughly the same, except, since all timings are now

recorded, only run the 1.7.0 tag once instead of N times every week.

Todo: Actually ask benchmark.py for charts and show them to the dev list.

Transform the base-remove workqueue operation into an atomic wc_db operation

that dynamically creates multiple workqueue operations that transform the

local working copy later.

This removes the last place in the workqueue that may change the NODE

presence/status during its operations. (Except for legacy and upgrade).

This patch removes several ugly corner cases around actual only nodes in

the original implementation of the db function.

* subversion/libsvn_wc/externals.c

(svn_wc__external_remove): Update caller. Run workqueue instead of manually

removing a file.

* subversion/libsvn_wc/update_editor.c

(delete_entry): Handle all changes via a single call to

svn_wc__db_base_remove, instead of applying multiple small operations.

* subversion/libsvn_wc/wc-queries.sql

(STMT_SELECT_BASE_PRESENT,

STMT_DELETE_ACTUAL_FOR_BASE_RECURSIVE,

STMT_DELETE_WORKING_BASE_DELETE,

STMT_DELETE_WORKING_RECURSIVE,

STMT_DELETE_BASE_RECURSIVE): New queries.

* subversion/libsvn_wc/wc_db.c

(base_get_info): Add prototype.

(base_remove_baton): Add new arguments.

(db_base_remove): Implement as recursive operation via several new Sqlite

statements.

(svn_wc__db_base_remove): Pass arguments via baton.

(svn_wc__db_base_remove): Update caller.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_base_remove): Update prototype and documentation.

* subversion/libsvn_wc/workqueue.c

(names): Add OP_DIRECTORY_REMOVE. Sort legacy items at the bottom.

(remove_base_node): Remove function.

(run_base_remove): Just call svn_wc__db_base_remove.

(svn_wc__wq_build_base_remove): Remove function.

(run_dir_remove,

svn_wc__wq_build_dir_remove): New function.

(dispatch_table): Add OP_DIRECTORY_REMOVE. Sort legacy items at the bottom.

* subversion/libsvn_wc/workqueue.h

(svn_wc__wq_build_dir_remove): New function.

(svn_wc__wq_build_base_remove): Remove function.

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

(includes): Add workqueue.h.

(base_dir_insert_remove): Run workqueue to avoid an error on closing

the db.

* subversion/svn/merge-cmd.c

(svn_cl__merge): Resolve possible error leak.

* subversion/libsvn_wc/wc-queries.sql

(STMT_DROP_REVERT_LIST): Following up on r1357376, revert this specific

query as the revert error handling also executes this query if the table

hasn't been added.

* subversion/libsvn_wc/wc_db.c

(get_conflict_marker_files): Fix column index to really retrieve the skel

instead of NULL. Don't perform unneeded copy to scratch_pool.

Make the base_remove wc_db api code that determines if an actual only node

should be left explicitly retrieve the conflict in preparation for moving to

the common conflict skel.

* subversion/libsvn_wc/wc-queries.sql

(STMT_DELETE_ACTUAL_NODE_WITHOUT_CONFLICT): Remove unused query.

* subversion/libsvn_wc/wc_db.c

(base_remove_baton): New struct.

(db_base_remove): Check if there is an actual node row without a tree

conflict and if there is, remove it.

(db_op_mark_resolved): Interpret output of svn_wc__conflict_skel_resolve

correctly.

(bump_node_revision): Update caller.

(bump_revisions_baton_t): Add db variable.

(bump_revisions_post_update,

svn_wc__db_op_bump_revisions_post_update): Pass db variable.

* subversion/libsvn_wc/wc-queries.sql

(STMT_SELECT_ACTUAL_TREE_CONFLICT,

STMT_SELECT_ACTUAL_CHANGELIST): Remove unused statements.

(STMT_DELETE_ACTUAL_NODE_WITHOUT_CONFLICT): Also keep the node

when there is a new-style conflict skel.

Following up on r1357362, fix more errors in the retrieval of all marker

paths.

* subversion/libsvn_wc/conflicts.c

(svn_wc__conflict_read_markers): Propertly use pstrmemdup().

* subversion/libsvn_wc/wc_db.c

(revert_list_read_baton): Add db variable.

(revert_list_read): Fix compilation of the skel mode code.

(svn_wc__db_revert_list_read): Update caller.

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

(test_serialize_text_conflict): Extend test a bit to really verify the

paths.