Checkout Tools
  • last updated 8 hours ago
Constraints: committers
Constraints: files
Constraints: dates
Remove an unused field in merge code.

There is no code anywhere that sets this flag. There was in svn 1.6, but

not in svn 1.7 and later.

For issue #4859 "Merge removing a folder with non-inheritable mergeinfo ->

E155023: can't set properties: invalid status for updating properties".

* subversion/libsvn_client/mergeinfo.h

(svn_client__merge_path_t): Remove 'scheduled_for_deletion' field.

* subversion/libsvn_client/merge.c

(remove_absent_children): Remove reference to it.

Fix issue #4859 "Merge removing a folder with non-inheritable mergeinfo ->

E155023: can't set properties: invalid status for updating properties".

The code was attempting to set mergeinfo on a path that is being deleted by

the merge. This happened only in certain unusual cases such as when

deleting a folder that had non-inheritable mergeinfo and had children.

This patch fixes the problem by removing the 'children_with_mergeinfo'

entries for sub-paths of a deleted folder.

* subversion/libsvn_client/merge.c

(merge_cmd_baton_t): Allow modifying 'children_with_mergeinfo'.

(record_update_delete): Remove from 'children_with_mergeinfo' all paths

in the subtree.

* subversion/tests/cmdline/

(merge_deleted_folder_with_mergeinfo): Remove 'XFail'.

(merge_deleted_folder_with_mergeinfo_2): New test.

(test_list): Add the new test.

  1. … 1 more file in changeset.
svnmucc: Change an error message to state another possible cause of the error.

Fixes issue #4854.

* subversion/libsvn_client/mtcc.c

(mtcc_verify_create): Reword error message.

* subversion/tests/cmdline/

(svnmucc_type_errors, svnmucc_propset_and_put): Update expectations.

  1. … 1 more file in changeset.
Fix various typos detected by codespell

* libsvn_client/add.c, libsvn_client/blame.c, libsvn_client/commit_util.c,

libsvn_client/conflicts.c, libsvn_client/copy.c, libsvn_client/diff.c,

libsvn_client/export.c, libsvn_client/import.c, libsvn_client/merge.c,

libsvn_client/mergeinfo.c, libsvn_client/mergeinfo.h, libsvn_client/patch.c,

libsvn_client/switch.c, libsvn_client/update.c, libsvn_delta/branch_compat.c,

libsvn_delta/compat.c, libsvn_delta/compose_delta.c, libsvn_delta/svndiff.c,

libsvn_delta/xdelta.c, libsvn_diff/deprecated.c, libsvn_diff/diff_file.c,

libsvn_fs/fs-loader.c, libsvn_fs_base/bdb/locks-table.c, libsvn_fs_base/fs.c,

libsvn_fs_base/key-gen.c, libsvn_fs_base/notes/fs-history,

libsvn_fs_base/reps-strings.c, libsvn_fs_base/tree.c,

libsvn_fs_fs/cached_data.c, libsvn_fs_fs/hotcopy.c, libsvn_fs_fs/index.c,

libsvn_fs_fs/low_level.c, libsvn_fs_fs/pack.c, libsvn_fs_fs/structure,

libsvn_fs_fs/temp_serializer.c, libsvn_fs_fs/transaction.c,

libsvn_fs_fs/tree.c, libsvn_fs_fs/util.h, libsvn_fs_x/cached_data.c,

libsvn_fs_x/caching.c, libsvn_fs_x/hotcopy.c, libsvn_fs_x/id.h,

libsvn_fs_x/index.c, libsvn_fs_x/low_level.c, libsvn_fs_x/pack.c,

libsvn_fs_x/rev_file.c, libsvn_fs_x/structure, libsvn_fs_x/temp_serializer.c,

libsvn_fs_x/transaction.c, libsvn_fs_x/tree.c, libsvn_fs_x/util.h,

libsvn_ra/ra_loader.c, libsvn_ra/ra_loader.h, libsvn_ra/util.c,

libsvn_ra/wrapper_template.h, libsvn_ra_local/ra_plugin.c,

libsvn_ra_serf/commit.c, libsvn_ra_serf/get_file.c,

libsvn_ra_serf/property.c, libsvn_ra_serf/ra_serf.h, libsvn_ra_serf/update.c,

libsvn_ra_serf/util.c, libsvn_ra_svn/client.c, libsvn_ra_svn/cyrus_auth.c,

libsvn_ra_svn/marshal.c, libsvn_repos/authz_parse.c, libsvn_repos/commit.c,

libsvn_repos/compat.c, libsvn_repos/hooks.c, libsvn_repos/load.c,

libsvn_repos/log.c, libsvn_repos/notify.c, libsvn_repos/repos.c,

libsvn_repos/repos.h, libsvn_subr/cache-memcache.c, libsvn_subr/cmdline.c,

libsvn_subr/config_file.c, libsvn_subr/date.c, libsvn_subr/gpg_agent.c,

libsvn_subr/io.c, libsvn_subr/object_pool.c, libsvn_subr/path.c,

libsvn_subr/prompt.c, libsvn_subr/string.c, libsvn_subr/sysinfo.c,

libsvn_subr/temp_serializer.c, libsvn_subr/utf.c, libsvn_subr/utf8proc.c,

libsvn_subr/version.c, libsvn_subr/win32_xlate.c, libsvn_subr/x509parse.c,

libsvn_wc/conflicts.c, libsvn_wc/conflicts.h, libsvn_wc/copy.c,

libsvn_wc/lock.c, libsvn_wc/wc_db.c, libsvn_wc/wc_db.h,


(): Spelling fixes

  1. … 84 more files in changeset.
Update svn_ra_open4() to svn_ra_open5() across the tree.

Most of these changes are mechanical. JavaHL gains a redirect cycle fix.

The set_svn_ra_open() callback gets updated to the new API.

* subversion/bindings/javahl/native/CommitEditor.cpp

(open_callback_session): Use svn_ra_open5() and show the redirected URL in

an error message.

* subversion/bindings/javahl/native/RemoteSession.cpp

(RemoteSession::RemoteSession): Use svn_ra_open5() and detect redirect

cycles based on the actual redirection URL sent by the server.

* subversion/libsvn_client/ra.c

(svn_client__open_ra_session_internal): Use svn_ra_open5().

* subversion/libsvn_ra/ra_loader.c

(svn_ra_open5): Pass svn_ra_open5 to the svn_svn_ra_open() callback.

* subversion/libsvn_ra/ra_loader.h

(svn_ra__open_func_t): Update to match svn_ra_open5().

* subversion/libsvn_ra_serf/serf.c

(svn_ra_serf__open): Update comment referring to svn_ra_open4().

* subversion/svnsync/svnsync.c

(do_initialize, open_source_session,

open_target_session): Update to svn_ra_open5().

* subversion/tests/cmdline/atomic-ra-revprop-change.c

(change_rev_prop): Update to svn_ra_open5().

* subversion/tests/libsvn_ra/ra-test.c

(make_and_open_repos, check_tunnel_callback_test, tunnel_callback_test,

tunnel_run_checkout, commit_locked_file): Update to svn_ra_open5().

  1. … 8 more files in changeset.
* everywhere: Run tools/dev/ to remove

trailing whitespace before we branch 1.14.

  1. … 103 more files in changeset.
Merge the 'decouple-shelving-cli' branch to trunk.


Add the shelving v2 implementation from Subversion 1.11, as an alternative

to the shelving v3 implementation from Subversion 1.12.

They have substantially different pros and cons, so it is beneficial for the

user to be able to choose.

Make the shelving CLI version selectable by an environment variable:

env. var. not set => shelving v3 enabled

SVN_EXPERIMENTAL_COMMANDS=shelf3 => shelving v3 enabled

SVN_EXPERIMENTAL_COMMANDS=shelf2 => shelving v2 enabled


  1. … 12 more files in changeset.
Complete the upgrade of array insert/delete functions.

For issue #4840 "Merge assertion failure in svn_sort__array_insert".

This changes all remaining callers, in other areas of Subversion, to use the

new array insert/delete functions that return standard Subversion errors if

inputs are out of bounds, and removes the old versions of those functions.

These are private functions so the public API is not affected.

* subversion/include/private/svn_sorts_private.h

* subversion/libsvn_subr/sorts.c


svn_sort__array_delete): Remove.


svn_sort__array_delete2): Rewrite as the only version, instead of calling

the old version. No functional change.

Elsewhere: update all callers.

  1. … 17 more files in changeset.
Make it possible for RA-layer consumers to detect redirect loops reliably.

Make svn_ra_open() return both canonicalized and non-canonicalized versions

of redirect URLs. The latter can be used to detect redirect loops, while

the former can be used for any other purposes as usual.

See r1866899 and r1873375 for reasons why this is necessary.

* subversion/include/svn_ra.h

(svn_ra_open4): Deprecate.

(svn_ra_open5): Declare.

* subversion/libsvn_client/ra.c

(svn_client__open_ra_session_internal): Detect redirect loops based on the

non-canonicalized representation of the URL used by the RA implementation.

The canonicalized version is insufficient for loop detection.

* subversion/libsvn_ra/deprecated.c

(svn_ra_open4): Implement as a wrapper around svn_ra_open5().

* subversion/libsvn_ra/ra_loader.c

(svn_ra_open5): Implement.

(svn_ra_create_callbacks): Update for new output parameter 'redirect_url_p'.

* subversion/libsvn_ra/ra_loader.h

(open_session): Needs a new output parameter.

* subversion/libsvn_ra/wrapper_template.h

(compat_open): Track addition of new output parameter.

* subversion/libsvn_ra_local/ra_plugin.c

(svn_ra_local__open): Add new output parameter.

* subversion/libsvn_ra_serf/options.c

(svn_ra_serf__exchange_capabilities): Return the URL received in a HTTP

redirect as-is in new 'redirect_url' output parameter.

(svn_ra_serf__has_capability): Track addition of output parameter.

* subversion/libsvn_ra_serf/ra_serf.h

(svn_ra_serf__exchange_capabilities): Declare new output parameter.

* subversion/libsvn_ra_serf/serf.c

(svn_ra_serf__open): Support new 'redirect_url' output parameter.

* subversion/libsvn_ra_svn/client.c

(ra_svn_open): Support new 'redirect_url' output parameter.

  1. … 10 more files in changeset.
Avoid aborting on assertion failure in the area of mergeinfo calculations.

Instead, raise a catchable assertion error.

If an error occurs in svn_rangelist_merge2(), produce a more detailed error

message to aid in debugging.

Introduce and use 'svn_sort__array_insert2()' which checks its inputs. The

old version of this function was aborting on out-of-range inputs. Introduce

and use 'svn_sort__array_delete2()' likewise, as similar issues may show up

here too. The old version of this function was ignoring calls with

out-of-range inputs. The old versions of both functions are still in use

elsewhere in the Subversion libraries.

For issue #4840, "Merge assertion failure in svn_sort__array_insert".

* subversion/include/private/svn_sorts_private.h,



svn_sort__array_delete2): New.

* subversion/libsvn_client/merge.c


insert_child_to_merge): Allow returning an error.

Everywhere: use svn_sort__array_insert2() and svn_sort__array_delete2().

* subversion/libsvn_subr/mergeinfo.c

(adjust_remaining_ranges): Allow returning an error.

(dual_dump): Replace this old debug helper...

(rangelist_to_string_debug): ... with this new one.

(svn_rangelist_merge2): Extract the body of this function into a local

'rangelist_merge2', leaving the original as an error-checking

wrapper. If an error occurs, report its inputs.

(rangelist_is_sorted): New.

Everywhere: use svn_sort__array_insert2() and svn_sort__array_delete2().

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

(test_rangelist_merge_random_non_validated_inputs): Expect assertion

failures; ignore them.

(test_funcs): Expect that test to pass now.

  1. … 4 more files in changeset.
Fix issue #4837 'Cannot get info for a file that was inside of

file-replaced directory'.

* subversion/libsvn_client/info.c

(same_resource_in_head): 'Not a directory' error means not related.

* subversion/tests/cmdline/

(info_item_failures): Remove XFail.

  1. … 1 more file in changeset.
Fix doc-strings of 'revert' API.

* subversion/include/svn_client.h

(svn_client_revert4): Document 'use commit times' behaviour.

* subversion/libsvn_client/revert.c

(revert): Refer to existing docs.

  1. … 1 more file in changeset.
Fix 'svn patch' setting UNIX permissions to 0600 on patched files with props.

* subversion/libsvn_client/patch.c

(init_patch_target): Use the working copy's own temp directory to store

temporary files for patching, instead of using the system-wide temp dir.

With a system-wide dir, permission paranoia in svn_io_open_unique_file3()

may kick in and result in patched files with permissions not matching the

umask. Generally, any temp files that may end up as user-visible files

in the working copy should be created in the working copy's temp dir.

Reported by: Doug Robinson at wandisco com

Fix conflict resolver bug where local and incoming edits got swapped.

When auto-resolving an incoming file move vs local file edit tree

conflict after an update or switch operation, text conflicts were

created with the incoming changes (theirs) and local changes (mine)

swapped within text conflict markers. When such a text conflict was

then resolved with the --accept mf/mc/tf/tc options the result was

the opposite of what it should have been.

Reported by: Jonathan Guy

* subversion/libsvn_client/conflicts.c

(resolve_incoming_move_file_text_merge): After update/switch, run the

text merge in a way that makes local and incoming changes properly

land on their respective sides of a text conflict.

* subversion/libsvn_client/delete.c



Update to use the recently revved svn_delta_path_driver3().

* subversion/libsvn_client/shelf.c: Fix non-debug builds: remove SVN_DBG.
Reintegrate the 'shelving-v3' branch.
  1. … 4 more files in changeset.
Change the shelf storage directory name from 'v2' to 'v3'.

Also remove the knowledge of the existence of a shelves directory from the

WC API, and instead just have knowledge of the 'experimental' features dir

at this level.

* subversion/include/private/svn_wc_private.h,


(svn_wc__get_experimental_dir): Replacement for 'svn_wc__get_shelves_dir'.

* subversion/libsvn_client/shelf.c

(get_shelves_dir): New.


svn_client__shelf_list): Use it.

  1. … 2 more files in changeset.
Add resolver support for moved-file vs moved-file upon update.

The resolver now supports move vs move tree conflicts for files after

an update operation.

Two new resolution operations are available:

(m) - override incoming move and merge incoming changes from 'alpha-moved'

to 'alpha-also-moved'

(M) - accept incoming move and merge local changes from 'alpha-also-moved'

to 'alpha-moved'

Where the file was originally called 'alpha', was renamed to 'alpha-moved'

in the repository, and renamed to 'alpha-also-moved' in the working copy.

Because the local move is broken during the update operation when the

delete-half of the move is updated, the resolver only has the copied half

move available in the working copy. To find the local move destination the

resolver queries the working copy database for nodes which are copies of

the conflict victim's repository path. This can of course lead to ambiguous

results in case a node is first copied and then moved, in which case the

resolver offers the user a choice of local move targets in the usual way.

* subversion/include/private/svn_wc_private.h

(svn_wc__find_copies_of_repos_path): Declare.

* subversion/libsvn_client/conflicts.c

(conflict_tree_update_local_moved_away_details): New conflict details struct.


resolve_both_moved_file_update_keep_incoming_move): New resolution handlers.

(conflict_tree_get_details_update_local_moved_away): New details fetcher

which locates copied nodes corresponding to the local move.

(get_both_moved_file_paths): New helper function.


conflict_tree_get_description_update_both_moved_file_move_merge): New

functions which describe incoming move vs local move conflicts flagged

during updates of files.

(configure_option_both_moved_file_merge): Hook up the new options.



conflict_type_specific_setup): Support the newly added conflict options.

* subversion/libsvn_wc/node.c

(svn_wc__find_copies_of_repos_path): New.

* subversion/libsvn_wc/wc-queries.sql

(STMT_SELECT_COPIES_OF_REPOS_RELPATH): New query which locates copies of a

particular repository relpath with a particular node kind in working copy.

* subversion/libsvn_wc/wc_db.c

(svn_wc__db_find_copies_of_repos_path): New wc_db API to execute above query.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_find_copies_of_repos_path): Declare.

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

(create_file_move_vs_file_move_update_conflict): New helper function.


test_update_file_move_vs_file_move_accept_move, test_funcs): New tests

which exercise both of the newly added conflict resolution options.

  1. … 6 more files in changeset.
Only enable the 'incoming_move_file_merge' resolution option if the

local change is a file edit.

This resolution option was introduced in r1747727 and accidentally enabled

for any local change vs an incoming deletion. So while this resolution

handler only supports local edits, it was enabled even for other conflicts,

such as those involving locally moved-away files.

In that case Subversion was pretending to resolve the conflict when in fact

it did not resolve it. The resolution handler in libsvn_client internally

failed with a "path not found" error which was masked by 'svn resolve' (since

this error is sometimes legitimate) and the conflict marker was still in

place after Subversion proudly proclaimed:

"Applying recommended resolution 'Move and merge'"

Subversion now tells the truth instead:

"Subversion is not smart enough to resolve this tree conflict automatically!"

* subversion/libsvn_client/conflicts.c

(configure_option_incoming_move_file_merge): Only configure this option if

the local change is an 'edit'.

Let the WC mods editor and WC replay editor APIs take explicit notification


* subversion/include/private/svn_client_private.h


svn_client__wc_copy_mods): Take a notification callback.

* subversion/libsvn_client/commit.c

(svn_client__wc_replay): Take a notification callback.

* subversion/libsvn_client/wc_editor.c

(svn_client__wc_copy_mods): Take a notification callback.

* subversion/svn/shelf-cmd.c

(svn_cl__wc_copy_mods): Adjust caller.

  1. … 2 more files in changeset.
* subversion/libsvn_client/wc_editor.c

(svn_client__wc_copy_mods): Remove the WC locking, now that the

WC editor does it, following r1852559.

Teach the WC editor to acquire and release a WC write lock.

* subversion/include/private/svn_client_private.h

(svn_client__wc_editor): Document that it manages the write lock.

(svn_client__wc_editor_internal): Add an option flag to manage the write lock.

* subversion/libsvn_client/copy.c


svn_client__repos_to_wc_copy_by_editor): Ask the WC editor not to manage

the write lock for us here, as the caller does it.

* subversion/libsvn_client/shelf.c

(svn_client__shelf_apply): Don't aquire and release the write lock here:

let the WC editor do it.

* subversion/libsvn_client/wc_editor.c

(edit_baton_t): Add fields to manage the write lock.


pool_cleanup_handler): New.

(edit_open): If requested, acquire the write lock and arrange for it to be

released on pool clean-up.

(edit_close): If acquired, release the write lock.

(svn_client__wc_editor_internal): Add the option flag to manage the write

lock. Initialize the 'abort_edit' method so that it will release the

write lock, the same as 'close_edit'.

(svn_client__wc_editor): Ask for the write lock to be managed.

  1. … 1 more file in changeset.
Upgrade uses of the editor path driver callback, following r1852526.

* subversion/libsvn_client/add.c

(path_driver_cb_func): Take the editor and edit-baton as direct parameters.

(mkdir_urls): Upgrade to svn_delta_path_driver3.

* subversion/libsvn_client/commit_util.c

(item_commit_baton): Remove the editor and edit-baton from here.

(do_item_commit): Take the editor and edit-baton as direct parameters.

(svn_client__do_commit): Upgrade to svn_delta_path_driver3.

* subversion/libsvn_client/copy.c

(path_driver_cb_baton): Remove the editor and edit-baton from here.

(path_driver_cb_func): Take the editor and edit-baton as direct parameters.

(repos_to_repos_copy): Upgrade to svn_delta_path_driver3.

* subversion/libsvn_delta/branch_compat.c

(apply_change): Take the editor and edit-baton as direct parameters.

(drive_changes): Upgrade to svn_delta_path_driver3.

* subversion/libsvn_delta/compat.c

(apply_change): Take the editor and edit-baton as direct parameters.

(drive_changes): Upgrade to svn_delta_path_driver3.

* subversion/libsvn_repos/replay.c

(path_driver_cb_baton): Remove the editor and edit-baton from here.

(path_driver_cb_func): Take the editor and edit-baton as direct parameters.

(svn_repos_replay2): Upgrade to svn_delta_path_driver3.

  1. … 3 more files in changeset.
Make the editor path driver callback a little easier to use.

Add 'editor' and 'edit_baton' parameters to the path driver callback. All

but trivial callback implementations need these, and they otherwise had to

be passed through the callback baton, which was straightforward but more

trouble than it need be.

* subversion/include/svn_delta.h


svn_delta_path_driver3): New.

* subversion/libsvn_delta/path_driver.c

(svn_delta_path_driver3): Rename from 'svn_delta_path_driver2'.


svn_delta_path_driver_start): Change the callback function type.

(svn_delta_path_driver_step): Pass the extra parameters.

* subversion/libsvn_delta/deprecated.c



svn_delta_path_driver2): New.

* subversion/libsvn_client/shelf.c

(path_driver_cb_func): Take 'editor' and 'edit_baton' as direct parameters.


svn_client__shelf_replay): Remove them from the path driver baton.

  1. … 3 more files in changeset.
Make the new shelf-replay-to-delta-editor API public (experimental).

* subversion/include/svn_client.h,


(svn_client__shelf_apply): Rename from 'shelf_replay' and make public.

  1. … 1 more file in changeset.
* subversion/libsvn_client/shelf.c (shelf_name_from_filename): Use consistent data types.
* subversion/libsvn_client/shelf.c (path_driver_cb_func): Fix the build, following r1852382.
* subversion/libsvn_client/shelf.c

(path_driver_cb_func): Always initialize the 'dir baton' output parameter,

as other implementations of this callback type do, even though driver

may not require it.

Fix 'unshelve' of property mods.

Found by: stsp

* subversion/libsvn_client/shelf.c

(path_driver_cb_func): Open the correct directory before trying to apply

its property mods. Fix other doc strings too.