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

Changeset 1357566 is being indexed.

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.

Make 'svn merge' print the conflict summary before showing output from the

conflict resolver, and also restrict post-merge interactive resolution

to paths which got new conflicts flagged during the merge operation.

Corresponds to changes made for 'svn update' in r1357298 and r1357313.

* subversion/libsvn_client/merge.c

(merge_dir_props_changed, merge_file_changed): Invoke the conflict callback

from the client context again.

(merge_locked, merge_peg_locked, do_symmetric_merge_locked): Stop resolving

conflicts before returning.

* subversion/svn/merge-cmd.c

(svn_cl__merge): Postpone conflict resolution during the merge operation.

Run the conflict resolver on any paths which got conflicts flagged during

the merge operation.

Add support for resolving specific conflicts when using the currently still

disabled conflict-skel storage.

* subversion/libsvn_wc/conflicts.c

(svn_wc__conflict_skel_resolve): New function.

* subversion/libsvn_wc/conflicts.h

(svn_wc__conflict_skel_resolve): New function.

* subversion/libsvn_wc/wc_db.c

(op_mark_resolved_baton): Add db.

(db_op_mark_resolved): Add implementation for conflict skel storage. Return

an error when operating on non-existing paths.

Make 'svn switch' print the conflict summary before showing output from the

conflict resolver, and also restrict post-switch interactive resolution

to paths which got new conflicts flagged during the switch operation.

Corresponds to changes made for 'svn update' in r1357298 and r1357313.

* subversion/libsvn_client/switch.c

(switch_internal): Always invoke the conflict callback provided by the

client context. Stop invoking the conflict resolver before returning.

* subversion/svn/switch-cmd.c

(svn_cl__switch): Force conflicts to be postponed during the switch

operation, and run the resolver on any paths which got conflicts flagged

during the switch.

When running the conflict resolver at the end of an 'svn update' operation,

resolve conflicts only on paths which got new conflicts flagged during the

update operation, rather than also resolving conflicts which were left behind

within the update targets by some other operation.

* subversion/svn/cl.h

(svn_cl__notifier_get_conflicted_paths): Declare.

* subversion/svn/notify.c

(notify_baton): Add conflicted_paths hash.

(add_conflicted_path): New helper to add a conflicted path to above hash.

(notify): Add any confliced paths to above hash.

(svn_cl__get_notifier): Initialise the conflicted_paths hash.

(svn_cl__notifier_get_conflicted_paths): Return a path-wise sorted array

of confliced paths added during notification.

* subversion/svn/update-cmd.c

(svn_cl__update): Pass the list of newly conflicted paths to the resolver,

rather than passing the entire update target list.

Make 'svn update' display conflict summary information before the interactive

conflict resolver is started, and don't invoke the conflict resolver if no

conflicts occurred during the current update operation but there are unresolved

conflicts from a previous update operation.

While trying various ways of achieving the goal of this commit, I came to

the conclusion that it is easier for client implementors to invoke the conflict

resolver themselves, rather than having the libsvn_client library invoke it.

So this commit also changes the corresponding libsvn_client code back to

its pre-r1353734 state and gives back full control over whether conflicts

are postponed during the update operation to libsvn_client API users.

Similar changes for switch and merge will follow.

* subversion/libsvn_client/checkout.c

(svn_client__checkout_internal): Track parameter list changes to


* subversion/libsvn_client/client.h

(svn_client__update_internal): Remove cONFLICT_FUNC2 and CONFLICT_BATON2

paramters from function declaration.

* subversion/libsvn_client/externals.c

(switch_dir_external): Track paramter list changes to


* subversion/libsvn_client/update.c

(update_internal, svn_client__update_internal): Drop the CONFLICT_FUNC2 and

CONFLICT_BATON2 parameters. Always invoke the conflict resolution callback

provided in the client context.

(svn_client_update4): Track above parameter list changes, and stop invoking

the conflict resolver before returning. This gives control over when the

conflict resolver runs back to API users.

* subversion/svn/cl.h

(svn_cl__notifier_check_conflicts, svn_cl__resolve_conflicts): Declare.

* subversion/svn/conflict-callbacks.c

(svn_cl__resolve_conflicts): New helper function that runs the resolver

on a specified list of targets.

* subversion/svn/notify.c

(svn_cl__notifier_check_conflicts): New helper to determine whether conflicts

occurred during an operation.

* subversion/svn/update-cmd.c

(svn_cl__update): Set the conflict callback in the client context to NULL

before calling svn_client_update(), postponing all conflicts. If conflicts

were reported during the update, run the conflict resolver.

* subversion/tests/cmdline/

(update_accept_conflicts): Adjust expected output. The conflict summary is

now printed before output from the conflict resolver is displayed, not after.

Prepare one more code path for switching to conflict skels: the

code to avoid copying conflit marker files from 'svn copy'.

Make the wc_db api more generic, assuming that the current only caller

only uses a lookup to check if paths are in the list.

* subversion/libsvn_wc/conflicts.c

(svn_wc__conflict_read_markers): New function.

* subversion/libsvn_wc/conflicts.h

(svn_wc__conflict_read_markers): New function.

* subversion/libsvn_wc/copy.c

(copy_versioned_dir): Assume that svn_wc__db_get_conflict_marker_files

returns absolute paths instead of just basenames.

* subversion/libsvn_wc/wc-queries.sql

(STMT_SELECT_CONFLICT_VICTIMS): Also check conflict_data for conflicts.

Return conflict_data as second column.

* subversion/libsvn_wc/wc_db.c

(svn_wc__db_read_conflict_victims): Update statement reference.

(marker_files_baton): New struct.

(get_conflict_marker_files): Use baton. Add implementation for conflict skel


(svn_wc__db_get_conflict_marker_files): Update caller.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_get_conflict_marker_files): Update documentation.

Tweak some sqlite queries in preparation for the future move to conflict


* subversion/libsvn_wc/entries.c

(insert_actual_node): Update columns and document what has to be done.

* subversion/libsvn_wc/wc-queries.sql


(STMT_CLEAR_TREE_CONFLICT): ... this, to match siblings.

(STMT_INSERT_ACTUAL_NODE): Reorder arguments and include conflict_data.

* subversion/libsvn_wc/wc_db.c

(copy_actual): Simplify usage.

(db_op_mark_resolved): Update query.

Make it an error to perform a text or property merge into an already conflicted

node. We can't store two conflicts of the same kind on a node.

(And even if we could, it would be very hard to provide a UI to resolve the


'svn merge' should probably provide some more user friendly handling for this

case. Just blocking merging into a somewhere conflicted tree currently breaks

a lot of tests, while it is certainly *not* best practice to merge into a

conflicted tree.

* subversion/libsvn_wc/conflicts.c

(svn_wc__conflict_create_markers): Remove ugly corner case. The new

behavior is that a second .prej file is created when this case is hit,

so there is at least some evidence that the property conflict was


* subversion/libsvn_wc/merge.c

(svn_wc_merge5): Detect merging into an already conflicted node.

* subversion/libsvn_wc/props.c

(svn_wc__perform_props_merge): Detect merging into an already conflicted


* subversion/tests/cmdline/


svn_merge): Allow passing a list of resolved targets.

(merge_two_edits_to_same_prop): Accept the conflict before merging again.

* subversion/libsvn_client/merge.c

(normalize_merge_sources_internal): Following up on r1357186, remove

outdated comment.

Make two libsvn_client merge helper functions conform a bit more to our

current standards.

* subversion/libsvn_client/client.h

(svn_client__get_copy_source): Move output arguments to the front. Rename

arguments to match current recommended naming. Split pool usage.

* subversion/libsvn_client/log.c

(svn_client__get_copy_source): Update argument names. Switch pool usage.

* subversion/libsvn_client/merge.c

(make_conflict_versions): Pass uuid to newer constructor.

(normalize_merge_sources_internal): Update caller. Rename variables to

avoid doing unneeded checks. Pass scratch pool.

* subversion/libsvn_client/mergeinfo.c

(svn_client_suggest_merge_sources): Update caller.

Fold svn_wc__get_prejfile_abspath() in its two callers, that already

know about conflict skels.

* subversion/libsvn_wc/conflicts.c

(svn_wc__conflict_create_markers): Find a prej file in the skel.

* subversion/libsvn_wc/props.c

(svn_wc__get_prejfile_abspath): Remove function.

* subversion/libsvn_wc/props.h

(svn_wc__get_prejfile_abspath): Remove function.

* subversion/libsvn_wc/workqueue.c

(run_prej_install): Read conflict skel to find path.

* subversion/libsvn_wc/workqueue.c


run_set_prop_conflict_markers): Avoid legacy api where the new api avoids


Simplify some of the 'svn resolve --accept=' code to avoid looping

over conflictdescriptors where the skel has a direct answer.

* subversion/libsvn_wc/conflicts.c

(svn_wc__read_conflicts): Remove unused variable.

(resolve_conflict_on_node): Determine what to resolve from the skel.

* subversion/libsvn_wc/questions.c

(includes): Add conflicts.h and remove two unused headers.

(svn_wc__internal_conflicted_p): Avoid a db query per call by assuming that

svn_wc__db_read_conflict() now handles the node not present check for us.

Use the skel functions to find the marker files instead of creating the

conflict descriptors first.

Switch the remaining pieces of the wc_db api to using conflict skels for

transfering conflicts. Reconstruct conflict descriptors in


* subversion/libsvn_client/merge.c


merge_file_added): Remove assumption that you can retrieve conflicts

on non-existing paths without an error.

* subversion/libsvn_wc/conflicts.c

(svn_wc__read_conflicts): Create conflict descriptors from the skel from


* subversion/libsvn_wc/wc_db.c

(includes): Document that we only need tree_conflicts.h for non skel mode.

(svn_wc__db_read_conflicts): Rename to ...

(svn_wc__db_read_conflict): ... this and return the conflict as a non-const


* subversion/libsvn_wc/wc_db.h

(svn_wc__db_read_conflicts): Rename to ...

(svn_wc__db_read_conflict): ... this and update documentation.

* subverison/po/fr.po: Fix gender of 'compact' in 2 places where it

modifies masculine nouns.

Report by: Christian Bac <>