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

Changeset 1103257 is being indexed.

Move the special-cased directory skipping message for changelists to

the wc_db layer.

* subversion/libsvn_wc/adm_ops.c

(changelist_walker): Remove special case for directories.

* subversion/libsvn_wc/wc-queries.sql

(STMT_UPDATE_ACTUAL_CHANGELISTS): Only set changelists on files.


(STMT_CREATE_TARGETS_LIST): Also store the kind of the object, and add an


(STMT_INSERT_TARGET): Insert the kind of the object.

* subversion/libsvn_wc/wc_db.c

(populate_targets_tree): Add the wc_id of the object.

(set_changelist_txn): If setting a changelist on a dir, add a skip


  1. … 2 more files in changeset.
Revert my orginal fix for issue #3351 in preparation for handling the removal

of file and other externals properly on update instead of on commit.

* subversion/include/svn_wc.h

(svn_wc_process_committed_queue2): Remove two arguments.

* subversion/libsvn_client/client.h

(svn_client__handle_externals): Remove delete_only option.

* subversion/libsvn_client/commit.c

(svn_client_commit5): Stop collecting and processing externals.

* subversion/libsvn_client/externals.c

(item_change_baton_t): Remove variable.

(handle_external_item_change): Don't check for delete_only.

(handle_externals_change): Use constant baton as argument

instead of separate args.

(svn_client__handle_externals): Pass baton instead of arguments.

(svn_client__export_externals): Update caller.

* subversion/libsvn_client/switch.c

(switch_internal): Update caller.

* subversion/libsvn_client/update.c

(update_internal): Update caller.

* subversion/libsvn_wc/adm_ops.c


svn_wc__process_committed_internal): Remove external processing.

(svn_wc_process_committed_queue2): Don't collect externals and don't

send them to the callback.

* subversion/libsvn_wc/deprecated.c


svn_wc_process_committed4): Update caller.

* subversion/libsvn_wc/wc.h

(svn_wc__process_committed_internal): Remove external arguments.

* subversion/tests/cmdline/

(update_lose_file_external): Remove assumption that commit changes the

external and reapply XFail marking.

  1. … 9 more files in changeset.
* subversion/libsvn_wc/adm_ops.c

(revert_restore): Following up on r1101817, fix compilation on systems that

do have symlinks (unlike my dev machine).

Following up on r1101473 (and several other followups), resolve the regression

in our issue #1663 handling, by moving the special recorded information

handling exception in the revert code itself.

The revert code already stats the file, so we can just make it retrieve

the information it needs directly. This also allows removing two optional

output arguments from svn_wc__internal_file_modified_p that were only used

by the revert code.

* subversion/libsvn_wc/adm_ops.c

(includes): Add private/svn_io_private.h

(revert_restore): Extend our own stat to also retrieve size, mtime,

read only and executable. Compare against the recorded information

locally before calling svn_wc__internal_file_modified_p in the slow

exact mode. Stop assuming that all symlinks should always be reverted

on systems that don't support symlinks.

(svn_wc__internal_remove_from_revision_control): Update caller.

* subversion/libsvn_wc/cleanup.c

(repair_timestamps): Update caller. Handle symlink as file.

* subversion/libsvn_wc/copy.c

(copy_versioned_file): Update caller.

* subversion/libsvn_wc/diff_editor.c

(file_diff): Update caller.

(close_file): Update caller.

* subversion/libsvn_wc/diff_local.c

(file_diff): Update caller.

* subversion/libsvn_wc/externals.c

(close_file): Update caller.

* subversion/libsvn_wc/questions.c

(includes): Remove private/svn_io_private.h

(svn_wc__internal_file_modified_p): Remove two arguments. Use

svn_io_stat_dirent instead of svn_io_stat.

* subversion/libsvn_wc/status.c

(assemble_status): Update caller.

* subversion/libsvn_wc/update_editor.c

(merge_file): Update caller.

* subversion/libsvn_wc/wc.h

(svn_wc__internal_file_modified_p): Remove two arguments. Update


* subversion/libsvn_wc/wc_db.c

(has_local_mods): Update caller.

* subversion/libsvn_wc/workqueue.c

(process_commit_file_install): Update caller.

* subversion/tests/cmdline/

(revert_reexpand_keyword): Remove XFail. Assert that the first part of the

test succeeds, but that we don't revert the file after we fixed the

recorded information.

  1. … 12 more files in changeset.
Ok, thinking this over at 4 AM. I don't think we are willing to accept

the performance regression of r1101473 in svn revert -R. So I accept

that we don't have to revert that are not strictly as checked out, but

are still unmodified according to status.

In most cases this reverts to the behavior of before r1101473, as

before that we accepted recorded information as 'the file is not

modified'. But I'm introducing the change now that when the file might

be modified, we do the less strict comparison.

The only way to have both the performance and the strict comparison

would be to store another boolean with the recorded information to

tell to what level we performed the recorded comparison. (And should

we then cache the strict or the not strict?)

[Note from the future: This reverts 'svn revert' to the 1.6.x behavior

of using the recorded information as hint. But this breaks one of

the revert tests because that tests assumes that 'svn revert' notices

keyword expansion changes. More details in r1101730.]

* subversion/libsvn_wc/adm_ops.c

(revert_restore): No longer ask svn_wc__internal_file_modified_p()

to perform an exact comparison.

* subversion/libsvn_wc/adm_ops.c

(svn_wc__internal_remove_from_revision_control): Resolve variable shadowing


Found by: philip

In general svn_wc__internal_file_modified_p() should be called with

compare_text_bases TRUE, as that is what a normal user would call a

modified file.

In other words it should ignore keyword expansion differences and eol

differences, as we would do that on commit and status.

Then we have a property that indicates whether we should use recorded

information or not, which we only use to specialize svn:eol-style in

the commit processing to hide a few bugs.

But for svn:keywords we do a similar thing, but we do that when updating

the property value. (Which doesn't trigger on merges)

Summarized: This moves the recording fixes to the two places where we set

properties. And this makes us always use the recorded information from the

public api. Adds a simple to explain boolean to check if the file matches

what you would get if you restored the file.

* subversion/libsvn_client/commit_util.c

(check_prop_mods): removed. no longer needed.

(harvest_committables): Remove eol checks. (Handled by libsvn_wc now,

just like svn:keywords).

* subversion/libsvn_wc/adm_ops.c

(revert_restore): Do an exact match check.

(svn_wc__internal_remove_from_version_control): This function is only used

from svn_wc_crop and when removing working copies, so stop doing work that

isn't relevant there. Use recursive delete when we find a deleted node.

Only call svn_wc__adm_destroy when we really destroy the wc.

* subversion/libsvn_wc/cleanup.c

(repair_timestamps): Convert to repository form for timestamp repair.

* subversion/libsvn_wc/copy.c

(svn_wc__internal_file_modified_p): Convert to repository form for copy


* subversion/libsvn_wc/diff_editor.c

(file_diff): Update caller.

* subversion/libsvn_wc/diff_local.c

(file_diff): Update caller.

* subversion/libsvn_wc/externals.c

(close_file): Update caller. Do the right check.

* subversion/libsvn_wc/props.c

(svn_wc__perform_props_merge): Just clear recorded information on magic

property changes.

(do_propset): Handle eol changes like we do keyword changes, but make

wc_db do the hard work in one atomic step.

* subversion/libsvn_wc/questions.c

(compare_and_verify): Remove unused checksum verfication. (Should be handled

by a pristine verification).

(svn_wc__internal_file_modified_p): Update arguments.

(svn_wc_text_modified_p2): Update caller add note.

(argument will be removed in a followup commit).

* subversion/libsvn_wc/status.c

(assemble_status): Update caller.

* subversion/libsvn_wc/update_editor.c

(merge_file): Update caller.

(svn_wc_add_repos_file4): Update caller.

* subversion/libsvn_wc/wc.h

(svn_wc__internal_file_modified_p): Update documentation.

* subversion/libsvn_wc/wc_db.c

(record_baton_t): Moved up in the file, to allow reuse.

(db_record_fileinfo): Added db_ prefix and moved up to allow reuse.

(svn_wc__db_global_record_fileinfo): Moved.

(set_props_baton_t): Add clear_recorded_info boolean.

(set_props_txn): Clear recorded info if requested.

(svn_wc__db_op_set_props): Add argument.

(record_baton_t, record_fileinfo,

svn_wc__db_global_record_fileinfo): Moved up.

(has_local_mods): Update caller.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_op_set_props): Add argument and update documentation.

* subversion/libsvn_wc/workqueue.c

(process_commit_file_install): Update caller. As the result is only used to

update the cache it shouldn't use exact comparison.

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

(validate_node): Update caller.

  1. … 15 more files in changeset.
[This is patch 1/3. This one is self contained, but doesn't update

subversion/libsvn_wc/external.c, subversion/libsvn_wc/merge.c

and subversion/libsvn_wc/update_editor.c yet.]

Make the translate api use a passed set of properties and make retrieving the

values needed for keyword expansion optional for the simple normalization case.

This patch prepares this part of our libsvn_wc api for when file externals

are no longer normal versioned files.

The next patch updates the editors to use the new api and the last one will

update the merge code. You need all or none of these patches, but this allows

easier review.

* subversion/libsvn_wc/adm_ops.c

(svn_wc__internal_remove_from_revision_control): Update caller.

* subversion/libsvn_wc/props.c

(do_propset): Update caller.

* subversion/libsvn_wc/questions.c

(compare_and_verify): Update caller.

* subversion/libsvn_wc/translate.c

(svn_wc__internal_translated_stream): Update caller.

(svn_wc__internal_translated_file): Update caller.

(svn_wc__get_translate_info): Forward for_normalization boolean.

(svn_wc__expand_keywords): If normalizing, don't read from db. Try to obtain

url via read info.

* subversion/libsvn_wc/translate.h

(svn_wc__get_translate_info): Update arguments and documentation.

(svn_wc__expand_keywords): Update arguments and documentation.

* subversion/libsvn_wc/workqueue.c



run_file_copy_translated): Update callers.

  1. … 5 more files in changeset.
Remove the separate wc apis that registered a file external before it was

inserted in the working copy. The external editor can install externals in

a single step, which removes intermediate database states.

* subversion/include/private/svn_wc_private.h

(svn_wc__set_file_external_location): Remove function.

(svn_wc__get_file_external_editor): Provide the definition to the editor.

(svn_wc__register_file_external): Remove function.

* subversion/libsvn_client/externals.c

(switch_file_external): Stop registering file externals before they are


* subversion/libsvn_wc/adm_ops.c

(svn_wc__register_file_external): Remove function.

* subversion/libsvn_wc/externals.c

(svn_wc__set_file_external_location): Remove function.

(edit_baton): Add some comments. Add to be recorded information.

(close_file): Register the provided information instead of the actual


(svn_wc__get_file_external_editor): Store to be recorded information in


  1. … 3 more files in changeset.
In the working copy library: Add the initial plumbing for a file externals

update editor. Move the externals functions to a new externals.c.

No functional changes, but contains some new code that will be enabled

in a followup commit.

* subversion/include/private/svn_wc_private.h

(svn_wc__get_file_external_editor): New function.

(svn_wc__crawl_file_external): New function.

* subversion/libsvn_wc/adm_ops.c

(svn_wc__set_file_external_location): Move to externals.c

* subversion/libsvn_wc/externals.c

New file, copied from props.c

(..): Removed property functions.

(find_and_remove_externals_revision): Kept function.

(svn_wc_parse_externals_description3): Kept function.

(svn_wc__set_file_external_location): Moved here from adm_ops.c

(edit_baton): New struct.







close_file): New stubbed delta editor functions.

(svn_wc__get_file_external_editor): New function.

(svn_wc__crawl_file_external): New function.

* subversion/libsvn_wc/props.c

(TEST_DB_PROP): Remove comment.

(find_and_remove_externals_revision): Remove function.

(svn_wc_parse_externals_description3): Remove function.

  1. … 3 more files in changeset.
* subversion/libsvn_wc/adm_ops.c

(process_committed_leaf): Remove two outdated comments:

The op-depth folding is already implemented in wc_db.c

And issue #3676 is resolved by this same folding algorithm. (We stopped

setting the last modified info on all nodes via the folding)

* subversion/libsvn_wc/adm_ops.c

(svn_wc_delete4): Provide an understandable error message when trying to

delete the root of a working copy.

Following up on r1100163, add a write lock check to the revert handling.

* subversion/libsvn_wc/adm_ops.c

(new_revert_internal): Expect a write lock on the directory containing

this node, which might be the directory itself for the wcroot.

Add a missing write lock check in svn_wc_delete4 and update recent tests

that expected to be able to delete nodes without a write lock.

* subversion/libsvn_wc/adm_ops.c

(svn_wc_delete4): Expect a wclock on the parent of the to-be-deleted node.

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

(wc_revert): Always lock the parent directory instead of just depending on


(wc_delete): Obtain a lock on the parent directory for deleting.



test_delete_with_base): Use wc_delete instead of calling svn_wc_delete4


  1. … 1 more file in changeset.
Get some cancellation into the game...

* subversion/libsvn_wc/adm_ops.c:

(svn_wc_delete4): pass CANCEL_FUNC/BATON to db_op_delete

(changelist_walker): pass CANCEL_FUNC/BATON (from the walker baton) to


* subversion/libsvn_wc/update_editor.c:

(add_directory, close_file): pass CANCEL_FUNC/BATON (from the edit

baton) to db_op_delete.

  1. … 1 more file in changeset.
For clarity, rename CHANGELIST param to NEW_CHANGELIST, and CHANGELISTS to


No functional changes, other than a minor structure change in adm_ops.c

* subversion/include/svn_wc.h:

(svn_wc_prop_set4, svn_wc_get_diff_editor6, svn_wc_get_diff_editor5,

svn_wc_get_diff_editor4, svn_wc_diff6, svn_wc_diff5, svn_wc_diff4,

svn_wc_revert4, svn_wc_revert3, svn_wc_set_changelist2,

svn_wc_get_changelists): rename params

* subversion/libsvn_wc/deprecated.c:

(svn_wc_revert3, svn_wc_get_diff_editor5, svn_wc_get_diff_editor4,

svn_wc_diff5, svn_wc_diff4): rename params

* subversion/libsvn_wc/props.c:

(svn_wc_prop_set4): rename params

* subversion/libsvn_wc/diff_editor.c:

(make_edit_baton, svn_wc_get_diff_editor6): rename params

* subversion/libsvn_wc/adm_ops.c:

(svn_wc_revert4): rename params

(struct changelist_walker_baton): rename fields. add CANCEL_FUNC/BATON

(changelist_walker): track rename in CWB. note that the new

CANCEL_FUNC/BATON fields are not (yet) used in order to avoid

functionality changes in this revision.

(svn_wc_set_changelist2): rename params. initialize new CANCEL fields.

(svn_wc_get_changelists): rename params

* subversion/libsvn_wc/info.c:

(svn_wc__get_info): rename params

* subversion/libsvn_wc/wc_db.c:

(struct set_changelist_baton_t): rename field

(set_changelist_txn): track rename in SCB.

(svn_wc__db_op_set_changelist): rename params

* subversion/libsvn_wc/diff_local.c:

(svn_wc_diff6): rename params

* subversion/libsvn_wc/node.c:

(walker_helper, svn_wc__internal_walk_children): rename params

  1. … 8 more files in changeset.
Combine the changelist modification notification into the operation

itself, so that (in the future) we can make guarantees about dropping the

temporary table. Add cancellation support, too.

Add a missing clear of the iterpool in db_op_delete.

Leave markers for future unification.

* subversion/libsvn_wc/wc_db.h:

(svn_wc__db_op_set_chnagelist): rename a couple parameters (that

differed by a single character) for clarity. add notification and

cancellation parameters.

(svn_wc__db_changelist_list_notify): remove

* subversion/libsvn_wc/wc_db.c:

(svn_wc__db_op_set_changelist): combine with ...

(svn_wc__db_changelist_list_notify): ... this. leave some comments.

adjust a bit of pool usage since we have an iterpool that can be used

as a better scratch_pool in the early part of the function. early-exit

if there is no NOTIFY_FUNC. fix an implicit 64-bit to 32-bit

conversion for the ACTION localvar. add cancellation.

(svn_wc__db_op_delete): clear the iterpool, and adjust some localvar

initialization to after that call.

* subversion/libsvn_wc/adm_ops.c:

(add_from_disk, changelist_walker): shift the notification directly into

the call to db_op_set_changelist.

  1. … 2 more files in changeset.
Combine the delete notification into the operation itself. Add

cancellation support (to occur post-operation, during the notification).

* subversion/libsvn_wc/wc_db.h:

(svn_wc__db_op_delete): add NOTIFY_FUNC/BATON and CANCEL_FUNC/BATON


(svn_wc__db_delete_list_notify): removed

* subversion/libsvn_wc/wc_db.c:

(svn_wc__db_op_delete): add NOTIFY_FUNC/BATON and CANCEL_FUNC/BATON

parameters. leave note about ensuring the table is dropped. combine

this function with ...

(svn_wc__db_delete_list_notify): ... this. go straight into the

notification process, and add cancellation.

* subversion/libsvn_wc/adm_ops.c:

(svn_wc_delete4): combine calls to the delete and notification, and just

pass NULL for the cancellation params.

* subversion/libsvn_wc/update_editor.c:

(add_directory, close_file): combine calls to the delete and

notification, and just pass NULL for the cancellation params.

* subversion/libsvn_wc/wc-queries.sql:

(STMT_DROP_DELETE_LIST): add an IF EXISTS. in the (future) logic, we may

not have a guarantee the table was created

[ subversion/tests/cmdline/op-depth-test.c is missing from this commit.

it was added in r1099660 ]

  1. … 4 more files in changeset.
Drop the delete list after calling svn_wc__db_op_delete.

* subversion/libsvn_wc/adm_ops.c

(svn_wc_delete4): Always invoke notification to drop the delete list.

* subversion/libsvn_wc/update_editor.c

(add_directory, close_file): Do NULL notification to drop delete list.

* subversion/libsvn_wc/wc_db.c

(svn_wc__db_delete_list_notify): Allow NULL notify callback, destroy

iteration pool.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_delete_list_notify): Tweak docstring.

  1. … 3 more files in changeset.
Enable the descendant commit in wc_db's node commit code. This removes the last

(currently) known phase during commit where the database is invalid.

After this commit when an op_depth root node is committed, the node and all

the pristine versions of its descendants at the same op-depth are collapsed

into the BASE layer. Changes on the descendants are then performed as

separate commit operations.

* subversion/libsvn_wc/adm_ops.c

(process_committed_leaf): Revert to the pre r1098689 behavior of

ignoring not-present nodes. r1099411 makes this the cleaner behavior.

* subversion/libsvn_wc/wc_db.c

(descendant_commit): Remove experimental check and update comment to remove

references to the excluded status.

(commit_node): Update caller.

  1. … 1 more file in changeset.
Enable the single-txn delete and remove the old implementation.

* subversion/libsvn_wc/adm_ops.c

(svn_wc_delete4): Remove conditional code, note some code that may

need to move.

* subversion/libsvn_wc/update_editor.c

(add_directory, close_file): Use new delete function.

* subversion/libsvn_wc/wc-queries.sql






* subversion/libsvn_wc/wc_db.h

(svn_wc__db_temp_op_delete): Remove.

* subversion/libsvn_wc/wc_db.c

(struct temp_op_delete_baton_t): Remove.

(remove_children, db_working_actual_remove, db_working_update_presence,

db_working_insert, is_add_or_root_of_copy, temp_op_delete_txn,

svn_wc__db_temp_op_delete): Remove.

  1. … 4 more files in changeset.
Remove two unused arguments from svn_wc__db_base_get_info(). The recorded size

and recorded modification time values only make sense when you look at the

highest layer of NODES, so you would have to call _read_info to verify that


* subversion/libsvn_wc/adm_crawler.c


svn_wc_crawl_revisions5): Update caller.

* subversion/libsvn_wc/adm_ops.c

(svn_wc__internal_remove_from_revision_control): Update caller.

* subversion/libsvn_wc/ambient_depth_filter_editor.c

(ambient_read_info): Update caller.

* subversion/libsvn_wc/crop.c

(svn_wc_exclude): Update caller.

* subversion/libsvn_wc/diff_editor.c




close_file): Update caller

* subversion/libsvn_wc/diff_local.c

(file_diff): Update caller.

* subversion/libsvn_wc/entries.c


read_one_entry): Update caller.

* subversion/libsvn_wc/info.c

(build_info_for_entry): Update caller.

* subversion/libsvn_wc/node.c





svn_wc__node_get_commit_status): Update caller.

* subversion/libsvn_wc/update_editor.c








close_edit): Update caller.

* subversion/libsvn_wc/wc_db.c

(base_get_info): Remove 2 arguments.

(svn_wc__db_base_get_info): Remove 2 arguments.




end_directory_update): Update callers.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_base_get_info): Remove 2 arguments.

* subversion/libsvn_wc/workqueue.c

(remove_base_node): Update caller.

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


validate_node): Update callers.

  1. … 13 more files in changeset.
Fix a couple of swig-rb changelist tests that have been failing since

r1096847. I'm not quite sure why we have to apply the changelist filter a

second time in this context, but I figure we can worry about that after we

get the tests passing.

* subversion/libsvn_wc/adm_ops.c

(get_cl_fn_baton): Add clhash member.

(get_node_changelist): Perform additional changelist filtering.

(svn_wc_get_changelists): Populate the clhash.

Add an experimental per op_root commit handling. After more review and testing

this could make it possible to enable depth limited commits that perform


When this feature is enabled (and post_process_commit_item is updated), all

tests pass and one test that tests for commit behavior on directories

(which is fixed by this change) XPasses.

* subversion/libsvn_client/commit.c

(post_process_commit_item): Add comment.

* subversion/libsvn_wc/adm_ops.c

(process_committed_leaf): Answer a question by handling this status

explicitly and asserting that we only see valid statee.

* subversion/libsvn_wc/wc-queries.sql


* subversion/libsvn_wc/wc_db.c

(descendant_commit): New function; disabled via macro.

(commit_node): When enabled call descendant_commit for op-roots.

  1. … 3 more files in changeset.
* subversion/libsvn_wc/adm_ops.c

(process_committed_leaf): Following up on r1098506, (partially) answer a


Drop a bunch of comments, based on investigation around ensuring the

commit process does not leave the DB in an inconsistent state.

* subversion/libsvn_wc/adm_ops.c:

(process_committed_leaf): leave a comment block about copied nodes

(svn_wc__process_committed_internal): comment about backwards compat

concerns. fold a couple if-statements together. add some comments to

params in a call, and adjust indent.

(svn_wc_process_committed_queue2): add clarifying comments

Style changes. No functional change.

* subversion/libsvn_wc/adm_ops.c:

(...): trim a few includes. add blank lines. one decl per line. fix some


(svn_wc__internal_remove_from_revision_control): drop a useless 'else'

Move svn_wc__nonexistent_path() near its single caller and make it private

to the file. Keeping as a separate function in case it needs to be exposed

again in the future.

* subversion/libsvn_wc/adm_ops.c:

(nonexistent_path): moved here from adm_files.c::svn_wc__nonexistent_path.

Dropped the unused DB param and renamed ADM_ABSPATH to WCROOT_ABSPATH

to better reflect its purpose.

(svn_wc_get_pristine_copy_path): rename localvar to WCROOT_ABSPATH and

update function call to nonexistent_path (name and params).

* subversion/libsvn_wc/adm_files.c:

(svn_wc__nonexistent_path): moved to nonexistent_path.

* subversion/libsvn_wc/adm_files.h:

(svn_wc__nonexistent_path): deleted

  1. … 2 more files in changeset.
Be very aggressive about closing the DB, even when errors occur.

* subversion/libsvn_wc/adm_ops.c:

(svn_wc_get_pristine_copy_path): ensure the DB is always closed, leaving

comments to ensure the behavior will remain.

* subversion/libsvn_wc/adm_ops.c



revert_restore): Add a note that the list should be deleted even though no

notifications happen. Otherwise this might break notifications on long

living clients.