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

Changeset 1125429 is being indexed.

Remove some ### markers by simple code rearrangement. No functional changes.

* subversion/libsvn_wc/lock.c:

(do_close): needless forward decl removed

(add_to_shared, get_from_shared, close_single): moved further up the

file in order to remove forward declarations.

* subversion/libsvn_wc/workqueue.c:

(dispatch_work_item): needless forward decl removed

(svn_wc__wq_build_file_copy_translated): remove ### comment since we are

already translating to relative paths

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

(missing): Silence a warning: Constant objects should be initialized.

Add three more arguments to our function with the most arguments. Do this to

allow handling more operations with a single read transaction and to allow

fixing code that should know about multiple WORKING layers.

This patch adds the following three new (optional) boolean output arguments:

had_props - Does it have pristine properties

op_root - Is it a layer defining operation

have_more_work - Does it have multiple working layers

Because I had to update all callers anyway, I moved a few arguments to a more

sensible location. (See the wc_db.h change for more information on that).

This patch just updates the callers to get the same information as before.

No functional changes in any of the callers.

* subversion/libsvn_wc/adm_crawler.c





read_and_checksum_pristine_text): Update callers.

* subversion/libsvn_wc/adm_files.c



svn_wc__internal_ensure_adm): Update callers.

* subversion/libsvn_wc/adm_ops.c









svn_wc__internal_changelist_match): Update callers.

* subversion/libsvn_wc/ambient_depth_filter_editor.c

(ambient_read_info): Update caller.

* subversion/libsvn_wc/cleanup.c

(repair_timestamps): Update caller.

* subversion/libsvn_wc/conflicts.c

(recursive_resolve_conflict): Update caller.

* subversion/libsvn_wc/copy.c


svn_wc_copy3): Update callers.

* subversion/libsvn_wc/crop.c



svn_wc_crop_tree2): Update callers.

* subversion/libsvn_wc/diff.c








* subversion/libsvn_wc/entries.c




* subversion/libsvn_wc/lock.c



child_is_disjoint): Update callers.

* subversion/libsvn_wc/node.c
























svn_wc__node_get_commit_status): Update callers.

* subversion/libsvn_wc/props.c



svn_wc__props_modified): Update callers.

* subversion/libsvn_wc/questions.c




svn_wc__expand_keywords): Update caller.

* subversion/libsvn_wc/relocate.c

(svn_wc_relocate4): Update callers.

* subversion/libsvn_wc/status.c


internal_status): Update callers. Avoid C++ keyword mutable.

* subversion/libsvn_wc/translate.c

(svn_wc__expand_keywords): Update callers.

* subversion/libsvn_wc/update_editor.c










* subversion/libsvn_wc/wc_db.c

(read_info): Update argument list of prototype.



temp_op_delete_txn): Update callers.

(read_info): Update argument list and calculate new values.

(svn_wc__db_read_info): Update argument list and update caller.




has_switched_subtrees): Update callers.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_read_info): Update, extend and cleanup documentation. Update argument


* subversion/libsvn_wc/workqueue.c



run_file_install): Update callers.

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


test_global_relocate): Update callers.

  1. … 21 more files in changeset.
Silence a bunch of deprecation warnings. These are expected, and not going

away anytime soon.

* subversion/libsvn_wc/lock.c:

Define SVN_DEPRECATED prior to any includes.

Fix issue #3843 ("file externals cause non-inheritable mergeinfo") on

trunk. (A fix was already made for the 1.6.x line.)

* subversion/include/private/svn_wc_private.h

(svn_wc__path_switched): Remove as unused.

(svn_wc__get_mergeinfo_walk_info): Add 'is_switched' and

'is_file_external' return parameters.

* subversion/libsvn_wc/lock.c

(svn_wc__path_switched): Remove as unused.

* subversion/libsvn_wc/node.c

(svn_wc__get_mergeinfo_walk_info): Add 'is_switched' and

'is_file_external' return parameters (and do the needful to return

them accurately).

* subversion/libsvn_client/merge.c

(get_mergeinfo_walk_cb): Update call to svn_wc__get_mergeinfo_walk_info(),

losing logic that's now encapsulated in that function and making

use of its is-file-external determination.

* subversion/tests/cmdline/

(merge_target_with_externals): Drop @XFail() decorator.

  1. … 4 more files in changeset.
Fold a one-line function into its callsites.

* subversion/libsvn_wc/lock.c

(alloc_db): Remove.

(pool_cleanup_locked, svn_wc_adm_open3, open_anchor): Call

svn_wc__db_open() directly.

Remove svn_wc__db_openmode_t and its references. We no longer use it, and

SQLite handles its functionality for us automatically.

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

(create_open): Remove smode param, and don't use it to open the database.

(test_getting_info, test_inserting_nodes, test_children, test_working_info,

test_pdh, test_scan_addition, test_scan_deletion, test_global_relocate,

test_work_queue): Update callers.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_openmode_t): Remove.

(svn_wc__db_open): Remove openmode_t param, and update docstring.

* subversion/libsvn_wc/wc_db_wcroot.c

(svn_wc__db_open): Remove param, and don't set it in the struct.

* subversion/tests/libsvn_wc/entries-compat.c


* subversion/libsvn_wc/adm_ops.c


* subversion/libsvn_wc/adm_files.c


* subversion/libsvn_wc/context.c


* subversion/libsvn_wc/upgrade.c


* subversion/libsvn_wc/cleanup.c


* subversion/libsvn_wc/lock.c

(alloc_db, svn_wc_adm_probe_open3):

Update callers.

* subversion/libsvn_wc/wc_db_private.h

(svn_wc__db_t): Remove mode member.

  1. … 10 more files in changeset.
Stylistic changes only.

* subversion/libsvn_wc/lock.c:

(svn_wc__acquire_write_lock): add a blank line to separate declarations

from the code. add comments to the params in the obtain() call.

(svn_wc__call_with_write_lock): add blank line between decls and code

* subversion/libsvn_wc/wc_db_private.h:

(...): add a few blank lines

(svn_wc__db_wcroot_t): fix OWNED_LOCKS description

  1. … 1 more file in changeset.
Just padding my stats.

(Actually, doing my regular trailing whitespace removal, similar to r875968.)

* everywhere:

for extsn in c h cpp java py pl rb; do

sed -i -e 's/[ \t]*$//' `find . -name "*.$extsn" | xargs grep '[ \t]$' -l`


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

(open_single): Replace an error report that 'should never be reached' with

an assertion.

Remove obsolete multi-db code.

* subversion/libsvn_wc/lock.c

(svn_wc__internal_check_wc, svn_wc__acquire_write_lock,

svn_wc__release_write_lock): Remove conditional multi-db code.

(adm_available): Remove OBSTRUCTED parameter, remove conditional

multi-db code.

(do_open, open_anchor): Adjust call to adm_available, remove conditional

multi-db code.

(acquire_locks_recursively): Remove.

Remove the remaining checks for obstruction statee in libsvn_wc. These

statee are no longer returned from the wc_db api since we switched to

single-db. This is a a final cleanup step before removing some parts

of the multi-db support.

No functional change.

* subversion/libsvn_wc/adm_crawler.c

(report_revisions_and_depths): Disable check for obstructed.

* subversion/libsvn_wc/adm_files.c

(svn_wc__get_pristine_contents): Disable check for obstructed and

remove base-deleted check (value is wc_db internal).

(svn_wc__internal_ensure_adm): Disable check for obstructed.

* subversion/libsvn_wc/adm_ops.c



svn_wc_add4): Disable obstructed status checks.

* subversion/libsvn_wc/copy.c

(svn_wc_copy3): Disable obstructed check.

* subversion/libsvn_wc/crop.c


svn_wc_crop_tree2): Disable obstructed checks.

* subversion/libsvn_wc/diff.c

(file_diff): Remove obstructed check (file couldn't be obstructed)

* subversion/libsvn_wc/entries.c


read_one_entry): Disable obstructed checks.

* subversion/libsvn_wc/lock.c

(adm_available): Disable obstructed checks.

* subversion/libsvn_wc/node.c









svn_wc__internal_node_get_schedule): Disable checks for obstructed statee.

* subversion/libsvn_wc/props.c

(svn_wc__get_pristine_props): Disable check for obstructed.

* subversion/libsvn_wc/revision_status.c

(analyze_status): Disable check for obstructed status.

* subversion/libsvn_wc/status.c

(internal_status): Disable obstructed test.

* subversion/libsvn_wc/update_editor.c




add_directory): Disable obstructed checks.

* subversion/libsvn_wc/workqueue.c


log_do_committed): Disable obstructed checks.

  1. … 13 more files in changeset.
Remove the svn_wc__adm_missing() and svn_wc__adm_available() transitational

apis by properly checking for an obstructions status in the last two

remaining callers.

* subversion/libsvn_wc/adm_ops.c

(revert_entry): Check for the exact obstruction type.

(svn_wc__internal_remove_from_revision_control): Retrieve status and use that

for obstruction decisions.

* subversion/libsvn_wc/lock.c

(svn_wc__adm_available): Make static and rename to ...

(adm_available): ... this.

(do_open): Update caller.

(open_anchor): Update caller.

(svn_wc__adm_missing): Remove function.

* subversion/libsvn_wc/lock.h


svn_wc__adm_available): Remove functions.

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

(svn_wc__adm_available): Stop checking for depth excluded, as that is

already covered by status excluded.

* subversion/libsvn_wc/lock.c

(svn_wc__release_write_lock): Don't define variables in single-DB mode

that aren't used in single-DB mode.

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.