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

Changeset 983649 is being indexed.

In preparation for removing the final bits of the wc-loggy subsystem, remove

some includes of log.h

* subversion/libsvn_wc/adm_ops.c

* subversion/libsvn_wc/copy.c

* subversion/libsvn_wc/lock.c

* subversion/libsvn_wc/merge.c

* subversion/libsvn_wc/node.c

* subversion/libsvn_wc/props.c

* subversion/libsvn_wc/upgrade.c

(includes): Remove log.h

  1. … 6 more files in changeset.
* subversion/libsvn_wc/lock.c.c

(svn_wc__internal_check_wc): Remove shadowing variable.

Don't assume that every node that has a record in a single-db database

is a working copy root. This resolves the regression that you can't

checkout a new working copy over a deleted node in single-db.

(So this fixes 21 for single-db).

Before this patch the wc-db did a simple check to see if a row

existed for the directory node, but this is not the task of the wc-db

layer (which should just return the relevant wcroot info for a working


This patch moves this check to svn_wc__internal_check_wc().

* subversion/libsvn_wc/adm_files.c

(svn_wc__internal_ensure_adm): Update caller. Passing TRUE here fixes 21 for us.

* subversion/libsvn_wc/lock.c

(svn_wc__internal_check_wc): In single-db mode, verify if the directory

is really part of the wc-ng working copy, or if it just some node

below a wcroot.

(svn_wc_check_wc2): Update caller, passing false for compatibility with

before this patch. Add todo marker.


open_single): Update callers, passing FALSE to allow locking missing


* subversion/libsvn_wc/lock.h

(svn_wc__internal_check_wc): Update prototype.

* subversion/libsvn_wc/log.c

(can_be_cleaned): Update caller.

* subversion/libsvn_wc/wc_db.c

(svn_wc__db_temp_get_format): Remove single-db root test.

  1. … 4 more files in changeset.
* subversion/libsvn_wc/lock.c

(acquire_locks_recursively): Following up on r967018, mark variable const.

* subversion/libsvn_wc/lock.c

(acquire_locks_recursively): Fix typo in function name.

(svn_wc__acquire_write_lock): Update caller.

Found by: philip

Revert to the original behavior that locking an unversioned directory is an

error. The current behavior of just ignoring this, moves the real problem

to other locations.

* subversion/libsvn_wc/lock.c

(acquire_locks_recurively): New function, handling the recursive locking

behavior for non-single db with knowledge about whether we are locking

the root or a subdir. Return an error when locking the lock root


(svn_wc__acquire_write_lock): Move the recursive locking behavior to


* subversion/libsvn_wc/wc_db.c

(wclock_obtain_cb): When using single-db verify that the path to lock


  1. … 1 more file in changeset.
Make the lock release code a bit less smart on finding which target a caller

might want to unlock to avoid having to ignore errors on releasing locks on

just deleted directories, or on the wrong target if it just turned from a file

into a directory, etc. etc.

The lock acquire code can now (optionally) always return the path it tried

to acquire a lock on and the unlock code must now alway pass a valid locked

target. (Except for a few specific cases for handling multi-db as single-db)

* subversion/libsvn_wc/wc_db.c

(svn_wc__db_wclock_release): Just allow releasing locks on 'hidden'

directories, in multi db mode. Return an error if neither the node

itself exist, nor its parent.

* subversion/libsvn_wc/update_editor.c

(prep_directory): Update caller.

* subversion/libsvn_wc/lock.c

(svn_wc__acquire_write_lock): Split lock_abspath retrieval from anchor

calculation, to allow callers always access to the lock_root_abspath.

(svn_wc__release_write_lock): If the node is not locked, just unlock it

in wc_db, to allow ignoring errors on not-wcroot directories.

Ignore not-locked on subdirs, but not on the root of the operation.

(svn_wc__call_with_write_lock): Allow locking an anchor of a node. Obtain

the lock_root_abspath and release the lock on this node.

* subversion/libsvn_client/update.c

(update_internal): Don't release locks not obtained here!

(svn_client__update_internal): Store the lock-path and release the lock

on that.

* subversion/libsvn_client/switch.c

(svn_client__switch_internal): Update caller.

* subversion/libsvn_client/revert.c

(svn_client_revert2): Update caller. Lock the anchor of the operation.

* subversion/libsvn_client/prop_commands.c

(svn_client_propset3): Update caller.

* subversion/libsvn_client/patch.c

(svn_client_patch): Update caller.

* subversion/libsvn_client/merge.c



svn_client_merge_peg3): Update callers.

* subversion/libsvn_client/externals.c

(switch_dir_external): On relegating only obtain a lock

and don't release it.

(switch_file_external): Update caller.

(handle_external_item_change): Update caller.

* subversion/libsvn_client/delete.c

(svn_client_delete4): Update caller.

* subversion/libsvn_client/copy.c

(do_wc_to_wc_copies): Update caller.

* subversion/libsvn_client/commit.c

(svn_client_commit5): Update caller.

* subversion/libsvn_client/add.c

(add_parent_dirs): Update caller.

* subversion/include/private/svn_wc_private.h

(svn_wc__acquire_write_lock): Update arguments and documentation.

(svn_wc__release_write_lock): Add new requirements to documentation.

(svn_wc__call_with_write_lock): Add lock_anchor argument.

  1. … 14 more files in changeset.
Following up on r922926, fix an accidental lock release in the lock acquire

code. This fixes the externals tests failures on ra_serf/ra_neon.

* subversion/libsvn_wc/lock.c

(svn_wc__acquire_write_lock): When failing to acquire a lock, don't try

to release obtained locks on non-directories, as that will just release

the parent directory's lock.

* subversion/libsvn_wc/lock.c


Revert some accidentally committed test code accidentally introduced

in r964653.

When using single-db, obtain an infinite depth lock on the root

of the operation instead of a lock on each separate directory

below the root.

* subversion/libsvn_wc/lock.c

(svn_wc__acquire_write_lock): Use infinite depth lock instead of

recursion when we have a single db layout.

[Also adds some experimental test code that shouldn't have

been in this commit. Reverted this part in r964656]

(svn_wc__release_write_lock): Assume we can just release an infinite

depth lock instead of recursing to find locks to release.

* subversion/libsvn_wc/lock.c (child_is_disjoint): Remove unused variables.

* subversion/libsvn_wc/lock.c

(child_is_disjoint): Use svn_wc__db_is_wcroot, to check if a subdir is

registered in its parent instead of reading all nodes in the parent

and checking locally.

Update the wc-db api for wclocks to have a single set of functions for

obtaining and releasing locks instead of a separate function for recording

and for knowing that we own the lock. Also add an initial implementation

for the lock behavior for when we switch to a single database.

* subversion/libsvn_wc/adm_ops.c

(svn_wc_add4): Update caller.

* subversion/libsvn_wc/lock.c

(pool_cleanup_locked): Update caller.

(adm_access_alloc): Update caller.

(close_single): Update caller.

(svn_wc_adm_locked): Update caller.

(svn_wc__write_check): Update caller.

(svn_wc_locked2): Update caller.

(svn_wc__acquire_write_lock): Update caller.

(svn_wc__release_write_lock): Update caller and handle errors

on unlocking when we don't have a lock to keep current behavior.

* subversion/libsvn_wc/log.c

(cleanup_internal): Obtain lock with steal_lock mode, instead of ignoring

the error.

* subversion/libsvn_wc/upgrade.c

(upgrade_to_wcng): Update caller.

* subversion/libsvn_wc/wc-queries.sql

(STMT_FIND_WC_LOCK): New query to obtain existing locks below a

new recursive lock.

* subversion/libsvn_wc/wc_db.c

(relpath_op_depth): New helper function.

(svn_wc__db_temp_forget_directory): Ignore error conditions to

keep current (mostly broken) behavior.

(wclock_obtain_baton): New struct.

(wclock_steal): New helper function.

(wclock_obtain_cb): New transaction helper function.

(svn_wc__db_wclock_set): Renamed to ...

(svn_wc__db_wclock_obtain): ... this. Use a transaction to verify

current recursive locks and obtain a new lock. (Mostly unused in per

directory db layout).

(svn_wc__db_wclock_remove): Renamed to ...

(svn_wc__db_wclock_release): ... this. Verify lock ownership and add

support for single db operations.

(svn_wc__db_temp_mark_locked): Remove function.

(svn_wc__db_temp_own_lock): Rename to ...

(svn_wc__db_wclock_owns_lock): ... this and allow checking for checking a root

and/or multiple levels.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_wclock_set): Rename to ...

(svn_wc__db_wclock_obtain): ... this and document levels_to_lock.

(svn_wc__db_wclocked): Add documentation.

(svn_wc__db_wclock_remove): Rename to ...

(svn_wc__db_wclock_release): ... this.

(svn_wc__db_wclock_owns_lock): New function.

(svn_wc__db_temp_mark_locked): Remove function.

(svn_wc__db_temp_own_lock): Remove function.

* subversion/libsvn_wc/wc_db_pdh.c

(determine_obstructed_file): #undef when using single_db.

(svn_wc__db_pdh_create_wcroot): Initialize new lock store if single db.

(svn_wc__db_pdh_parse_local_abspath): Disable obstruction check on

single db.

* subversion/libsvn_wc/wc_db_private.h

(svn_wc__db_wclock_t): New struct.

(svn_wc__db_wcroot_t): Name struct (for debugging and svn diff -x -p)

Add array of owned locks.

(svn_wc__db_pdh_t): Remove obstructed_file and locked for single db.

  1. … 8 more files in changeset.
* subversion/libsvn_wc/lock.c

(adm_access_alloc): Following up on r958908, only allow creating an

access baton for a locked directory if there is no existing access

baton for that directory attached to the db.

Add a c test to verify that we keep svn_wc_add3() compatibility working

when we move our own code in libsvn_client to a better route.

* subversion/libsvn_wc/lock.c

(adm_access_alloc): Allow obtaining an access baton with lock for a node

that is already locked in the same svn_wc__db_t instance.

* subversion/tests/libsvn_client/client-test.c

(test_wc_add_scenarios): New function: Testing svn_wc_add3() behavior,

to make sure it will be compatible when we move features to deprecated.c.

(test_funcs): Add test_wc_add_scenarios.

  1. … 1 more file in changeset.
Switch the argument order of (the new in 1.7) svn_dirent_split(),

svn_uri_split() and svn_relpath_split() functions to our new standard

order: output arguments before input arguments.

* subversion/include/svn_dirent_uri.h

(svn_dirent_split, svn_relpath_split, svn_uri_split): Reorder arguments.

* subversion/libsvn_client/add.c

* subversion/libsvn_client/commit.c

* subversion/libsvn_client/copy.c

* subversion/libsvn_client/delete.c

* subversion/libsvn_client/diff.c

* subversion/libsvn_client/externals.c

* subversion/libsvn_client/info.c

* subversion/libsvn_client/list.c

* subversion/libsvn_client/locking_commands.c

* subversion/libsvn_client/update.c

* subversion/libsvn_delta/path_driver.c

* subversion/libsvn_subr/dirent_uri.c

* subversion/libsvn_wc/adm_crawler.c

* subversion/libsvn_wc/adm_files.c

* subversion/libsvn_wc/adm_ops.c

* subversion/libsvn_wc/copy.c

* subversion/libsvn_wc/diff.c

* subversion/libsvn_wc/entries.c

* subversion/libsvn_wc/lock.c

* subversion/libsvn_wc/merge.c

* subversion/libsvn_wc/node.c

* subversion/libsvn_wc/old-and-busted.c

* subversion/libsvn_wc/props.c

* subversion/libsvn_wc/update_editor.c

* subversion/libsvn_wc/wc_db.c

* subversion/libsvn_wc/wc_db_pdh.c

* subversion/mod_dav_svn/repos.c

* subversion/svn/util.c

* subversion/tests/libsvn_subr/dirent_uri-test.c

(*): Update callers.

  1. … 29 more files in changeset.
Following up the last batch of commits, remove header includes

and entry modification flags that are no longer used.

* subversion/libsvn_wc/adm_crawler.c

* subversion/libsvn_wc/copy.c

* subversion/libsvn_wc/crop.c

* subversion/libsvn_wc/diff.c

Remove some unused includes of entry.h, lock.h and prop.h

* subversion/libsvn_wc/entries.c

(fold_entry): Remove unused foldings.

(svn_wc__entry_modify_stub): Remove flag.

* subversion/libsvn_wc/entries.h


SVN_WC__ENTRY_MODIFY_DELETED): Remove unused flags.

* subversion/libsvn_wc/lock.c

* subversion/libsvn_wc/log.c

* subversion/libsvn_wc/merge.c

* subversion/libsvn_wc/node.c

* subversion/libsvn_wc/props.c

* subversion/libsvn_wc/relocate.c

* subversion/libsvn_wc/status.c

* subversion/libsvn_wc/tree_conflicts.c

* subversion/libsvn_wc/update_editor.c

* subversion/libsvn_wc/workqueue.c

Remove some unused includes of entry.h, lock.h and prop.h

  1. … 15 more files in changeset.
Teach the WC-NG code to treat (in most cases) a "my parent is a

pre-1.7 working copy" error as merely "my parent isn't a working copy

at all" and degrade gracefully. This allows 1.7 working copies to be

created inside of pre-1.7 working copies.

* subversion/libsvn_wc/wc.h


* subversion/libsvn_wc/status.c

(internal_status): Test returned error with new


* subversion/libsvn_wc/lock.c

(svn_wc__acquire_write_lock): Test returned error with new


* subversion/libsvn_wc/wc_db.c

(svn_wc__db_op_read_tree_conflict, svn_wc__db_temp_op_set_dir_depth,

svn_wc__db_is_wcroot, is_wclocked): Test returned error with new


* subversion/libsvn_wc/update_editor.c

(already_in_a_tree_conflict): Test returned error with new


  1. … 4 more files in changeset.
Follow-up to r920424, don't conflate switched and disjoint WC paths.

r920424 was part of the ongoing wcng work to remove svn_wc_entry_t's, but

in doing so, it changed the behavior of svn_wc__path_switched() such that

disjoint but un-switched paths were erroneously reported as switched, see

* subversion/libsvn_wc/lock.c

(svn_wc__path_switched): Use svn_wc__check_wc_root() rather than

child_is_disjoint() to detect switched paths, returning to the

pre-r920424 behavior.

* subversion/libsvn_wc/lock.c

(add_to_shared): Avoid casting away 'const'.

Minor pool change to use an iterpool as a scratch.

* subversion/libsvn_wc/lock.c:

(svn_wc__release_write_lock): add a comment for clarity, and shift the

creation of the iterpool in order to use it as a scratch_pool for

another function call.

Remove a temporary API. This also allows reverting an added directory which is

the CWD.

* subversion/libsvn_wc/wc.h

(svn_wc__temp_get_relpath): Remove.

* subversion/libsvn_wc/adm_ops.c

(revert_entry): Don't use the API, and in the process, allow a revert of

an added directory if it is the CWD.

(revert_internal): Remove an unused path, and superflous call to the

temp API.

* subversion/libsvn_wc/update_editor.c

(make_editor): Use the anchor_abspath in place of the relpath, and remove

a call to the temp API.

* subversion/libsvn_wc/lock.c

(svn_wc__temp_get_relpath): Remove.

  1. … 3 more files in changeset.
Try to be a bit more clear on what conditions result in what output values

in a function. This also removes the need for a branch or two.

* subversion/libsvn_wc/lock.c

(svn_wc__adm_available): Simply assign the boolean value to the result

of a boolean operation.

Remove some private APIs that libsvn_client no longer requires.

* subversion/include/private/svn_wc_private.h:

* subversion/libsvn_wc/lock.c:

(svn_wc__adm_open_in_context, svn_wc__adm_probe_in_context,

svn_wc__adm_retrieve_from_content): removed

  1. … 1 more file in changeset.
Remove an access baton from an internal API, and use svn_error_return

where applicable.

* subversion/libsvn_wc/adm_files.h:

(svn_wc__adm_area_exists): take an ADM_ABSPATH rather than an access


* subversion/libsvn_wc/adm_files.c:

(svn_wc__adm_area_exists): take an ADM_ABSPATH and record the internals

(svn_wc__sync_text_base, svn_wc__get_revert_contents,

init_adm_tmp_area, svn_wc__adm_cleanup_tmp_area): use svn_error_return

(init_adm): take a REPOS_RELPATH rather than a full URL, and pass that

along to svn_wc__db_init()

(svn_wc__internal_ensure_adm): compute the REPOS_RELPATH here, and pass

it along to init_adm

(svn_wc_create_tmp_file2): switch to use DB to get a tempdir, to ensure

this function works after a switch to single-db.

* subversion/libsvn_wc/lock.c:

(pool_cleanup_locked, close_single): adjust params to adm_area_exists

  1. … 2 more files in changeset.
Now that libsvn_client does not use svn_wc_adm_access_t (YAY!), we can

completely deprecate the entire API.

Also ensured that all functions using the type are properly deprecated.

* subversion/include/svn_wc.h:

(svn_wc_adm_retrieve, svn_wc_adm_probe_retrieve, svn_wc_adm_close2,

svn_wc_adm_access_path, svn_wc_adm_access_pool): deprecate

(svn_wc_crawl_revisions4): fixed style of deprecation

(svn_wc_crawl_revisions3): add missing deprecation

(svn_wc_transmit_text_deltas3): add missing deprecation

* subversion/libsvn_wc/lock.c:

(...): add comments to some functions, noting they are deprecated. these

are not moved to deprecated.c, which is really reserved for just

wrappers around newer functions. we don't want to place "bulk" logic

into that file.

  1. … 1 more file in changeset.
* subversion/libsvn_wc/lock.c

(svn_wc__adm_missing): Remove yet more unused cruft. Followup to r927176.

Remove an unneeded function.

* subversion/libsvn_wc/lock.c,


(svn_wc__adm_extend_lock_to_tree): Remove.

  1. … 1 more file in changeset.
* subversion/libsvn_wc/lock.c

(svn_wc__adm_access_entries): Allow entry caching to be disabled.

* subversion/libsvn_wc/lock.c

(svn_wc__acquire_write_lock): Release all acquired locks.