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

Changeset 1357866 is being indexed.

* 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


* 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_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.



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


* 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


* 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


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/ 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 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






* 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


(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.


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


* 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


(bump_node_revision): Update caller.

(bump_revisions_baton_t): Add db variable.


svn_wc__db_op_bump_revisions_post_update): Pass db variable.

* subversion/libsvn_wc/wc-queries.sql


STMT_SELECT_ACTUAL_CHANGELIST): Remove unused statements.


when there is a new-style conflict skel.

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


* 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


When done with temporary tables and triggers explicitly drop them, to avoid

dropping unintentional items (or forgetting to drop intentional items).

This leaves similar fixups for when creating the tables and triggers.

* subversion/libsvn_wc/wc-queries.sql

(STMT_FINALIZE_CHANGELIST): Drop the right trigger explicitly.





STMT_FINALIZE_DELETE): Drop explicitly.

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

(schema_statements): Add STMT_CREATE_CHANGELIST_TRIGGER.

* subversion/svn/merge-cmd.c

(svn_cl__merge): Avoid possible error leaks due to overlapping use of an

'err' variable and the SVN_ERR() macro. Use a separate 'merge_err'

variable to store errors returned from merge operations, and don't

leak it even if functions called after the merge operation return errors.

Fix a skel check in svn_wc__conflict_read_markers() that segfaulted when

used from the experimental conflict skel mode.

* subversion/libsvn_wc/conflicts.c

(svn_wc__conflict_read_markers): Fix finding markers.

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

(test_serialize_text_conflict): Read the markers.

* subversion/svn/notify.c

(svn_cl__notifier_get_conflicted_paths): Return a proper result array

containing const char * paths instead of elements of the wrong type


Make the conflict handling in the revert code ready for conflict skels

by using an array of marker paths instead of specific markers.

(This also allows a simple loop in the callers)

* subversion/libsvn_wc/adm_ops.c

(revert_restore): Update caller. Loop over the conflict markers.

* subversion/libsvn_wc/wc-queries.sql


Add conflict_data blob and fill it in the triggers.

(STMT_SELECT_REVERT_LIST): Reorder columns to move the conflicts at the


* subversion/libsvn_wc/wc_db.c

(revert_list_read_baton): Store marker list.

(revert_list_read): Collect a list of markers and add conflict skel code.

(svn_wc__db_revert_list_read): Use marker list.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_revert_list_read): Update prototype and documentation.