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

Changeset 1366027 is being indexed.

* subversion/libsvn_wc/adm_ops.c

(process_committed_leaf): As commit handles committing to the BASE layer

it should just use the base remove function. In this case both remove

functions have the same effect as the function only opperates on deletes

that directly apply on BASE nodes.

* subversion/libsvn_wc/adm_ops.c

(process_committed_leaf): Remove two unused local variables.

Replace the very wc-1.0 style svn_wc__internal_remove_from_revision_control

function with an atomic wc-ng function. This makes operations like reducing the

depth of a working copy or removing externals from a wc atomic by performing

a db operation and installing workqueue items.

* subversion/libsvn_client/externals.c

(relegate_dir_external): Obtain lock here that was obtained in the caller.

Properly handle working copy renames.

(switch_dir_external): Remove function that has been moved to the callee.

* subversion/libsvn_wc/adm_ops.c

(process_committed_leaf): Update caller.

* subversion/libsvn_wc/crop.c

(includes): Include workqueue.h.

(IGNORE_LOCAL_MOD): Remove now unused macro.

(crop_children): Use db operation directly.

(svn_wc_exclude): Use db operation directly. Avoid second db operation

by passing absent information.

(svn_wc_crop_tree2): Update caller. Run workqueue.

* subversion/libsvn_wc/externals.c

(svn_wc__external_remove): If we leave an external, leave the whole external

by using the fail early mode.

* subversion/libsvn_wc/wc-queries.sql



STMT_DELETE_NODE): New queries.

* subversion/libsvn_wc/wc_db.c

(remove_node_baton): Add fields for new options.

(remove_node_txn): Add code to create workqueue items for nodes that exist

on disk. Provide cancellation checking when checking for changes.

Allow setting excluded and not-present.

(svn_wc__db_op_remove_node): Update caller.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_op_remove_node): Update prototype and documentation.

  1. … 6 more files in changeset.
Handle an currently always FALSE argument of svn_wc_remove_from_revision_control2

in the public wrapper to make it easier to switch the implementation to an

atomic operation.

* subversion/libsvn_wc/adm_ops.c

(svn_wc__internal_remove_from_revision_control): Remove instant_error argument,

assume its value is false trough this function.

(remove_from_revision_status_callback): New function, implementing

instant_error as status walker callback.

(svn_wc_remove_from_revision_control2): Walk status before calling

svn_wc__internal_remove_from_revision_control when instant_error is true.

* subversion/libsvn_wc/crop.c

(crop_children): Update caller.

* subversion/libsvn_wc/wc.h

(svn_wc__internal_remove_from_revision_control): Remove argument.

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

(revert_partial): Verify type of the child for depth processing (instead

of type of the parent *directory*). This fixes the problem checked for

since r1365549.

Make 'svn rm' remove externals registrations below its targets.

We allow deleting parents of file externals (as we allow deleting

directories that contain switched paths) and directories that have

directory externals somewhere below them.

This patch removes the registration in the EXTERNALS table and for

file externals the entire file external so the next update will find

a normal working copy.

The new behavior is more what users expect, reduces the number of strange

database states and resolves some regressions since 1.6.

Suggested by: Dmitry Pavlenko <pavlenko{_AT_}>

* subversion/libsvn_wc/adm_ops.c

(svn_wc__delete_internal): Update caller.

* subversion/libsvn_wc/update_editor.c

(delete_entry): Update caller.

* subversion/libsvn_wc/wc-queries.sql




* subversion/libsvn_wc/wc_db.c

(op_delete_baton_t): Add delete_dir_externals.

(delete_node): Delete externals if necessary.

(op_delete_many_txn): Update caller.

(svn_wc__db_op_delete): Pass delete_dir_externals.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_op_delete): Add delete_dir_externals argument and update


(svn_wc__db_op_delete_many): Update documentation.

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

(do_delete): Update caller.

(copy_file_externals): Update expected result.

  1. … 5 more files in changeset.
Make svn_wc__delete_many properly handle deletions of multiple targets with

conflict markers by storing them in a guaranteed stable way.

Instead of fixing the original logic to store markers from multiple targets

just create work items to make svn_wc__delete and svn_wc__delete_many

handle all deletes in an atomic way.

* subversion/libsvn_wc/adm_ops.c

(create_delete_wq_items): New function, extracted from ...


svn_wc__delete_internal): ... these functions which now just install wq

items instead of using in-memory state.

* subversion/libsvn_wc/wc_db.c

(op_delete_many_baton_t): Add work_items and delete_dir_externals flags.

(op_delete_many_txn): Install work items and note a todo.

(svn_wc__db_op_delete_many): Update caller.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_op_delete_many): Add arguments.

  1. … 2 more files in changeset.
Following up on r1357929, also add conflict and work_items to

svn_wc__db_op_delete(). This allows reinstalling the tree_conflict

again in the update_editor for when it has just been deleted.

Avoid setting up and removing the notification table if no

notifications are required, such as from the update editor.

* subversion/libsvn_wc/adm_ops.c

(svn_wc__delete_internal): Update caller.

* subversion/libsvn_wc/update_editor.c

(delete_entry): Update caller.

(add_directory): Update caller. Pass conflict.

* subversion/libsvn_wc/wc_db.c

(op_delete_baton_t): Add variables.

(delete_node): Allow setting work_items and conflict. Make notify

handling optional.

(svn_wc__db_op_delete): Reorder arguments. Optimize non-notify case

Allow setting work_items and conflict.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_op_delete): Reorder arguments as suggested by TODO. Add standard


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

(do_delete): Update caller.

  1. … 4 more files in changeset.
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.

  1. … 3 more files in changeset.
Replace all calls to svn_wc__db_read_conflicts() by a call to a new

svn_wc__read_conflicts() to allow switching more of the wc_db api to

conflict skels in a future patch.

No functional changes, but removes some dead code.

* subversion/include/private/svn_wc_private.h

(svn_wc__node_get_conflict_info): Remove unused function.

* subversion/libsvn_wc/adm_ops.c


svn_wc__delete_internal): Update caller.

* subversion/libsvn_wc/conflicts.c

(svn_wc__read_conflicts): New function.


conflict_status_walker): Update caller.

* subversion/libsvn_wc/copy.c


remove_node_conflict_markers): Update caller.

* subversion/libsvn_wc/entries.c

(read_one_entry): Update callers.

* subversion/libsvn_wc/info.c


svn_wc__get_info): Update callers.

* subversion/libsvn_wc/node.c

(svn_wc__node_get_conflict_info): Remove function.

* subversion/libsvn_wc/props.c

(svn_wc__get_prejfile_abspath): Remove function.

* subversion/libsvn_wc/questions.c

(svn_wc__internal_conflicted_p): Update caller.

* subversion/libsvn_wc/tree_conflicts.c

(svn_wc__get_tree_conflict): Update caller.

* subversion/libsvn_wc/wc.h

(svn_wc__read_conflicts): New function.

* subversion/libsvn_wc/workqueue.c


run_set_property_conflict_marker): Update callers.

  1. … 11 more files in changeset.
Teach the get_wc_content() RA callback and supporting code to handle

MD5 checksums as content indexes, too. This *should* result in the

benefits of this enhancement extending to users of all 1.8 clients

irrespective of the server's pedigree, as MD5s have been in the server

streams since ... like ... forever.

* subversion/include/svn_ra.h

(svn_ra_get_wc_contents_func_t): Rename 'sha1_checksum' to merely

'checksum', and relax the requirement that SHA1 be the checksum

algorithm used to call up cached pristine contents.

* subversion/libsvn_client/ra.c

(get_wc_contents): Rename 'sha1_checksum' to 'checksum'.

* subversion/libsvn_ra_serf/update.c

(fetch_file): If we don't have a SHA1 checksum to use, that's okay

-- try the MD5 instead (which we definitely should have for all

extant servers).

* subversion/include/private/svn_wc_private.h

(svn_wc__get_pristine_contents_by_checksum): Rename 'sha1_checksum'

to 'checksum'.

* subversion/libsvn_wc/adm_ops.c

(get_pristine_lazyopen_baton_t): Rename 'sha1_checksum' to 'checksum'.

(get_pristine_lazyopen_func): If the reference checksum isn't a

SHA1, try to lookup the SHA1 based on what we have.

(svn_wc__get_pristine_contents_by_checksum): Rename 'sha1_checksum'

to 'checksum'.

Suggested by: gstein

  1. … 4 more files in changeset.
Add a blank line between declarations and statements where r1352068 didn't.

* subversion/libsvn_client/deprecated.c,











Add blank lines.

  1. … 10 more files in changeset.
Do not use non-constant initializers in struct variables, since this

violates C'89 and C'90. Although most compilers used for Subversion support

non-constant initializers, some do not, such as Solaris SunPRO.

Patch by: Daniel Richard G. <skunk{_AT_}iSKUNK.ORG>

(tweaked by me: added a similar change in auth.c)

* subversion/libsvn_client/deprecated.c

(svn_client_propset3, svn_client_status4): Initialize struct variable

fields separately when they are non-constant.

* subversion/libsvn_client/info.c

(svn_client_info3): Same.

* subversion/libsvn_client/merge.c

(merge_locked, do_symmetric_merge_locked): Same.

* subversion/libsvn_diff/diff_file.c

(svn_diff_file_options_parse): Same.

* subversion/libsvn_fs_fs/fs_fs.c

(set_cached_window, svn_fs_fs__set_entry): Same.

* subversion/libsvn_fs_fs/lock.c

(walk_locks): Same.

* subversion/libsvn_subr/auth.c

(svn_auth_get_platform_specific_provider): Same.

* subversion/libsvn_subr/sqlite.c

(wrapped_func): Same.

* subversion/libsvn_wc/adm_ops.c

(svn_wc_get_changelists): Same.

* subversion/libsvn_wc/props.c

(svn_wc__prop_list_recursive, svn_wc_prop_set4): Same.

* subversion/libsvn_wc/upgrade.c

(svn_wc__upgrade_sdb): Same.

* subversion/libsvn_wc/wc_db.c

(svn_wc__db_op_set_changelist, svn_wc__db_revert_list_read, read_url,

svn_wc__db_revision_status): Same.

* subversion/libsvn_wc/wc_db_util.c

(svn_wc__db_with_txn): Same.

* subversion/svn/merge-cmd.c

(merge_reintegrate): Same.

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

(proc_found, run_procs): Same.

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

(wc_update, check_db_rows, copy_subtest_t, wc_wc_copies, repo_wc_copies):


  1. … 15 more files in changeset.
Make svn_wc__db_read_kind() handle processing 'hidden', just like

svn_wc_read_kind(). This allows making the lock processing to disallow

locking hidden directories, which in turn fixes the

update_with_parents_and_exclude() test.

* subversion/libsvn_wc/adm_crawler.c

(svn_wc__internal_transmit_prop_deltas): Update caller.

* subversion/libsvn_wc/adm_ops.c

(svn_wc__process_committed_internal): Update caller.

* subversion/libsvn_wc/deprecated.c

(svn_wc_add3): Update caller.

* subversion/libsvn_wc/diff_local.c

(svn_wc_diff6): Update caller.

* subversion/libsvn_wc/lock.c


svn_wc_adm_probe_retrieve): Update caller.

(svn_wc__acquire_write_lock): Update caller. This fixes the update test.

* subversion/libsvn_wc/util.c

(svn_wc__fetch_kind_func): Update caller.

* subversion/libsvn_wc/wc_db.c

(svn_wc__db_read_kind): Add argument and retrieve and process status if hidden

nodes shouldn't show up as files or directories.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_read_kind): Update prototype and argument documentation.

  1. … 7 more files in changeset.
Revert should not change permissions of files with svn:needs-lock in

copied directories.

* subversion/libsvn_wc/adm_ops.c

(revert_restore): Only handle svn:needs-lock if status is normal.

* subversion/tests/cmdline/

(revert_permissions_only: Extend.

Found by: Fergus Slorach <>

  1. … 1 more file in changeset.
Follow-up to r1335566:

* subversion/include/svn_io.h,

* subversion/libsvn_subr/stream.c

(svn_stream_lazyopen_create): Tweak function signature and behavior

to just return the stream directly (rather than an error).

* subversion/libsvn_wc/adm_ops.c

(svn_wc__get_pristine_contents_by_checksum): Update call to


Suggested by: gstein

  1. … 2 more files in changeset.
Avoid opening pristine store file handles until they are actually


* subversion/libsvn_wc/adm_ops.c

(get_pristine_lazyopen_baton_t): New private callback baton type.

(get_pristine_lazyopen_func): Callback implementation.

(svn_wc__get_pristine_contents_by_checksum): Use the new lazyopen

stream mechanics to avoid opening a file handle to the pristine

contents until it's first really needed.

Suggested by: gstein

Follow-up to r1333936, with some tweaks which follow from post-commit


* subversion/include/private/svn_wc_private.h,

* subversion/libsvn_wc/adm_ops.c

(svn_wc__get_pristine_contents_by_checksum): Replace 'wcroot_abspath'

with 'wri_abspath'.

* subversion/libsvn_client/ra.c

(callback_baton_t): Lose unused 'wcroot_abspath' member. Add a new,

temporary (hopefully) 'base_dir_isversioned' member (with

explanation regarding its purpose and temporariness).

(get_wc_contents): Use the baton's 'base_dir_abspath' and

'base_dir_isversioned' members now instead of the (now removed)

'wcroot_abspath'. Also, constify the input checksum.

(svn_client__open_ra_session_internal): Don't calculate a

wcroot_abspath. Instead, remember whether the provided

base_dir_abspath is actually versioned (which will help the

get_wc_contents() callback avoid assuming that it is later).

* subversion/include/svn_ra.h

(svn_ra_get_wc_contents_func_t): Constify 'sha1_checksum'.

* subversion/libsvn_ra_serf/update.c

(local_fetch): Use svn_txdelta_send_stream() instead of a custom

window-building loop. Also, fix error message to mention the

correct request type (HEAD).

Suggested (mostly) by: gstein

  1. … 4 more files in changeset.
Teach libsvn_ra_serf to make use of the server-provided SHA1 checksums

I introduced in 1.7 (iff they are provided, of course) to avoid

downloading server content that's already locally available.

* subversion/include/private/svn_wc_private.h,

* subversion/libsvn_wc/adm_ops.c

(svn_wc__get_pristine_contents_by_checksum): New function.

* subversion/include/svn_ra.h

(svn_ra_get_wc_contents_func_t): New callback type.

(svn_ra_callbacks2_t): Add get_wc_contents vtable member.

* subversion/libsvn_client/ra.c

(callback_baton_t): Add 'wcroot_abspath' member.

(get_wc_contents): New function.

(svn_client__open_ra_session_internal): Initialize new

'get_wc_contents' baton member.

* subversion/libsvn_ra_serf/update.c

(report_ctx_t): Add 'cached_contents' member.

(local_fetch, handle_local_fetch): New functions.

(fetch_file): Use the 'get_wc_contents' RA callback to check for a

local copy of the file contents whose SHA1 checksum we are about to

fetch from the server. If we've got those contents already, read

them (via the callback-returned stream) instead of from the network.

  1. … 4 more files in changeset.
Move private API declarations from svn_hash_private.h to

svn_subr_private.h. Also, fix serf build.

* subversion/include/private/svn_hash_pivate.h


* subversion/include/private/svn_subr_pivate.h

(svn_hash__clear, svn_hash__get_cstring, svn_hash__get_bool,

svn_hash__make, svn_hash__make_fast): move here

* subversion/libsvn_client/merge.c,











include subversion/include/private/svn_subr_pivate.h

Suggested by: gstein

Found by: gstein

  1. … 12 more files in changeset.
Move private svn_hash API to a private header.

* subversion/include/svn_hash.h

(svn_hash__clear, svn_hash__get_cstring, svn_hash__get_bool):

move from here ...

* subversion/include/private/svn_hash_private.h

... to here; new file

* subversion/libsvn_client/merge.c,








subversion/svnrdump/dump_editor.c: include new private header

  1. … 10 more files in changeset.
Purge trailing whitespace, in the spirit of r1138109.

  1. … 97 more files in changeset.
When deleting multiple targets don't use the conflict status of the last

target to determine whether to remove conflict files for other targets.

* subversion/libsvn_wc/adm_ops.c

(svn_wc__delete_many): Reduce scope of variable.

* subversion/tests/cmdline/

(verify_file_deleted): Qualify name.

(delete_conflicts_one_of_many): New test.

(test_list): Add new test.

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

(svn_wc__delete_many): Initialize a couple of variables, which could have

theoretically been referenced in an uninitialized state.

For issues #4102 and #4120, fix a symlink problem in 'svn revert'.

If the reverted node is a symlink pointing to a directory external,

the symlink would be re-created as a directory. Also, svn would abort

with a "disk I/O error" error, leaving the external working copy locked

so it required cleanup.

* subversion/libsvn_wc/adm_ops.c

(revert_restore): Preserve symlinks pointing at directories.

Fix an 'svn revert' assert caused by accessing the wrong memory.

* subversion/libsvn_wc/adm_ops.c

(compare_revert_list_copied_children): Cast to the correct pointer type.

Allow deletion of multiple, potentially non-nested, targets from a working

copy within a single sqlite transaction. Should improve performance of

'svn rm dir/*', especially on NFS.

For now, this change only adds new APIs based on existing single-target APIs.

The new APIs lack support for moves. This avoids having to update all callers

of existing APIs, as well as making a backport to 1.7 easier.

Later, we could merge the single-target APIs with these new ones.

No public APIs have been changed.

Reported by: Michael Rytting

* subversion/include/private/svn_wc_private.h

(svn_wc__delete_many): Declare.

* subversion/libsvn_wc/adm_ops.c

(svn_wc__delete_many): New. Based on svn_wc__delete_internal().

* subversion/libsvn_wc/wc_db.c

(op_delete_txn): Move most code in this function ...

(delete_node): ... to here. The difference being that delete_node() does

not clear the delete-list from the DB, so it can be called multiple

times to delete a number of nodes.

(op_delete_many_txn, op_delete_many_baton_t): New. Creates a new delete-list

in the DB and then calls delete_node() for each deletion target.

(svn_wc__db_op_delete_many): New. This function asserts that all

deletion-targets share a common working copy root, locks the entire

working copy, and calls op_delete_many_txn() within an sqlite transaction.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_op_delete_many): Delcare.

* subversion/libsvn_client/delete.c

(svn_client__wc_delete_many): New.

(delete_with_write_lock_baton): Change the PATH member to a TARGETS list.

(delete_with_write_lock_func): Adjust per above change.

(svn_client_delete4): Instead of looping over the target list and calling

the delete_with_write_lock_func() for each, group targets by wcroots

and pass the entire target list for each wcroot down to lower layers.

* subversion/libsvn_client/client.h

(svn_client__wc_delete_many): Declare.

  1. … 5 more files in changeset.
Fix issue 4042, commit of incomplete directory asserts.

* subversion/libsvn_wc/adm_ops.c

(process_committed_leaf): Allow incomplete nodes.

* subversion/libsvn_wc/wc_db.c

(commit_node): Preserve incomplete status.

* subversion/tests/libsvn_wc/wc-incomplete-tester.c: New.

* build.conf

(wc-incomplete-tester): New.

* subversion/tests/cmdline/svntest/

(wc_incomplete_tester_binary, run_wc_incomplete_tester): New.

* subversion/tests/cmdline/svntest/

(set_incomplete): New.

* subversion/tests/cmdline/

(commit_incomplete): New.

(test_list): Add new test.

  1. … 6 more files in changeset.
During updates, auto-merge newly added directories into locally moved-away


* subversion/libsvn_wc/update_editor.c

(dir_baton, make_dir_baton): Add MOVED_TO_OP_ROOT_ABSPATH.

(open_root, open_directory): Scan for the op-root of a move as well

as the moved-to abspath of the directory itself.

(add_directory): If the parent directory was moved-away, prepare to add

the incoming directory at the new location by constructing a moved-to

abspath for the incoming directory. Also remember the op-root of the move.

Use the moved-to abspath in notifications if applicable.

(close_directory): After completing an update of a moved-away directory

at the pre-move location, perform an in-DB copy of the directory meta

data to the post-move location and ensure that move information stays

present. Also make sure that it exists on disk at the post-move location.

This also handles incoming directories which are added as children

of moved-away directories.

* subversion/libsvn_wc/wc_db.c,


(svn_wc__db_op_copy_dir): Add new parameter IS_MOVE, used by

update_editor.c:close_directory() to properly copy op-roots of moves.

* subversion/libsvn_wc/adm_ops.c

(svn_wc_add4): Update caller of svn_wc__db_op_copy_dir().

  1. … 3 more files in changeset.
Followup to r1181800 by removing the svn_wc__db_kind_t type and replacing it

with the now-public svn_kind_t. This just affects the internals of libsvn_wc,

not any of the public, or quasi-public APIs.

* subversion/tests/libsvn_wc/:


  1. … 31 more files in changeset.