Checkout Tools
  • last updated 4 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
As part of resolving issue #4420 and the related Coverity issue, really check

for obstructions when installing new file externals.

This patch introduces 3 test failures: 2 related to moving directories

containing file external and one testing for exactly this issue.

* subversion/libsvn_client/externals.c

(switch_file_external): Really check for unversioned obstructions, instead

of checking for versioned obstructions again.

Follow-up to r1705843: Improve error message in some edge cases. For example

if svn_wc__external_remove() function returns SVN_ERR_CANCELLED.

* subversion/libsvn_client/externals.c

(switch_dir_external): Return error from svn_wc__external_remove() as-is

instead of chaining to SVN_ERR_WC_PATH_UNEXPECTED_STATUS error.

Remove registration of external in the EXTERNALS table when we find a

versioned node that takes its place during update.

* subversion/libsvn_client/externals.c

(switch_dir_external): Check node for wcroot before trying to handle as wc.

* subversion/tests/cmdline/externals_tests.py

(external_externally_removed): New test.

(test_list): Add external_externally_removed.

  1. … 1 more file in changeset.
Revert r1704048 (merge of 'reuse-ra-session' branch): unfortunately the code

is not ready for trunk. The most serious problem that we cannot assume that

API user doesn't change svn_client_ctx_t fields like AUTH_BATON or

OPEN_TUNNEL_FUNC between svn_client_*() functions invocation. JavaHL bindings

is one example of usage of such pattern.

I'll revive 'reuse-ra-session' branch and attempt to fix these problems there.

Discussion: "Merge ra-reuse-session branch to trunk or not?" [1]

http://svn.haxx.se/dev/archive-2015-09/0173.shtml

  1. … 33 more files in changeset.
[Reverted in r1704255]

Introduce RA session pool in libsvn_client for managing and reusing RA session

for different URLs.

Discussion: "Merge ra-reuse-session branch to trunk or not?" [1]

More details are available in branch history [2].

[1] http://svn.haxx.se/dev/archive-2015-09/0173.shtml

[2] ^/subversion/branches/reuse-ra-session@1704029

* subversion/include/private/svn_client_private.h

(svn_client__ra_session_from_path2): Update docstring to mention that RA

session may be returned back to RA session pool by

svn_client__ra_session_release() function.

(svn_client__ra_session_release): New function declaration.

* subversion/libsvn_client/add.c

* subversion/libsvn_client/blame.c

* subversion/libsvn_client/cat.c

* subversion/libsvn_client/checkout.c

(mkdir_urls, svn_client_blame5, svn_client_cat3,

svn_client__checkout_internal): Release locally created sessions if there

were no errors.

* subversion/libsvn_client/client.h

(svn_client__ra_cache_t): Add new type declare.

(svn_client__private_ctx_t): Add RA_CACHE field.

* subversion/libsvn_client/commit.c

(check_url_kind_baton): Remove POOL, SESSION and REPOS_ROOT_URL -- they

were used as local RA session pool.

(check_url_kind): Just use svn_client_open_ra_session2() and

svn_client__ra_session_release() instead of trying to reparent existing

RA session.

(svn_client_commit6): Update baton initialization and release locally

created sessions if there were no errors.

* subversion/libsvn_client/copy.c

* subversion/libsvn_client/copy_foreign.c

* subversion/libsvn_client/ctx.c

* subversion/libsvn_client/delete.c

* subversion/libsvn_client/diff.c

* subversion/libsvn_client/export.c

* subversion/libsvn_client/externals.c

* subversion/libsvn_client/import.c

* subversion/libsvn_client/info.c

* subversion/libsvn_client/iprops.c

* subversion/libsvn_client/list.c

* subversion/libsvn_client/locking_commands.c

* subversion/libsvn_client/log.c

* subversion/libsvn_client/mtcc.c

* subversion/libsvn_client/prop_commands.c

(pin_externals_prop, repos_to_repos_copy, repos_to_repos_copy,

wc_to_repos_copy, repos_to_wc_copy, svn_client__copy_foreign,

delete_urls_multi_repos, diff_repos_repos, diff_repos_wc,

svn_client_export5, handle_external_item_change, svn_client_import5,

svn_client_info4, get_inheritable_props, list_internal, release_locks,

svn_client__get_copy_source, svn_client_log5, svn_client__mtcc_commit,

propset_on_url): Release locally created sessions if there were no errors.

* subversion/libsvn_client/merge.c

(ensure_ra_session_url): Add TODO comment to use release RA sessions back

to RA session pool.

(do_merge): Reduce scope of second RA session and return it early back to

RA session pool.

(merge_locked, merge_peg_locked, find_automatic_merge_no_wc,

client_find_automatic_merge, do_automatic_merge_locked): Release locally

created sessions if there were no errors.

* subversion/libsvn_client/mergeinfo.c

(svn_client__get_wc_or_repos_mergeinfo_catalog, get_mergeinfo,

logs_for_mergeinfo_rangelist, svn_client__mergeinfo_log,

svn_client_suggest_merge_sources): Release locally created sessions if

there were no errors.

* subversion/libsvn_client/ra.c

(): Include "ra_cache.h"

(svn_client__open_ra_session_internal): Use

svn_client__ra_cache_open_session() to open RA session, instead of direct

call to svn_ra_open4().

(svn_client__repos_locations, svn_client__get_youngest_common_ancestor):

Release RA sessions after we finished using them.

(svn_client__ra_session_release): New.

* subversion/libsvn_client/ra_cache.c

* subversion/libsvn_client/ra_cache.h

(MAX_INACTIVE_SESSIONS, INACTIVE_SESSION_TIMEOUT, cache_entry_t,

open_tmp_file, get_wc_prop, set_wc_prop, push_wc_prop, invalidate_wc_props,

progress_func, cancel_func, get_client_string, get_wc_contents,

check_tunnel_func, open_tunnel_func, cleanup_ra_cache,

svn_client__ra_cache_init, close_ra_session, remove_inactive_entry,

expunge_cache_entries, find_session_by_url, open_new_session,

get_private_ra_cache, svn_client__ra_cache_open_session,

svn_client__ra_cache_release_session): New.

* subversion/libsvn_client/status.c

* subversion/libsvn_client/switch.c

* subversion/libsvn_client/update.c

* subversion/libsvn_client/util.c

(reporter_finish_report, svn_client_status6, switch_internal,

svn_client__update_internal, svn_client_get_repos_root): Release locally

created sessions if there were no errors.

* tools/dev/ra-cache-summary.py: New script to analyze debugging output of

RA session reuse.

  1. … 33 more files in changeset.
Implement svn_io_file_rename2() with FLUSH_TO_DISK flag to require OS to

wait until rename operation is actually written to disk. Discussed in thread

"svn commit: r1682265 - /subversion/trunk/subversion/libsvn_fs_fs/util.c" on

dev@s.a.o [1]

[1] http://svn.haxx.se/dev/archive-2015-05/0211.shtml

* subversion/include/svn_io.h

(svn_io_file_rename2): New function declaration.

(svn_io_file_rename): Deprecate.

* subversion/libsvn_subr/io.c

(win32_file_rename): Use MOVEFILE_WRITE_THROUGH flag in call to

MoveFileExW if FLUSH_TO_DISK is non-zero.

(svn_io_file_rename2): Revv from svn_io_file_rename(). Add FLUSH_TO_DISK

parameter and perform flush to disk operation depending on the platform:

use MoveFileEx flag on Windows, fsync() target directory on POSIX and

fsync() target file on all other platforms. This logic mostly copied

from svn_fs_fs__move_into_place().

(svn_io_copy_link, svn_io_copy_file, svn_io_write_atomic,

svn_io_write_version_file): Use svn_io_rename2() with

FLUSH_TO_DISK=FALSE instead of svn_io_rename().

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

(test_file_rename2): Simple tests for svn_io_file_rename2().

(test_funcs): Add test_file_rename2.

* subversion/libsvn_subr/deprecated.c

(svn_io_file_rename): Call svn_io_file_rename2() with FLUSH_TO_DISK=FALSE.

* subversion/libsvn_client/copy.c

* subversion/libsvn_client/export.c

* subversion/libsvn_client/externals.c

* subversion/libsvn_fs_fs/fs_fs.c

* subversion/libsvn_fs_fs/lock.c

* subversion/libsvn_fs_fs/transaction.c

* subversion/libsvn_fs_fs/util.c

* subversion/libsvn_fs_x/lock.c

* subversion/libsvn_fs_x/transaction.c

* subversion/libsvn_fs_x/util.c

* subversion/libsvn_subr/config_auth.c

* subversion/libsvn_subr/stream.c

* subversion/libsvn_subr/subst.c

* subversion/libsvn_wc/copy.c

* subversion/libsvn_wc/node.c

* subversion/libsvn_wc/upgrade.c

* subversion/libsvn_wc/wc_db_pristine.c

* subversion/libsvn_wc/workqueue.c

(*): Use svn_io_file_rename2() with FLUSH_TO_DISK=FALSE instead of

svn_io_file_rename().

  1. … 21 more files in changeset.
Make text conflicts in file externals during update properly invoke the

interactive conflict resolver. This patch reverts r1618864 (removing the

callback arguments) and starts using the conflict resolver callback.

libsvn_client uses this callback to record that the file is conflicted

and then invokes the resolver after the update.

* subversion/include/private/svn_wc_private.h

(svn_wc__get_file_external_editor): Revert removing arguments.

* subversion/libsvn_client/externals.c

(svn_wc__get_file_external_editor): Update caller.

* subversion/libsvn_wc/externals.c

(edit_baton): Re-add callback.

(close_file): Call conflict callback, if set, and if conflicted.

(svn_wc__get_file_external_editor): Store callback in baton.

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

(switch_dir_external): Properly register externals when using an existing

separate working copy as directory external.

Apply the standard pre-branch whitespace cleanup via

tools/dev/remove-trailing-whitespace.zsh

There should be no functional changes.

* .ycm_extra_conf.py

* build/generator/gen_win.py

* build/generator/gen_win_dependencies.py

* subversion/bindings/javahl/native/EditorProxy.h

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

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

* subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c

* subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h

* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c

* subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c

* subversion/bindings/swig/ruby/test/test_fs.rb

* subversion/bindings/swig/ruby/test/util.rb

* subversion/bindings/swig/ruby/test/windows_util.rb

* subversion/include/private/svn_fs_fs_private.h

* subversion/include/private/svn_packed_data.h

* subversion/include/private/svn_repos_private.h

* subversion/include/private/svn_sorts_private.h

* subversion/include/private/svn_subr_private.h

* subversion/include/private/svn_wc_private.h

* subversion/include/svn_auth.h

* subversion/include/svn_cache_config.h

* subversion/include/svn_client.h

* subversion/include/svn_cmdline.h

* subversion/include/svn_diff.h

* subversion/include/svn_fs.h

* subversion/include/svn_io.h

* subversion/include/svn_ra.h

* subversion/include/svn_repos.h

* subversion/include/svn_string.h

* subversion/libsvn_client/blame.c

* subversion/libsvn_client/commit.c

* subversion/libsvn_client/commit_util.c

* subversion/libsvn_client/copy.c

* subversion/libsvn_client/diff.c

* subversion/libsvn_client/externals.c

* subversion/libsvn_client/log.c

* subversion/libsvn_client/patch.c

* subversion/libsvn_client/ra.c

* subversion/libsvn_client/update.c

* subversion/libsvn_delta/svndiff.c

* subversion/libsvn_diff/parse-diff.c

* subversion/libsvn_fs/fs-loader.c

* subversion/libsvn_fs_base/lock.c

* subversion/libsvn_fs_fs/cached_data.c

* subversion/libsvn_fs_fs/fs_fs.c

* subversion/libsvn_fs_fs/hotcopy.c

* subversion/libsvn_fs_fs/id.c

* subversion/libsvn_fs_fs/index.c

* subversion/libsvn_fs_fs/index.h

* subversion/libsvn_fs_fs/lock.c

* subversion/libsvn_fs_fs/low_level.c

* subversion/libsvn_fs_fs/low_level.h

* subversion/libsvn_fs_fs/pack.c

* subversion/libsvn_fs_fs/recovery.c

* subversion/libsvn_fs_fs/rev_file.c

* subversion/libsvn_fs_fs/revprops.c

* subversion/libsvn_fs_fs/revprops.h

* subversion/libsvn_fs_fs/stats.c

* subversion/libsvn_fs_fs/transaction.c

* subversion/libsvn_fs_fs/tree.c

* subversion/libsvn_fs_fs/verify.c

* subversion/libsvn_fs_x/cached_data.c

* subversion/libsvn_fs_x/changes.c

* subversion/libsvn_fs_x/dag.h

* subversion/libsvn_fs_x/fs.h

* subversion/libsvn_fs_x/fs_id.c

* subversion/libsvn_fs_x/fs_x.c

* subversion/libsvn_fs_x/hotcopy.c

* subversion/libsvn_fs_x/hotcopy.h

* subversion/libsvn_fs_x/index.c

* subversion/libsvn_fs_x/index.h

* subversion/libsvn_fs_x/lock.c

* subversion/libsvn_fs_x/lock.h

* subversion/libsvn_fs_x/low_level.c

* subversion/libsvn_fs_x/low_level.h

* subversion/libsvn_fs_x/noderevs.c

* subversion/libsvn_fs_x/pack.c

* subversion/libsvn_fs_x/reps.c

* subversion/libsvn_fs_x/rev_file.c

* subversion/libsvn_fs_x/revprops.c

* subversion/libsvn_fs_x/revprops.h

* subversion/libsvn_fs_x/string_table.c

* subversion/libsvn_fs_x/string_table.h

* subversion/libsvn_fs_x/transaction.c

* subversion/libsvn_fs_x/tree.c

* subversion/libsvn_fs_x/util.c

* subversion/libsvn_fs_x/verify.c

* subversion/libsvn_ra_local/ra_plugin.c

* subversion/libsvn_ra_serf/ra_serf.h

* subversion/libsvn_ra_serf/serf.c

* subversion/libsvn_ra_serf/update.c

* subversion/libsvn_ra_serf/util.c

* subversion/libsvn_ra_svn/client.c

* subversion/libsvn_ra_svn/marshal.c

* subversion/libsvn_repos/authz_pool.c

* subversion/libsvn_repos/config_pool.c

* subversion/libsvn_repos/dump.c

* subversion/libsvn_repos/fs-wrap.c

* subversion/libsvn_repos/log.c

* subversion/libsvn_subr/bit_array.c

* subversion/libsvn_subr/cache-membuffer.c

* subversion/libsvn_subr/config.c

* subversion/libsvn_subr/dirent_uri.c

* subversion/libsvn_subr/fnv1a.c

* subversion/libsvn_subr/gpg_agent.c

* subversion/libsvn_subr/hash.c

* subversion/libsvn_subr/io.c

* subversion/libsvn_subr/object_pool.c

* subversion/libsvn_subr/packed_data.c

* subversion/libsvn_subr/prefix_string.c

* subversion/libsvn_subr/sorts.c

* subversion/libsvn_subr/sqlite.c

* subversion/libsvn_subr/subst.c

* subversion/libsvn_subr/sysinfo.c

* subversion/libsvn_subr/types.c

* subversion/libsvn_subr/utf.c

* subversion/libsvn_subr/utf8proc/utf8proc_data.c

* subversion/libsvn_subr/x509info.c

* subversion/libsvn_wc/diff.h

* subversion/libsvn_wc/props.c

* subversion/libsvn_wc/update_editor.c

* subversion/libsvn_wc/wc.h

* subversion/libsvn_wc/wc_db.c

* subversion/libsvn_wc/wc_db.h

* subversion/mod_dav_svn/lock.c

* subversion/mod_dav_svn/mod_dav_svn.c

* subversion/mod_dav_svn/status.c

* subversion/svn/auth-cmd.c

* subversion/svn/info-cmd.c

* subversion/svn/mergeinfo-cmd.c

* subversion/svn/notify.c

* subversion/svn/propget-cmd.c

* subversion/svn/svn.c

* subversion/svnadmin/svnadmin.c

* subversion/svnserve/logger.c

* subversion/svnserve/serve.c

* subversion/svnserve/server.h

* subversion/svnserve/svnserve.c

* subversion/tests/cmdline/blame_tests.py

* subversion/tests/cmdline/checkout_tests.py

* subversion/tests/cmdline/commit_tests.py

* subversion/tests/cmdline/export_tests.py

* subversion/tests/cmdline/externals_tests.py

* subversion/tests/cmdline/lock_tests.py

* subversion/tests/cmdline/merge_tests.py

* subversion/tests/cmdline/merge_tree_conflict_tests.py

* subversion/tests/cmdline/move_tests.py

* subversion/tests/cmdline/redirect_tests.py

* subversion/tests/cmdline/stat_tests.py

* subversion/tests/cmdline/svnadmin_tests.py

* subversion/tests/cmdline/switch_tests.py

* subversion/tests/cmdline/update_tests.py

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

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

* subversion/tests/libsvn_fs/fs-test.c

* subversion/tests/libsvn_fs/locks-test.c

* subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-test.c

* subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c

* subversion/tests/libsvn_fs_x/fs-x-pack-test.c

* subversion/tests/libsvn_fs_x/string-table-test.c

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

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

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

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

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

* subversion/tests/libsvn_subr/packed-data-test.c

* subversion/tests/libsvn_subr/priority-queue-test.c

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

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

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

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

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

* subversion/tests/svn_test_main.c

* tools/dev/benchmarks/RepoPerf/copy_repo.py

* tools/dev/benchmarks/RepoPerf/win_repo_bench.py

* tools/dev/build-svn-deps-win.pl

* tools/dev/fsfs-access-map.c

* tools/dev/po-merge.py

* tools/dev/x509-parser.c

* tools/diff/diff.c

* tools/dist/backport.pl

* tools/dist/backport_tests.py

* tools/hook-scripts/mailer/mailer.py

* tools/server-side/svnpubsub/daemonize.py

* win-tests.py

Remove unneeded whitespace via script.

  1. … 184 more files in changeset.
Follow up to r1655712 by making the original form of the external

reference URL available for constructing the error message.

Patch by: stsp

* subversion/libsvn_client/externals.c

(switch_dir_external): Add new argument url_from_externals_definition.

(handle_external_item_change): Update the only caller.

Improve error message when an external is shadowed by a versioned path.

Suggested by: brane

* subversion/libsvn_client/externals.c

(switch_dir_external): Provide a custom error message since the default

message 'The specified path has an unexpected status' is not very clear.

Partially fix issue #4527: Notify start of exporting external.

* subversion/libsvn_client/externals.c

(svn_client__export_externals): Send svn_wc_notify_update_external

notification before handling external.

Patch by: Michael.Schmidt{_AT_}mevis.fraunhofer.de

Tweaked by: me

* subversion/libsvn_client/externals.c

(switch_file_external): Followup to r1641591, simplify further by

removing reparent, variable and comment.

Avoid yet another unneeded ra session in the externals processing.

Found by: philip

* subversion/libsvn_client/externals.c

(switch_file_external): Use passed resolved location and ra session instead

of re-doing this locally.

(handle_external_item_change): Update caller.

Fix issue #4185: SVN client silently fails to import an ancestor of

external file specified via svn:externals rule with operative revision.

* subversion/libsvn_client/externals.c

(switch_file_external): replace 'url' parameter mistakenly

passed to svn_ra_do_switch3() by 'switch_loc->url'.

* subversion/tests/cmdline/externals_tests.py

(pinned_externals): Tweak expectations.

Patch by: Alex Siyanko <asiyanko{_AT_}xdyne.com>

me

  1. … 1 more file in changeset.
Fix issue 4529: directory external not following history.

* subversion/libsvn_client/externals.c

(handle_external_item_change): Reparent after resolving.

* subversion/tests/cmdline/externals_tests.py

(pinned_externals): Extend with directory case, remove redundant variable.

  1. … 1 more file in changeset.
Remove a flag from a libsvn_wc private api, that normally shouldn't be used.

This fixes a bug in the few cases that did use the flag unintended. The hidden

behavior is tied to how we did things in the svn_wc_entry_t world of <= 1.6.

* subversion/include/private/svn_wc_private.h

(svn_wc__node_get_base): Remove show_hidden flag.

* subversion/libsvn_client/commit_util.c

(harvest_status_callback): Update caller.

* subversion/libsvn_client/externals.c

(switch_dir_external): Update caller that asked for hidden, but only looked

at working copy roots, which can't be hidden.

* subversion/libsvn_client/locking_commands.c

(organize_lock_targets): Update caller.

* subversion/libsvn_client/merge.c

(calculate_remaining_ranges): Update caller.

* subversion/libsvn_client/mergeinfo.c

(svn_client__get_wc_mergeinfo): Update caller.

* subversion/libsvn_client/update.c

(update_internal): Update caller.

* subversion/libsvn_client/util.c

(svn_client__wc_node_get_base): Update caller.

* subversion/libsvn_wc/node.c

(svn_wc__node_get_base): Simplify implementation.

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

(test_node_get_base): Update caller.

  1. … 9 more files in changeset.
When calling ctx->notify_func2 always use the same source style.

* subversion/libsvn_client/cleanup.c

(cleanup_status_walk): Use one style.

* subversion/libsvn_client/commit_util.c

(do_item_commit): Use one style.

* subversion/libsvn_client/copy.c

(repos_to_wc_copy_single): Use one style.

* subversion/libsvn_client/export.c

(svn_client_export5): Use one style.

* subversion/libsvn_client/externals.c

(switch_file_external, handle_external_item_removal,

handle_external_item_change): Use one style.

* subversion/libsvn_client/import.c

(import_file, get_filtered_children, import_children,

import_dir): Use one style.

* subversion/libsvn_client/merge.c

(record_skip, record_tree_conflict, record_update_add,

record_update_update, handle_pending_notifications,

mark_dir_edited, mark_file_edited, notify_merge_begin): Use one style.

* subversion/libsvn_client/patch.c

(send_hunk_notification, send_patch_notification): Use one style.

* subversion/libsvn_client/prop_commands.c

(svn_client_revprop_set2): Use one style.

* subversion/libsvn_client/ra.c

(svn_client__open_ra_session_internal): Use one style.

* subversion/libsvn_client/revert.c

(revert): Use one style.

* subversion/libsvn_client/status.c

(svn_client_status6): Use one style.

* subversion/libsvn_client/switch.c

(switch_internal): Use one style.

* subversion/libsvn_client/update.c

(update_internal, svn_client_update4): Use one style.

  1. … 13 more files in changeset.
Avoid creating an unneeded ra-session per 'svn checkout' and per update of

directory external by passing an optional ra session to a few more internal

libsvn_client functions.

* subversion/libsvn_client/checkout.c

(svn_client__checkout_internal): Move output arguments to front. Accept

optional existing ra session. Pass ra session to

svn_client__update_internal.

(svn_client_checkout3): Update caller.

* subversion/libsvn_client/client.h

(svn_client__update_internal,

svn_client__checkout_internal):

Move output arguments to front. Accept optional existing ra session.

(svn_client__handle_externals): Accept optional existing ra session.

* subversion/libsvn_client/copy.c

(repos_to_wc_copy_single): Update caller. Remove unneeded local variable, as

we can just pass the variable from our caller.

* subversion/libsvn_client/externals.c

(switch_dir_external): Accept ra session from caller. Update caller.

(handle_external_item_change): Accept ra session from caller. Use this if

possible to avoid always creating another ra session. Update caller.

(handle_externals_change,

svn_client__handle_externals): Pass ra session.

* subversion/libsvn_client/switch.c

(switch_internal): Update caller.

* subversion/libsvn_client/update.c

(update_internal): Separate pool handling. Reorder arguments to standard.

Update caller.

(svn_client__update_internal): Move output arguments to front. Accept

optional existing ra session. Use iterpool.

  1. … 5 more files in changeset.
Fix issue #4085, "external can shadow a versioned directory".

* subversion/libsvn_client/externals.c

(switch_dir_external): Don't try to switch BASE nodes over to an external.

The switch will succeed, but the subsequent attempt of registering the

external will fail with an error. The working copy is then left in a bad

state until the path is switched back. With this fix we fail much earlier,

before switching the path, allowing users to recover cleanly by removing

either the external definition or the directory shadowed by the external.

* subversion/tests/cmdline/externals_tests.py

(shadowing): Remove XFail marker.

  1. … 1 more file in changeset.
Remove unused conflict_func/conflict_baton in file externals code.

* subversion/include/private/svn_wc_private.h

(svn_wc__get_file_external_editor): Remove conflict_func/conflict_baton

parameters.

* subversion/libsvn_client/externals.c

(switch_file_external): Update caller.

* subversion/libsvn_wc/externals.c

(edit_baton, svn_wc__get_file_external_editor): Remove unused conflict_func

and conflict_baton.

  1. … 2 more files in changeset.
Following the availability of apr_hash_this_key() etc. in APR v1.5, use

these in Subversion code instead of svn__apr_hash_index_key() etc. Provide

substitutes only when APR is too old to provide them.

* subversion/include/svn_types.h,

subversion/libsvn_subr/iter.c

(svn__apr_hash_index_key,

svn__apr_hash_index_klen,

svn__apr_hash_index_val):

Rename to apr_hash_this_key, apr_hash_this_key_len, apr_hash_this_val.

Declare and define them only if APR is older than 1.5.

Everywhere else: track the renames.

  1. … 102 more files in changeset.
* subversion/libsvn_client/externals.c

(svn_client__handle_externals): Following up on r1600323, handle a few more

possible error codes that note that we didn't find a directory to delete.

Resolve a regression reported by <GezwiZ> in #svn IRC, see r1600311.

* subversion/libsvn_client/externals.c

(svn_client__handle_externals): Fix removal of empty ancestor directories

of externals that are removed. Properly handle deleted and non existing

directories.

* subversion/tests/cmdline/externals_tests.py

(update_deletes_file_external): Remove XFail marker.

  1. … 1 more file in changeset.
Revert r1508225, which moved the include of svn_private_config.h before all

includes of our public headers. Public headers shouldn't depend on private

headers and all changes that required this are long reverted on trunk.

This patch excludes all conflicting cases.

* subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c

* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c

* subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c

* subversion/libsvn_auth_gnome_keyring/gnome_keyring.c

* subversion/libsvn_client/add.c

* subversion/libsvn_client/cat.c

* subversion/libsvn_client/changelist.c

* subversion/libsvn_client/cleanup.c

* subversion/libsvn_client/commit.c

* subversion/libsvn_client/commit_util.c

* subversion/libsvn_client/copy.c

* subversion/libsvn_client/copy_foreign.c

* subversion/libsvn_client/ctx.c

* subversion/libsvn_client/delete.c

* subversion/libsvn_client/deprecated.c

* subversion/libsvn_client/diff.c

* subversion/libsvn_client/diff_local.c

* subversion/libsvn_client/diff_summarize.c

* subversion/libsvn_client/export.c

* subversion/libsvn_client/externals.c

* subversion/libsvn_client/import.c

* subversion/libsvn_client/info.c

* subversion/libsvn_client/iprops.c

* subversion/libsvn_client/list.c

* subversion/libsvn_client/locking_commands.c

* subversion/libsvn_client/log.c

* subversion/libsvn_client/merge.c

* subversion/libsvn_client/mergeinfo.c

* subversion/libsvn_client/patch.c

* subversion/libsvn_client/prop_commands.c

* subversion/libsvn_client/ra.c

* subversion/libsvn_client/repos_diff.c

* subversion/libsvn_client/resolved.c

* subversion/libsvn_client/revert.c

* subversion/libsvn_client/switch.c

* subversion/libsvn_client/update.c

* subversion/libsvn_client/util.c

* subversion/libsvn_delta/compat.c

* subversion/libsvn_delta/xdelta.c

* subversion/libsvn_diff/parse-diff.c

* subversion/libsvn_diff/util.c

* subversion/libsvn_fs/access.c

* subversion/libsvn_fs_base/bdb/changes-table.c

* subversion/libsvn_fs_base/bdb/env.c

* subversion/libsvn_fs_base/dag.c

* subversion/libsvn_fs_base/fs.c

* subversion/libsvn_fs_base/lock.c

* subversion/libsvn_fs_base/revs-txns.c

* subversion/libsvn_fs_base/tree.c

* subversion/libsvn_fs_fs/caching.c

* subversion/libsvn_fs_fs/lock.c

* subversion/libsvn_fs_fs/temp_serializer.c

* subversion/libsvn_fs_fs/tree.c

* subversion/libsvn_ra/compat.c

* subversion/libsvn_ra/deprecated.c

* subversion/libsvn_ra/ra_loader.c

* subversion/libsvn_ra_local/ra_plugin.c

* subversion/libsvn_ra_serf/blame.c

* subversion/libsvn_ra_serf/blncache.c

* subversion/libsvn_ra_serf/commit.c

* subversion/libsvn_ra_serf/getlocations.c

* subversion/libsvn_ra_serf/getlocationsegments.c

* subversion/libsvn_ra_serf/getlocks.c

* subversion/libsvn_ra_serf/inherited_props.c

* subversion/libsvn_ra_serf/log.c

* subversion/libsvn_ra_serf/merge.c

* subversion/libsvn_ra_serf/mergeinfo.c

* subversion/libsvn_ra_serf/options.c

* subversion/libsvn_ra_serf/property.c

* subversion/libsvn_ra_serf/replay.c

* subversion/libsvn_ra_serf/serf.c

* subversion/libsvn_ra_serf/update.c

* subversion/libsvn_ra_serf/util.c

* subversion/libsvn_ra_serf/xml.c

* subversion/libsvn_ra_svn/client.c

* subversion/libsvn_ra_svn/editorp.c

* subversion/libsvn_ra_svn/marshal.c

* subversion/libsvn_repos/authz.c

* subversion/libsvn_repos/commit.c

* subversion/libsvn_repos/delta.c

* subversion/libsvn_repos/deprecated.c

* subversion/libsvn_repos/fs-wrap.c

* subversion/libsvn_repos/hooks.c

* subversion/libsvn_repos/log.c

* subversion/libsvn_repos/replay.c

* subversion/libsvn_repos/reporter.c

* subversion/libsvn_repos/repos.c

* subversion/libsvn_repos/rev_hunt.c

* subversion/libsvn_subr/auth.c

* subversion/libsvn_subr/cmdline.c

* subversion/libsvn_subr/compat.c

* subversion/libsvn_subr/config.c

* subversion/libsvn_subr/config_auth.c

* subversion/libsvn_subr/deprecated.c

* subversion/libsvn_subr/dso.c

* subversion/libsvn_subr/hash.c

* subversion/libsvn_subr/io.c

* subversion/libsvn_subr/mergeinfo.c

* subversion/libsvn_subr/opt.c

* subversion/libsvn_subr/properties.c

* subversion/libsvn_subr/simple_providers.c

* subversion/libsvn_subr/sorts.c

* subversion/libsvn_subr/ssl_client_cert_providers.c

* subversion/libsvn_subr/ssl_client_cert_pw_providers.c

* subversion/libsvn_subr/ssl_server_trust_providers.c

* subversion/libsvn_subr/subst.c

* subversion/libsvn_subr/types.c

* subversion/libsvn_subr/username_providers.c

* subversion/libsvn_subr/utf.c

* subversion/libsvn_subr/win32_crypto.c

* subversion/libsvn_wc/adm_crawler.c

* subversion/libsvn_wc/adm_files.c

* subversion/libsvn_wc/conflicts.c

* subversion/libsvn_wc/copy.c

* subversion/libsvn_wc/deprecated.c

* subversion/libsvn_wc/diff_editor.c

* subversion/libsvn_wc/diff_local.c

* subversion/libsvn_wc/entries.c

* subversion/libsvn_wc/externals.c

* subversion/libsvn_wc/info.c

* subversion/libsvn_wc/lock.c

* subversion/libsvn_wc/node.c

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

* subversion/libsvn_wc/props.c

* subversion/libsvn_wc/revert.c

* subversion/libsvn_wc/status.c

* subversion/libsvn_wc/update_editor.c

* subversion/libsvn_wc/upgrade.c

* subversion/libsvn_wc/wc_db_update_move.c

* subversion/libsvn_wc/wc_db_wcroot.c

* subversion/mod_dav_svn/repos.c

* subversion/mod_dav_svn/version.c

* subversion/svn/cl-conflicts.c

* subversion/svn/commit-cmd.c

* subversion/svn/conflict-callbacks.c

* subversion/svn/diff-cmd.c

* subversion/svn/help-cmd.c

* subversion/svn/notify.c

* subversion/svn/propedit-cmd.c

* subversion/svn/propget-cmd.c

* subversion/svn/props.c

* subversion/svn/status-cmd.c

* subversion/svn/status.c

* subversion/svn/svn.c

* subversion/svn/util.c

* subversion/svnadmin/svnadmin.c

* subversion/svnlook/svnlook.c

* subversion/svnrdump/dump_editor.c

* subversion/svnrdump/svnrdump.c

* subversion/svnrdump/util.c

* subversion/svnserve/serve.c

* subversion/svnsync/svnsync.c

* subversion/svnsync/sync.c

* subversion/tests/libsvn_fs/fs-test.c

* subversion/tests/libsvn_repos/repos-test.c

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

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

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

* subversion/tests/libsvn_wc/conflict-data-test.c

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

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

* subversion/tests/svn_test_fs.c

* tools/server-side/fsfs-stats.c

Move the svn_string_private.h include back to the original location.

  1. … 162 more files in changeset.
Fix issues #4428 and #4429: external pointing at redirected URL.

* subversion/libsvn_client/externals.c

(handle_external_item_change):

Pass the possibly redirected URL to switch_dir_external(), not the old one.

Fix the #include order such that svn_private_config.h is always

included first before any other svn header - if we also include

svn_hash.h.

* subversion/bindings/javahl/native/org_apache_subversion_javahl_ConfigImpl_Category.cpp,

subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c,

subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c,

subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c,

subversion/libsvn_auth_gnome_keyring/gnome_keyring.c,

subversion/libsvn_client/add.c,

subversion/libsvn_client/cat.c,

subversion/libsvn_client/changelist.c,

subversion/libsvn_client/cleanup.c,

subversion/libsvn_client/commit.c,

subversion/libsvn_client/commit_util.c,

subversion/libsvn_client/copy.c,

subversion/libsvn_client/copy_foreign.c,

subversion/libsvn_client/ctx.c,

subversion/libsvn_client/delete.c,

subversion/libsvn_client/deprecated.c,

subversion/libsvn_client/diff.c,

subversion/libsvn_client/diff_local.c,

subversion/libsvn_client/diff_summarize.c,

subversion/libsvn_client/export.c,

subversion/libsvn_client/externals.c,

subversion/libsvn_client/import.c,

subversion/libsvn_client/info.c,

subversion/libsvn_client/iprops.c,

subversion/libsvn_client/list.c,

subversion/libsvn_client/locking_commands.c,

subversion/libsvn_client/log.c,

subversion/libsvn_client/merge.c,

subversion/libsvn_client/mergeinfo.c,

subversion/libsvn_client/patch.c,

subversion/libsvn_client/prop_commands.c,

subversion/libsvn_client/ra.c,

subversion/libsvn_client/repos_diff.c,

subversion/libsvn_client/resolved.c,

subversion/libsvn_client/revert.c,

subversion/libsvn_client/status.c,

subversion/libsvn_client/switch.c,

subversion/libsvn_client/update.c,

subversion/libsvn_client/util.c,

subversion/libsvn_delta/compat.c,

subversion/libsvn_delta/xdelta.c,

subversion/libsvn_diff/parse-diff.c,

subversion/libsvn_diff/util.c,

subversion/libsvn_fs/access.c,

subversion/libsvn_fs_base/bdb/changes-table.c,

subversion/libsvn_fs_base/bdb/env.c,

subversion/libsvn_fs_base/dag.c,

subversion/libsvn_fs_base/fs.c,

subversion/libsvn_fs_base/lock.c,

subversion/libsvn_fs_base/revs-txns.c,

subversion/libsvn_fs_base/tree.c,

subversion/libsvn_fs_fs/caching.c,

subversion/libsvn_fs_fs/fs_fs.c,

subversion/libsvn_fs/fs-loader.c,

subversion/libsvn_fs_fs/lock.c,

subversion/libsvn_fs_fs/temp_serializer.c,

subversion/libsvn_fs_fs/tree.c,

subversion/libsvn_fs_util/fs-util.c,

subversion/libsvn_ra/compat.c,

subversion/libsvn_ra/deprecated.c,

subversion/libsvn_ra_local/ra_plugin.c,

subversion/libsvn_ra/ra_loader.c,

subversion/libsvn_ra_serf/blame.c,

subversion/libsvn_ra_serf/blncache.c,

subversion/libsvn_ra_serf/commit.c,

subversion/libsvn_ra_serf/getlocations.c,

subversion/libsvn_ra_serf/getlocationsegments.c,

subversion/libsvn_ra_serf/getlocks.c,

subversion/libsvn_ra_serf/inherited_props.c,

subversion/libsvn_ra_serf/log.c,

subversion/libsvn_ra_serf/merge.c,

subversion/libsvn_ra_serf/mergeinfo.c,

subversion/libsvn_ra_serf/options.c,

subversion/libsvn_ra_serf/property.c,

subversion/libsvn_ra_serf/replay.c,

subversion/libsvn_ra_serf/serf.c,

subversion/libsvn_ra_serf/update.c,

subversion/libsvn_ra_serf/util.c,

subversion/libsvn_ra_serf/xml.c,

subversion/libsvn_ra_svn/client.c,

subversion/libsvn_ra_svn/editorp.c,

subversion/libsvn_ra_svn/marshal.c,

subversion/libsvn_repos/authz.c,

subversion/libsvn_repos/commit.c,

subversion/libsvn_repos/delta.c,

subversion/libsvn_repos/deprecated.c,

subversion/libsvn_repos/fs-wrap.c,

subversion/libsvn_repos/hooks.c,

subversion/libsvn_repos/log.c,

subversion/libsvn_repos/replay.c,

subversion/libsvn_repos/reporter.c,

subversion/libsvn_repos/repos.c,

subversion/libsvn_repos/rev_hunt.c,

subversion/libsvn_subr/auth.c,

subversion/libsvn_subr/cmdline.c,

subversion/libsvn_subr/compat.c,

subversion/libsvn_subr/config_auth.c,

subversion/libsvn_subr/config.c,

subversion/libsvn_subr/deprecated.c,

subversion/libsvn_subr/dso.c,

subversion/libsvn_subr/hash.c,

subversion/libsvn_subr/io.c,

subversion/libsvn_subr/mergeinfo.c,

subversion/libsvn_subr/opt.c,

subversion/libsvn_subr/properties.c,

subversion/libsvn_subr/simple_providers.c,

subversion/libsvn_subr/sorts.c,

subversion/libsvn_subr/ssl_client_cert_providers.c,

subversion/libsvn_subr/ssl_client_cert_pw_providers.c,

subversion/libsvn_subr/ssl_server_trust_providers.c,

subversion/libsvn_subr/subst.c,

subversion/libsvn_subr/types.c,

subversion/libsvn_subr/username_providers.c,

subversion/libsvn_subr/utf.c,

subversion/libsvn_subr/win32_crypto.c,

subversion/libsvn_wc/adm_crawler.c,

subversion/libsvn_wc/adm_files.c,

subversion/libsvn_wc/adm_ops.c,

subversion/libsvn_wc/conflicts.c,

subversion/libsvn_wc/copy.c,

subversion/libsvn_wc/deprecated.c,

subversion/libsvn_wc/diff_editor.c,

subversion/libsvn_wc/diff_local.c,

subversion/libsvn_wc/entries.c,

subversion/libsvn_wc/externals.c,

subversion/libsvn_wc/info.c,

subversion/libsvn_wc/lock.c,

subversion/libsvn_wc/node.c,

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

subversion/libsvn_wc/props.c,

subversion/libsvn_wc/revert.c,

subversion/libsvn_wc/status.c,

subversion/libsvn_wc/translate.c,

subversion/libsvn_wc/update_editor.c,

subversion/libsvn_wc/upgrade.c,

subversion/libsvn_wc/wc_db.c,

subversion/libsvn_wc/wc_db_update_move.c,

subversion/libsvn_wc/wc_db_wcroot.c,

subversion/libsvn_wc/workqueue.c,

subversion/mod_dav_svn/activity.c,

subversion/mod_dav_svn/deadprops.c,

subversion/mod_dav_svn/lock.c,

subversion/mod_dav_svn/merge.c,

subversion/mod_dav_svn/mod_dav_svn.c,

subversion/mod_dav_svn/reports/update.c,

subversion/mod_dav_svn/repos.c,

subversion/mod_dav_svn/version.c,

subversion/svnadmin/svnadmin.c,

subversion/svnauth/svnauth.c,

subversion/svn/cl-conflicts.c,

subversion/svn/commit-cmd.c,

subversion/svn/conflict-callbacks.c,

subversion/svn/diff-cmd.c,

subversion/svn/help-cmd.c,

subversion/svnlook/svnlook.c,

subversion/svnmucc/svnmucc.c,

subversion/svn/notify.c,

subversion/svn/propedit-cmd.c,

subversion/svn/propget-cmd.c,

subversion/svn/props.c,

subversion/svnrdump/dump_editor.c,

subversion/svnrdump/svnrdump.c,

subversion/svnrdump/util.c,

subversion/svnserve/serve.c,

subversion/svn/status.c,

subversion/svn/status-cmd.c,

subversion/svn/svn.c,

subversion/svnsync/svnsync.c,

subversion/svnsync/sync.c,

subversion/svn/util.c,

subversion/tests/libsvn_fs/fs-test.c,

subversion/tests/libsvn_repos/repos-test.c,

subversion/tests/libsvn_subr/hashdump-test.c,

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

subversion/tests/libsvn_subr/subst_translate-test.c,

subversion/tests/libsvn_wc/conflict-data-test.c,

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

subversion/tests/libsvn_wc/wc-test.c,

subversion/tests/svn_test_fs.c,

tools/dev/fsfs-reorg.c,

tools/server-side/fsfs-stats.c): #include svn_private_config.h first

  1. … 180 more files in changeset.
* **/**

Run tools/dev/remove-trailing-whitespace.sh to remove all trailing whitespace

before we branch 1.8, like we did before creating previous branches.

No functional changes.

  1. … 199 more files in changeset.
Fix some sleep-for-timestamps code: avoid missing some cases where we need

to sleep -- especially error cases -- and avoid sleeping in some cases where

we don't need to. Simplify the code by using a consistent pattern: make the

decision of whether to sleep at the lowest level possible (ideally in the WC

layer, but not yet), and do the sleep at the highest level possible

(immediately below the libsvn_client API).

Currently we sleep before releasing the WC write lock in some places, and

after releasing it in other places. We should pick one and be consistent.

* subversion/libsvn_client/client.h

(svn_client__update_internal,

svn_client__checkout_internal,

svn_client__switch_internal,

svn_client__handle_externals): Document that the 'sleep' output is set

even if the function returns an error, and don't let it be NULL.

(svn_client__export_externals): Remove the unused and unneeded 'sleep'

output parameter.

* subversion/libsvn_client/checkout.c

(svn_client__checkout_internal): Rely on the caller to sleep even if we

throw an error. Don't always sleep on success, only if we actually

update the WC.

(svn_client_checkout3): Handle the sleep here.

* subversion/libsvn_client/commit.c

(svn_client_commit6): Sleep, if needed, even if there is an error during

the post-commit 'bumping' of the WC.

* subversion/libsvn_client/copy.c

(do_wc_to_wc_copies_with_write_lock,

do_wc_to_wc_moves,

repos_to_wc_copy_single): Return a flag instead of sleeping here. A

multi-target repos-to-WC copy will now only sleep once, not once per

target.

(do_wc_to_wc_copies,

repos_to_wc_copy_locked,

repos_to_wc_copy,

try_copy): Pass the flag through.

(svn_client_copy6,

svn_client_move7): Handle the sleep here.

* subversion/libsvn_client/export.c

(export_directory): Remove the unneeded 'sleep' variable.

* subversion/libsvn_client/externals.c

(svn_client__export_externals): Remove the unused and unneeded 'sleep'

output parameter.

* subversion/libsvn_client/revert.c

(svn_client_revert2): Sleep even when returning an error. It was missing

the case where, after reverting at least one target, a subsequent target

fails.

* subversion/libsvn_client/switch.c

(switch_internal): Rely on the caller to sleep even if we throw an error.

It missed the case where externals handling fails. Don't require a sleep

if we're using commit times as the WC timestamps.

(svn_client_switch3): Handle the sleep here.

* subversion/libsvn_client/update.c

(update_internal): Rely on the caller to sleep even if we throw an error.

It missed the case where externals handling fails. Don't require a sleep

if we're using commit times as the WC timestamps. This is also used by

checkout, so these changes affect checkout as well.

(svn_client_update4): Handle the sleep here in all cases. It missed the

case where, after updating at least one target, a subsequent target

fails.

  1. … 8 more files in changeset.
Use svn_hash_gets and svn_hash_sets.

* subversion/libsvn_client/add.c

* subversion/libsvn_client/cat.c

* subversion/libsvn_client/commit.c

* subversion/libsvn_client/commit_util.c

* subversion/libsvn_client/copy.c

* subversion/libsvn_client/copy_foreign.c

* subversion/libsvn_client/ctx.c

* subversion/libsvn_client/delete.c

* subversion/libsvn_client/deprecated.c

* subversion/libsvn_client/diff.c

* subversion/libsvn_client/diff_local.c

* subversion/libsvn_client/diff_summarize.c

* subversion/libsvn_client/export.c

* subversion/libsvn_client/externals.c

* subversion/libsvn_client/import.c

* subversion/libsvn_client/info.c

* subversion/libsvn_client/iprops.c

* subversion/libsvn_client/list.c

* subversion/libsvn_client/locking_commands.c

* subversion/libsvn_client/log.c

* subversion/libsvn_client/merge.c

* subversion/libsvn_client/mergeinfo.c

* subversion/libsvn_client/patch.c

* subversion/libsvn_client/prop_commands.c

* subversion/libsvn_client/ra.c

* subversion/libsvn_client/repos_diff.c

* subversion/libsvn_client/revert.c

* subversion/libsvn_client/status.c

* subversion/libsvn_client/switch.c

* subversion/libsvn_client/update.c

* subversion/libsvn_client/util.c

  1. … 30 more files in changeset.