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

Changeset 1100760 is being indexed.

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.

* subversion/libsvn_wc/adm_ops.c

(svn_wc_get_pristine_copy_path): Make sure our non existent path uses the

real administrative directory instead of just .svn tagged to the

directory where the file lives in.

Conditionally hook up the new delete code to the rest of the code.

It works in some cases, but doesn't pass all the regression tests.

* subversion/libsvn_wc/wc-queries.sql



* subversion/libsvn_wc/adm_ops.c

(svn_wc_delete4): Add conditional code to use the new delete code.

* subversion/libsvn_wc/wc_db.c

(svn_wc__db_op_delete): Wrap txn with triggers.

(svn_wc__db_delete_list_notify): New.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_op_delete): Document.

(svn_wc__db_delete_list_notify): New.

  1. … 3 more files in changeset.
Move the get-changelist node walking loop to libsvn_wc. This allows us to

better optimize it within the library in the future, should we feel the need.

* subversion/include/svn_types.h

(svn_changelist_receiver_t): Move here...

* subversion/include/svn_client.h

(svn_changelist_receiver_t): We can do this since svn_client.h

includes svn_types.h, so this is a backward compatible change.

* subversion/include/svn_wc.h

(svn_wc_get_changelists): New.

* subversion/libsvn_wc/adm_ops.c

(get_cl_fn_baton, get_node_changelist, svn_wc_get_changelists): New.

* subversion/libsvn_client/changelist.c

(get_cl_fn_baton, get_node_changelist): Remove.

(svn_client_get_changelists): Just pass parameters down to libsvn_wc.

  1. … 4 more files in changeset.
Allow the libsvn_wc-internal node walker to also filter on changelists. This

means we *don't* have to replicate the changelist filtering elsewhere.

Use this new functionality when setting props.

* subversion/libsvn_wc/props.c

(do_propset): Don't filter based on changelist.

(propset_walk_baton): Remove CHANGELISTS member.

(propset_walk_cb): Don't send the changelist list to do_propset().

(svn_wc_prop_set4): Only bother to calculate the changelist hash, except for

depth_empty. Let the node walker do changelist filtering.

* subversion/libsvn_wc/wc.h

(svn_wc__internal_walk_children): Add changelists param.

* subversion/libsvn_wc/adm_ops.c

(svn_wc_set_changelist2): Don't (yet) use the node walker to filter based

on changelist.

* subversion/libsvn_wc/node.c

(walker_helper): Take a changelist filter, and use it.

(svn_wc__internal_walk_children): Add changelist filter param, and use it

to filter the children in the walker_helper().

(svn_wc__node_walk_children): Update caller to ignore the changelist filter.

  1. … 3 more files in changeset.
Const-ify an arguments. We end up having to cast the const away before

calling APR, but at least our code is more correct.

* subversion/include/private/svn_wc_private.h

(svn_wc__changelist_match): Const-ify the clhash param.

* subversion/libsvn_wc/wc.h

(svn_wc__internal_changelist_match): Same.

* subversion/libsvn_wc/adm_ops.c

(svn_wc__changelist_match): Same.

(svn_wc__internal_changelist_match): Same, and cast away the const-ness

before calling APR.

  1. … 2 more files in changeset.
Implement collecting externals definitions that should be updated at commit

time. This in preparation for fixing issue #3351.

* subversion/libsvn_wc/adm_ops.c

(process_committed_leaf): Add old_externals argument to store to be removed

externals definitions. Store the old externals definitions of committed

(not shadowed) directories.

(svn_wc__process_committed_internal): Pass old_externals hash.

(svn_wc_process_committed_queue2): When we queued the wq operations, provide

the file externals changes to interested callers.

* subversion/libsvn_wc/deprecated.c

(svn_wc__process_committed_internal): Pass NULL for new argument.

* subversion/libsvn_wc/wc.h

(svn_wc__process_committed_internal): Add argument.

  1. … 2 more files in changeset.
In preparation for resolving issue #3351, add a few extra callbacks to the

adm crawler and commit processing.

External definitions are stored in the BASE tree, but are currently only

updated when updating. To allow removing (file) externals (=issue #3351),

the client library should know when a (file) external is removed from the BASE

tree, even when that happens through a commit.

Currently this works for everybody who receives the updates, but not for

who actually changes the definition.

* subversion/include/svn_wc.h

(svn_wc_process_committed_queue2): Add external_func and baton.

(svn_wc_crawl_revisions5): Add cancel_func and baton.

* subversion/libsvn_client/commit.c

(svn_client_commit5): Update caller.

* subversion/libsvn_client/diff.c

(diff_repos_wc): Update caller.

* subversion/libsvn_client/status.c

(svn_client_status5): Update caller.

* subversion/libsvn_client/switch.c

(switch_internal): Update caller.

* subversion/libsvn_client/update.c

(update_internal): Update caller.

* subversion/libsvn_wc/adm_crawler.c

(report_revisions_and_depths): Use standard ordering for arguments and

receive had_props from caller. Call cancel func when looping.

* subversion/libsvn_wc/adm_ops.c

(svn_wc_process_committed_queue2): Add two arguments, but don't use them yet.

(svn_wc_crawl_revisions5): Retrieve had_props. Update caller.

* subversion/libsvn_wc/deprecated.c

(svn_wc_crawl_revisions5): Update caller.

(svn_wc_process_committed_queue): Update caller.

  1. … 8 more files in changeset.
In our pristine store we store the length (in bytes) of the pristine streams.

We can use this (and the new had_props boolean of _read_info()) to further

optimize the file comparison code below svn_wc__internal_file_modified_p(),

without additional IO.

* If a file doesn't have properties, it doesn't need translation, so

don't perform DB queries to get the translation details from the properties.

* If a file doesn't need translation *and* doesn't match the pristine

size, it is not equal to the pristine file.

* subversion/libsvn_wc/adm_crawler.c

(read_and_checksum_pristine_text): Update caller.

* subversion/libsvn_wc/adm_files.c

(svn_wc__get_pristine_contents): Add size argument.

* subversion/libsvn_wc/adm_files.h

(svn_wc__get_pristine_contents): Add size argument.

* subversion/libsvn_wc/adm_ops.c

(svn_wc_get_pristine_contents2): Update caller.

* subversion/libsvn_wc/copy.c

(copy_pristine_text_if_necessary): Update caller.

* subversion/libsvn_wc/diff.c

(apply_textdelta): Update caller.

* subversion/libsvn_wc/questions.c

(compare_and_verify): Don't do work that we can avoid, by receiving a bit

more information from the caller. If we don't translate and the filesize

doesn't match, don't read the files.

(svn_wc__internal_file_modified_p): Retrieve the filesize and whether we have

properties and pass that to compare_and_verify.

* subversion/libsvn_wc/update_editor.c

(apply_textdelta): Update caller.

* subversion/libsvn_wc/wc-queries.sql


* subversion/libsvn_wc/wc_db.h

(svn_wc__db_pristine_read): Add argument.

* subversion/libsvn_wc/wc_db_pristine.c

(pristine_read_baton_t): Add field.

(pristine_read_txn): Use new query. Set size if requested; allow NULL


(svn_wc__db_pristine_read): Set new argument in baton.

* subversion/libsvn_wc/workqueue.c

(process_commit_file_install): Don't force a sha1 comparison.

* subversion/tests/libsvn_wc/pristine-store-test.c


pristine_delete_while_open): Update caller.

  1. … 12 more files in changeset.