Checkout Tools
  • last updated 5 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Use 'iterpool' consistently in a merge function.

This is for consistency and theoretical benefit. It does not make a

significant difference to memory usage in my testing.

Issue #4667 "Merge uses large amount of memory".

* subversion/libsvn_client/mergeinfo.c

(svn_client__mergeinfo_log): Pass iterpool consistently for scratch pools.

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.
Remove a few ';;' instances from our code.

No functional changes.

* subversion/libsvn_client/deprecated.c

(svn_client_uuid_from_url):

* subversion/libsvn_client/mergeinfo.c

(svn_client__mergeinfo_log):

* subversion/libsvn_subr/stream.c

(create_tempfile):

* subversion/libsvn_wc/conflicts.c

(svn_wc__read_conflicts):

* subversion/libsvn_wc/merge.c

(detranslate_wc_file):

* subversion/svnmucc/svnmucc.c

(execute): Remove duplicated ';'.

  1. … 5 more files 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.
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.
Reverting experimental move-related APIs.

For details see http://svn.haxx.se/dev/archive-2014-05/0155.shtml

This effectively reverts revisions 1595600,1572044,1547039,1535341,

1535330,1535080,1535029,1534280,1532200,1527217,1527088,1526057,

1526014,1526013,1525484,1525467,1525464,1525463,1525462,1525460,

1525459,1525453,1525448,1525442,1525432,1525429 and 1525419.

Remove respective entries from CHANGES.

  1. … 43 more files in changeset.
* subversion/libsvn_client/mergeinfo.c

(svn_client__elide_mergeinfo): A tiny simplification: don't pass or return

arguments that we don't use.

* subversion/libsvn_client/mergeinfo.c

(svn_client__elide_mergeinfo): A tiny simplification: when we want only

explicit mergeinfo, ask for only explicit mergeinfo.

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.
* subversion/libsvn_client/mergeinfo.c

(svn_client__get_wc_mergeinfo): A tiny tweak: use the scratch pool

instead of the result pool in one place where we can.

Remove two more WC-NG transient api functions that should have been removed

a long time ago.

* subversion/include/private/svn_wc_private.h

(svn_wc__node_get_depth): Remove function with single caller.

(svn_wc__node_get_origin): Add depth output argument.

(svn_wc__node_is_status_deleted): Remove function without public caller.

* subversion/libsvn_client/commit.c

(get_ra_editor): Update commented out caller.

* subversion/libsvn_client/commit_util.c

(harvest_not_present_for_copy,

harvest_status_callback): Update caller.

* subversion/libsvn_client/copy.c

(wc_to_repos_copy,

try_copy): Update caller.

* subversion/libsvn_client/diff.c

(diff_repos_wc): Update caller.

* subversion/libsvn_client/merge.c

(filter_self_referential_mergeinfo): Update caller.

* subversion/libsvn_client/mergeinfo.c

(svn_client__get_wc_or_repos_mergeinfo_catalog): Update caller.

* subversion/libsvn_client/prop_commands.c

(svn_client_propget5,

get_remote_props): Update caller. Remove unneeded output arguments.

* subversion/libsvn_client/ra.c

(svn_client__repos_locations): Update caller.

(svn_client__ra_provide_base,

svn_client__ra_provide_props): Update callers that should probably look

at BASE instead of the copy origin.

* subversion/libsvn_client/revisions.c

(svn_client__get_revision_number): Update caller.

* subversion/libsvn_client/util.c

(svn_client__wc_node_get_origin): Update caller.

* subversion/libsvn_wc/node.c

(svn_wc__node_is_status_deleted): Remove function, fold into caller.

(svn_wc__internal_get_origin): Add output argument handling.

(svn_wc__node_get_origin): Add output argument.

(svn_wc__node_was_moved_away): Add local implementation of

svn_wc__node_is_status_deleted.

* subversion/libsvn_wc/wc.h

(svn_wc__internal_get_origin): Add argument.

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

(test_node_get_origin): Update caller.

  1. … 14 more files in changeset.
Get rid of the ever increasing number of private apis in svn_sorts.h by adding

a new private/svn_sorts_private.h file with the private parts and updating the

needed #include-s.

*AND*

Improve error reporting during xml parsing in ra_serf a bit.

For 1.9 the number of private apis in this public header more than doubled,

doubling the original filesize, while our policy is to never add private

functions in public headers.

* build.conf

(libsvn_subr): Add export.

* subversion/include/private/svn_sorts_private.h

New file, copied from ../svn_sorts.h.

* subversion/include/svn_sorts.h

Remove everything possible in our private namespace. Keeping some

references.

* subversion/libsvn_client/diff_local.c

* subversion/libsvn_client/import.c

* subversion/libsvn_client/info.c

* subversion/libsvn_client/list.c

* subversion/libsvn_client/merge.c

* subversion/libsvn_client/mergeinfo.c

* subversion/libsvn_client/status.c

* subversion/libsvn_delta/compat.c

* subversion/libsvn_fs_fs/cached_data.c

* subversion/libsvn_fs_fs/index.c

* subversion/libsvn_fs_fs/low_level.c

* subversion/libsvn_fs_fs/pack.c

* subversion/libsvn_fs_fs/temp_serializer.c

* subversion/libsvn_fs_fs/transaction.c

* subversion/libsvn_fs_x/index.c

* subversion/libsvn_fs_x/low_level.c

* subversion/libsvn_fs_x/pack.c

* subversion/libsvn_fs_x/transaction.c

* subversion/libsvn_ra/compat.c

* subversion/libsvn_ra_serf/inherited_props.c

* subversion/libsvn_ra_serf/lock.c

* subversion/libsvn_repos/dump.c

* subversion/libsvn_repos/fs-wrap.c

* subversion/libsvn_subr/cmdline.c

* subversion/libsvn_subr/hash.c

* subversion/libsvn_subr/mergeinfo.c

* subversion/libsvn_subr/sorts.c

* subversion/libsvn_wc/adm_ops.c

* subversion/libsvn_wc/diff_editor.c

* subversion/libsvn_wc/status.c

* subversion/libsvn_wc/wc_db.c

* subversion/libsvn_wc/wc_db_update_move.c

* subversion/mod_dav_svn/repos.c

* subversion/svn/log-cmd.c

* subversion/svn/propget-cmd.c

* subversion/svnadmin/svnadmin.c

* subversion/svnlook/svnlook.c

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

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

Fix includes.

* subversion/libsvn_ra_serf/util.c

(expat_response_handler): Combine XML errors with our custom parser errors

instead of only reporting one or the other.

  1. … 42 more files in changeset.
* subversion/libsvn_client/mergeinfo.c

(svn_client_suggest_merge_sources): Following up on r1552265, fix pool

lifetime issue by allocating result in resultpool instead of temp pool.

Found by: The JavaHL tests

Re-use ra sessions when determining where a path is copied from using a

libsvn_client internal api. Give public api a caller from our test suite

by adding a simple C test.

* subversion/libsvn_client/client.h

(svn_client__get_copy_source): Add argument.

* subversion/libsvn_client/log.c

(svn_client__get_copy_source): Add support for using an existing session.

* subversion/libsvn_client/merge.c

(normalize_merge_sources_internal): Pass existing ra session.

* subversion/libsvn_client/mergeinfo.c

(svn_client_suggest_merge_sources): Open ra session and pass it to two

functions instead of having them create and close their own sessions.

Use subpool.

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

(test_suggest_mergesources): New test.

(test_funcs): Add test_suggest_mergesources.

  1. … 4 more files in changeset.
Replace use of deprecated svn_ra_get_log2 in a couple of places.

* subversion/include/svn_ra.h (svn_ra_get_log2): Fix docstring.

* subversion/libsvn_client/merge.c (get_log): Use svn_ra_get_log3.

* subversion/libsvn_client/mergeinfo.c

(logs_for_mergeinfo_rangelist): Likewise.

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

(filter_log_entry_with_rangelist): Add two missing NULL-checks before

dereferencing pointers. Fixes a crash with 'svn mergeinfo'.

Reported by: Matthias Vorwerk

http://svn.haxx.se/users/archive-2013-09/0013.shtml

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.
Optimize the ra session usage in the mergeinfo obtain code in general and

in the automatic merge calculation in particular. (Part of issue #4351)

This reduces the typical required ra sessions for calculating an automatic

merge to just 2 from about 8-10 before this patch. It should be possible

to reduce this number to 1 as for automatic merges the source and target

repository must be the same repository.

* subversion/include/private/svn_client_private.h

(svn_client__mergeinfo_log): Add ra_session argument.

* subversion/libsvn_client/merge.c

(short_circuit_mergeinfo_log): Pass ra session to svn_client__mergeinfo_log

and restore old session url.

(find_last_merged_location): Forward ra_session.

(find_base_on_source): Pass ra_session.

* subversion/libsvn_client/mergeinfo.c

(get_mergeinfo): Reuse ra session if provided.

(logs_for_mergeinfo_rangelist): Reuse ra session by calling svn_ra_get_log2

directly instead of performing more work to delegate everything to

svn_client_log5, which then needs to perform more ra calls to obtain

the same result.

(svn_client_mergeinfo_get_merged): Update caller.

(svn_client__mergeinfo_log): Accept ra session to avoid creating target

and if possible also source ra sessions. Keep the session pool alive longer

to allow using the same ra session to run the log on.

(svn_client_mergeinfo_log2,

svn_client_suggest_merge_sources): Update caller.

  1. … 2 more files in changeset.
Revert the "just-for-symmetry" changes made in r1483532 and keep only

those used for log and merge info in tight loops.

* subversion/libsvn_client/add.c

(svn_client__get_all_auto_props): switch back to svn_hash_[g|s]ets

* subversion/libsvn_client/commit_util.c

(svn_client__ensure_revprop_table): same

* subversion/libsvn_client/copy.c

(repos_to_wc_copy_single): same

* subversion/libsvn_client/list.c

(svn_client__ra_stat_compatible): same

* subversion/libsvn_client/log.c

(pre_15_receiver): same

* subversion/libsvn_client/merge.c

(prepare_merge_props_changed, merge_file_added, merge_dir_added,

merge_dir_deleted): same

* subversion/libsvn_client/mergeinfo.c

(svn_client__get_wc_or_repos_mergeinfo_catalogue): same

* subversion/libsvn_fs_base/tree.c

(txn_body_get_mergeinfo_data_and_entries,

txn_body_get_mergeinfo_for_path): same

* subversion/libsvn_fs_fs/fs_fs.c

(write_revision_zero): same

* subversion/libsvn_fs_fs/tree.c

(get_mergeinfo_for_path_internal): same

* subversion/libsvn_ra/deprecated.c

(svn_ra_get_commit_editor2): same

* subversion/libsvn_ra_local/ra_plugin.c

(svn_ra_local__get_commit_editor, svn_ra_local__get_commit_ev2): same

* subversion/libsvn_ra_svn/client.c

(ra_svn_commit): same

* subversion/libsvn_repos/commit.c

(svn_repos__get_commit_ev2): same

* subversion/libsvn_repos/delta.c

(delta_proplists): same

* subversion/libsvn_repos/deprecated.c

(svn_repos_get_commit_editor4): same

* subversion/libsvn_repos/dump.c

(dump_node, write_revision_record): same

* subversion/libsvn_repos/fs-wrap.c

(svn_repos_fs_begin_txn_for_commit2, svn_repos_fs_begin_txn_for_commit,

svn_repos_fs_revision_proplist): same

* subversion/libsvn_repos/reporter.c

(get_revision_info): same

* subversion/libsvn_wc/status.c

(collect_ignore_patterns): same

* subversion/mod_dav_svn/activity.c

(dav_svn__create_txn): same

* subversion/mod_dav_svn/lock.c

(append_locks): same

* subversion/svndumpfilter/svndumpfilter.c

(output_revision): same

* subversion/svnmucc/svnmucc.c

(execute, sanitize_log_sources): same

* subversion/svnrdump/load_editor.c

(new_node_record): same

* subversion/svnserve/serve.c

(commit): same

* subversion/svnsync/svnsync.c

(replay_rev_started): same

  1. … 26 more files in changeset.
We frequently use property name constants in conjunction with hash containers.

Provide new wrappers around apr_hash_get and apr_hash_set that accept such

string constants and statically determine their size. That minimizes the

hash access costs.

Mass change hash get and set calls for SVN_PROP_* constants.

* subversion/include/svn_hash.h

(svn_hash_gets,

svn_hash_sets): Doxygen-ize the docstring

(svn_hash_gets_fixed_key,

svn_hash_sets_fixed_key): define new apr_hash_* wrapper

* subversion/libsvn_client/add.c

(svn_client__get_all_auto_props): use faster hash wrappers with SVN_PROP_*

* subversion/libsvn_client/commit_util.c

(svn_client__ensure_revprop_table): ditto

* subversion/libsvn_client/copy.c

(repos_to_wc_copy_single): ditto

* subversion/libsvn_client/list.c

(svn_client__ra_stat_compatible): ditto

* subversion/libsvn_client/log.c

(pre_15_receiver): ditto

* subversion/libsvn_client/merge.c

(prepare_merge_props_changed, merge_file_added, merge_dir_added,

merge_dir_deleted): ditto

* subversion/libsvn_client/mergeinfo.c

(svn_client__get_wc_or_repos_mergeinfo_catalog): ditto

* subversion/libsvn_fs_base/tree.c

(txn_body_get_mergeinfo_data_and_entries,

txn_body_get_mergeinfo_for_path): same

* subversion/libsvn_fs_fs/fs_fs.c

(write_revision_zero): same

* subversion/libsvn_fs_fs/tree.c

(crawl_directory_dag_for_mergeinfo, get_mergeinfo_for_path_internal): same

* subversion/libsvn_ra/deprecated.c

(svn_ra_get_commit_editor2): same

* subversion/libsvn_ra_local/ra_plugin.c

(svn_ra_local__get_commit_editor, svn_ra_local__get_commit_ev2): same

* subversion/libsvn_ra_svn/client.c

(ra_svn_commit, ra_svn_log): same

* subversion/libsvn_repos/commit.c

(svn_repos__get_commit_ev2): same

* subversion/libsvn_repos/delta.c

(delta_proplists): same

* subversion/libsvn_repos/deprecated.c

(svn_repos_get_commit_editor4): same

* subversion/libsvn_repos/dump.c

(dump_node, write_revision_record):

* subversion/libsvn_repos/fs-wrap.c

(svn_repos_fs_begin_txn_for_commit2, svn_repos_fs_begin_txn_for_commit,

svn_repos_fs_revision_proplist): same

* subversion/libsvn_repos/log.c

(fill_log_entry): same

* subversion/libsvn_repos/reporter.c

(get_revision_info): same

* subversion/libsvn_repos/rev_hunt.c

(svn_repos_get_committed_info): same

* subversion/libsvn_subr/compat.c

(svn_compat_log_revprops_clear, svn_compat_log_revprops_out): same

* subversion/libsvn_wc/status.c

(collect_ignore_patterns): same

* subversion/mod_dav_svn/activity.c

(dav_svn__create_txn): same

* subversion/mod_dav_svn/lock.c

(append_locks): same

* subversion/svndumpfilter/svndumpfilter.c

(output_revision): same

* subversion/svnmucc/svnmucc.c

(execute, sanitize_log_sources): same

* subversion/svnrdump/load_editor.c

(new_node_record): same

* subversion/svnserve/serve.c

(commit): same

* subversion/svnsync/svnsync.c

(replay_rev_started): same

[Most of this got reverted in r1483610]

[Remainder reverted in r1484181]

  1. … 30 more files in changeset.
A small bit of issue #4351 'improve automatic merge performance' work: Avoid

one to two network roundtrips to get the *same* mergeinfo catalogs while

calculating automatic merges.

* subversion/include/private/svn_client_private.h

(svn_client__mergeinfo_log): New, wrapper around

svn_client_mergeinfo_log2().

* subversion/libsvn_client/merge.c

(short_circuit_mergeinfo_log): Wrap svn_client__mergeinfo_log instead of

svn_client_mergeinfo_log2 (yes, it's a wrapper of a wrapper). Add a

in/out parameter for the target's mergeinfo catalog.

(find_last_merged_location): Update calls to short_circuit_mergeinfo_log().

On the first call, let the callee get the target's mergeinfo catalog. On

the second call, pass the callee the target's mergeinfo catalog, thus

preventing it from asking the repository the same question twice.

* subversion/libsvn_client/mergeinfo.c

(svn_client__mergeinfo_log): New, but mostly the old implementation of

svn_client_mergeinfo_log2().

(svn_client_mergeinfo_log2): Now just a wrapper around

svn_client__mergeinfo_log().

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

(logs_for_mergeinfo_rangelist): No need for qsort, svn_rangelist_t are

already sorted.

* **/**

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.
Tighten input requirements for a function to simplify its documentation

and input validation.

* subversion/include/svn_client.h

(svn_client_mergeinfo_log2): Update docstring to explain that

source_start_revision and source_end_revision must have matching

levels of specificity, and otherwise rework it for clarity.

* subversion/libsvn_client/mergeinfo.c

(svn_client_mergeinfo_log2): Require source_start_revision and

source_end_revision to either both be specified, or both be

unspecified.

* subversion/svn/mergeinfo-cmd.c

(svn_cl__mergeinfo): Tweak to honor new requirements for

'source_start_revision' and 'source_end_revision' parameters of

svn_client_mergeinfo_log2().

  1. … 2 more files in changeset.
Support 'svn mergeinfo -rSTART:END' requests where START > END.

Nobody is clamoring for this feature, but the API changes may help me with

an an ongoing issue #4329 'automatic merge uses reintegrate type merge if

source is fully synced' fix.

* subversion/include/svn_client.h

(svn_client_mergeinfo_log2): Update doc string; previously we didn't

specify what we did in the case where the start revision was younger

than the end revision.

* subversion/libsvn_client/mergeinfo.c

(logs_for_mergeinfo_rangelist): Add a new boolean argument signaling that

the caller wants the merged/eligible revisions from youngest to oldest.

(svn_client_mergeinfo_log2): Tolerate callers who specify a start revision

younger than the end revision. Update call to

logs_for_mergeinfo_rangelist.

* subversion/tests/cmdline/mergeinfo_tests.py

(recursive_mergeinfo): Expand to test the case where merged/eligible

revisions are requested in youngest to oldest order.

* subversion/tests/cmdline/svntest/actions.py

(run_and_verify_mergeinfo): Don't sort the expected output, the doc string

makes no such promises and it prevents us from expecting any output other

than oldest to youngest.

  1. … 3 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.
* subversion/libsvn_client/mergeinfo.c

(svn_client__record_wc_mergeinfo_catalog): Tweak the comment added in

r1452583.

* subversion/libsvn_client/mergeinfo.h,

subversion/libsvn_client/mergeinfo.c

(svn_client__record_wc_mergeinfo_catalog): Add more documentation.

  1. … 1 more file in changeset.
Rev the standard libsvn_client api used for opening ra sessions, to allow

access to the libsvn_wc pristine store in many more cases. This allows serf

to obtain texts from the local working copy in many cases where it first

couldn't.

For just merge_tests.py this patch makes libsvn_ra_serf avoid more than 550

http requests.

* subversion/include/private/svn_client_private.h

(svn_client__ra_session_from_path2): Update documentation.

* subversion/include/svn_client.h

(svn_client_open_ra_session2): New function.

(svn_client_open_ra_session): Deprecate function.

* subversion/libsvn_client/add.c

(mkdir_urls): Update caller.

* subversion/libsvn_client/client.h

(svn_client__open_ra_session_internal): Change some arguments. Update

documentation. Add scratch_pool.

* subversion/libsvn_client/commit.c

(check_url_kind): Update caller.

* subversion/libsvn_client/copy.c

(repos_to_repos_copy): Update caller.

(wc_to_repos_copy): Use session pool to avoid opening two sessions at the

same time. Remove unneeded wait for timestamps, as we do a repository only

commit here.

(repos_to_wc_copy): Update caller.

* subversion/libsvn_client/delete.c

(delete_urls_multi_repos): Update caller.

* subversion/libsvn_client/deprecated.c

(svn_client_open_ra_session): New function.

(svn_client_uuid_from_url): Wrap svn_client_get_repos_root, but with a

subpool to avoid keeping ra sessions open in functions without dual pools.

(svn_client_root_url_from_path): Use session pool, as there is no result_pool.

* subversion/libsvn_client/diff.c

(diff_prepare_repos_repos,

diff_repos_repos): Obtain wri_abspath and use it when opening ra

session.

(diff_repos_wc,

diff_summarize_repos_repos): Update caller.

* subversion/libsvn_client/import.c

(svn_client_import5): Update caller.

* subversion/libsvn_client/iprops.c

(get_inheritable_props): Update caller.

* subversion/libsvn_client/list.c

(svn_client__ra_stat_compatible): Update caller.

* subversion/libsvn_client/locking_commands.c

(svn_client_lock,

svn_client_unlock): Update caller.

* subversion/libsvn_client/merge.c

(ensure_ra_session_url): Pass wri_abspath to speed up merging.

(open_reintegrate_source_and_target,

svn_client_find_automatic_merge,

do_automatic_merge_locked): Update caller.

* subversion/libsvn_client/mergeinfo.c

(svn_client__get_wc_or_repos_mergeinfo_catalog): Update caller.

* subversion/libsvn_client/prop_commands.c

(propset_on_url,

svn_client_revprop_set2): Update caller.

(svn_client_revprop_get,

svn_client_revprop_list): Update caller. Introduce subpool for function

without result_pool argument.

* subversion/libsvn_client/ra.c

(callback_baton_t): Add wcroot_abspath argument to make looking this up

from the ra call a hashtable lookup.

(get_wc_contents): Use wcroot_abspath.

(svn_client__open_ra_session_internal): Separate wri_abspath and base

abspath handling. Use scratch_pool where possible.

(svn_client_open_ra_session): Rename to ...

(svn_client_open_ra_session2): ... this and update caller.

(svn_client__ra_session_from_path2): Update caller.

(svn_client__repos_locations): Update caller.

(svn_client__get_youngest_common_ancestor): Update caller.

* subversion/libsvn_client/status.c

(reporter_finish_report,

svn_client_status5): Update caller.

* subversion/libsvn_client/update.c

(update_internal): Update caller.

* subversion/libsvn_client/util.c

(svn_client_get_repos_root): Update caller.

  1. … 19 more files in changeset.