Checkout Tools
  • last updated 29 mins ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
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.
Make the svn_client_cat3 API consistent with the rest of the svn_client

space by not admitting to the existence of entry or WC props.

* subversion/include/svn_client.h (svn_client_cat3):

Update the docstring to not mention entry props at all.

* subversion/libsvn_client/cat.c (svn_client_cat3):

Filter entry and WC props from the set that came from the

RA layer, and always set the output parameter for returned

properties just before streaming the file contents.

  1. … 1 more file in changeset.
* subversion/libsvn_client/cat.c

(svn_client_cat3): Remove redundant code: this call to select a default

peg revision was placed in the 'if' branch where an explicit peg revision

has been given.

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.
Make the 'svn_client_cat()' API a bit more generic usable for api users,

by allowing the suppression of keyword expansion and by optionally returning

the properties of the node.

* subversion/include/svn_client.h

(svn_client_cat3): New function.

(svn_client_cat2): Deprecate function.

* subversion/libsvn_client/cat.c

(svn_client_cat2): Rename to ...

(svn_client_cat3): ... this. Add support for not expanding keywords and

for returning the properties.

* subversion/libsvn_client/deprecated.c

(svn_client_cat2): New function.

  1. … 2 more files in changeset.
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.
Following up on r1466570, avoid doing unneeded work in a few common code paths.

* subversion/libsvn_client/cat.c

(svn_client__get_normalized_stream): Use svn_wc__node_get_repos_info to

obtain the url and the repository root.

* subversion/libsvn_subr/subst.c

(keyword_printf): Just check against the empty string (=normalized form)

instead of complete url check.

* subversion/libsvn_wc/translate.c

(svn_wc__expand_keywords): Don't fetch the repository root url when just

normalizing to the repository normal form.

  1. … 2 more files in changeset.
Add support for custom keyword definitions, fixing issue #890.

Custom keywords can be defined using a format string which controls

the way keyword information is expanded. For instance, a keyword set

the command 'svn propset svn:keywords MyKeyword=%a%_%b%_%d myfile'

can be referenced in 'myfile' as $MyKeyword$, and expands to the author,

a space, the file's name ('myfile'), another space, and the short

representation of the date of the last-changed revision.

The following format codes are currently available:

%a - The author.

%b - The basename of the URL.

%d - Short format of the date.

%D - Long format of the date.

%P - The file's path, relative to the repository root URL.

%r - The revision.

%R - The URL to the root of the repository.

%u - The URL of the file.

%_ - A space (keyword definitions cannot contain a literal space).

%% - A literal '%'.

Most of these were already defined internally in libsvn_subr.

This patch adds the %P, %R, and %_ format codes.

More format codes could be added in the future but might require API changes.

Based on a patch submitted several times by various FreeBSD developers

who have added this feature to their port of Subversion.

I'm crediting those who I know were involved in this patch in one way

or another. But I don't know for sure who wrote the initial implementation.

Patch by: Peter Wemm <peter{_AT_}FreeBSD.org>

David O'Brien <obrien{_AT_}FreeBSD.org>

Lev A. Serebryakov <lev{_AT_}FreeBSD.org>

Alfred Perlstein <alfred{_AT_}FreeBSD.org>

me

* subversion/include/svn_subst.h

(svn_subst_build_keywords3): Declare.

(svn_subst_build_keywords2): Deprecate.

* subversion/libsvn_client/cat.c

(svn_client__get_normalized_stream): Call svn_subst_build_keywords3().

* subversion/libsvn_client/export.c

(export_node, close_file): Call svn_subst_build_keywords3().

* subversion/libsvn_client/import.c

(send_file_contents): Call svn_subst_build_keywords3().

* subversion/libsvn_subr/subst.c

(keyword_printf): Add support for %P, %R, and %_. Add repos_root_url

parameter which is required to implement these new format codes.

(build_keywords): New helper function which implements the guts of

svn_subst_build_keywords2() and svn_subst_build_keywords3().

(svn_subst_build_keywords2): Reimplement as wrapper around build_keywords().

Turn off support for custom keywords to ensure backwards compatibility.

(svn_subst_build_keywords3): New, implemented as wrapper around the

build_keywords() helper. Enable support for custom keywords.

* subversion/libsvn_wc/translate.c

(svn_wc__expand_keywords): Call svn_subst_build_keywords3().

* subversion/svn/svn.c

(svn_cl__cmd_table): Document the custom keywords feature, including the

support format codes, in the output of 'svn help propset'.

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

(test_svn_subst_build_keywords3): New test.

(test_funcs): Add new test.

  1. … 7 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.
Replace some deprecated calls in libsvn_client with calls to the

newer functions.

* subversion/libsvn_client/cat.c

(svn_client__get_normalized_stream): Update caller.

* subversion/libsvn_client/cmdline.c

(svn_client_args_to_target_array2): Update caller.

* subversion/libsvn_client/commit.c

(check_nonrecursive_dir_delete): Update caller.

* subversion/libsvn_client/commit_util.c

(harvest_not_present_for_copy): Update caller.

* subversion/libsvn_client/copy_foreign.c

(svn_client__copy_foreign): Update caller.

* subversion/libsvn_client/diff.c

(diff_wc_wc,

diff_repos_wc,

diff_summarize_wc_wc): Update caller.

* subversion/libsvn_client/externals.c

(switch_file_external,

handle_external_item_removal,

svn_client__handle_externals): Update caller.

* subversion/libsvn_client/merge.c

(insert_parent_and_sibs_of_sw_absent_del_subtree,

get_mergeinfo_paths,

log_find_operative_subtree_revs,

flag_subtrees_needing_mergeinfo,

record_mergeinfo_for_added_subtrees,

ensure_wc_is_suitable_merge_target,

get_target_and_lock_abspath): Update caller.

* subversion/libsvn_client/ra.c

(svn_client__ra_get_copysrc_kind): Update caller.

* subversion/libsvn_client/status.c

(svn_client_status5): Update caller.

* subversion/libsvn_client/switch.c

(switch_internal): Update caller.

* subversion/libsvn_client/update.c

(update_internal): Update caller.

* subversion/libsvn_client/upgrade.c

(svn_client_upgrade): Update caller.

  1. … 12 more files in changeset.
* subversion/libsvn_client/cat.c

(svn_client__get_normalized_stream): Improve error message.

* subversion/libsvn_client/cat.c

(svn_client__get_normalized_stream): Handle a file as modified for more

changes than just text changes. (Handles props and tree changes)

Simplify some code in 'svn cat' handling.

* subversion/libsvn_client/cat.c

(svn_client__get_normalized_stream): Avoid a call to a wc_db function by

only obtaining the time when necessary and even then in an existing call.

Convert the remaining callers of svn_client__ra_session_from_path() to use

svn_client__ra_session_from_path2(), which returns the resolved location as

a path-rev structure. Remove svn_client__ra_session_from_path().

The revving of the function name was only useful for the period over which

this conversion took place, and the "2" suffix can be dropped from the new

function's name after this commit.

* subversion/libsvn_client/client.h,

subversion/libsvn_client/ra.c

(svn_client__ra_session_from_path): Delete.

* subversion/libsvn_client/blame.c

(svn_client_blame5): Use svn_client__ra_session_from_path2() instead.

* subversion/libsvn_client/cat.c

(svn_client_cat2): Same.

* subversion/libsvn_client/export.c

(svn_client_export5): Same.

* subversion/libsvn_client/list.c

(svn_client_list2): Same.

* subversion/libsvn_client/log.c

(svn_client__get_copy_source, svn_client_log5): Same.

* subversion/libsvn_client/mergeinfo.c

(get_mergeinfo): Same.

* subversion/libsvn_client/prop_commands.c

(svn_client_propget4, svn_client_proplist3): Same.

  1. … 8 more files in changeset.
Follow-up to r961254: Fix issue #3989 'merge which deletes file with native

eol-style raises spurious tree conflict'.

* subversion/libsvn_client/client.h

(svn_client__get_normalized_stream): Add a new argument

* subversion/libsvn_client/cat.c

(svn_client__get_normalized_stream): Don't "normalize" eols to the value

of the svn:eol-style property (if such is set). Rather, normalize eols

to SVN_SUBST_NATIVE_EOL_STR if asked to do so and the svn:eol-property

is set or leave the eols as is otherwise.

(svn_client_cat2): Update call to svn_client__get_normalized_stream,

keeping prior behavior, that eols not be normalized.

* subversion/libsvn_client/merge.c

(files_same_p): Update call to svn_client__get_normalized_stream, asking

that eols be normalized.

* subversion/tests/cmdline/merge_tests.py

(merged_deletion_causes_tree_conflict): Remove XFail decorator and comment.

  1. … 3 more files in changeset.
Followup to r1140505. Fix indentation.

* [everywhere]: Fix indentation fallout from the

svn_error_return() -> svn_error_trace() rename.

Patch by: Noorul Islam K M <noorul{_AT_}collab.net>

  1. … 37 more files in changeset.
Rename the 'svn_error_return' macro to 'svn_error_trace'.

See email thread "[RFC] Rename 'svn_error_return' to 'svn_error_trace'?" on

2011-06-23, <http://svn.haxx.se/dev/archive-2011-06/0708.shtml>.

* subversion/include/svn_error.h

(svn_error_return): Rename to svn_error_trace.

(SVN_ERR, svn_error_purge_tracing): Track the rename.

* [everywhere]: Track the rename.

  1. … 120 more files in changeset.
* subversion/libsvn_client/cat.c

(svn_client_cat2): Remove svn_ra_check_path() call and handle

SVN_ERR_FS_NOT_FILE error code.

Remove a hacky use of a libsvn_wc function, by reusing some existing

libsvn_client code.

* subversion/include/private/svn_wc_private.h

(svn_wc__versioned_file_modcheck): Remove.

* subversion/libsvn_wc/questions.c

(svn_wc__versioned_file_modcheck): Remove.

* subversion/libsvn_client/client.h

(svn_client__get_normalized_stream): New.

* subversion/libsvn_client/merge.c

(files_same_p): Do the comparison manually, using a couple of streams, rather

than with a libsvn_wc API.

* subversion/libsvn_client/cat.c

(cat_local_file): Rename from this...

(svn_client__get_normalized_stream): ...to this.

(svn_client_cat2): Update caller.

  1. … 4 more files in changeset.
Make a cat helper function a bit more useful, but returning a normalizing

stream, rather than doing the stream copy internally. The utility is not

yet implemented, but will be shortly.

* subversion/libsvn_client/cat.c

(cat_local_file): Return a normalizing stream, rather than doing the

stream copy internally.

(svn_client_cat2): Update caller, by doing the stream copy here.

Publicize a information-retrieving svn_wc__node_ function. This function has

shown the need for widespread use, and is hereby promoted to public status.

* subversion/include/svn_wc.h

(svn_wc_read_kind): New, moved from...

* subversion/include/private/svn_wc_private.h

(svn_wc__node_get_kind): ...here.

* subversion/libsvn_wc/node.c

(svn_wc__node_get_kind): Renamed to...

(svn_wc_read_kind): ...this.

* subversion/svn/*

* subversion/libsvn_client/*

* subversion/libsvn_wc/*:

Update callers.

  1. … 21 more files in changeset.
Use svn_wc_get_pristine_props() where appropriate, instead of

svn_wc_prop_diffs2()

* subversion/libsvn_client/cat.c:

(cat_local_file): switch to svn_wc_get_pristine_props

* subversion/libsvn_client/export.c:

(copy_one_versioned_file): switch to svn_wc_get_pristine_props

* subversion/libsvn_client/mergeinfo.c:

(svn_client__get_wc_or_repos_mergeinfo_catalog): switch to

svn_wc_get_pristine_props

  1. … 2 more files in changeset.
As part of replacing the entries field in svn_wc_status2_t for WC-NG, we

rev it to svn_wc_status3_t. No semantic changes, except for adjusting some

compat wrappers, else just revving.

As for now, the compat wrappers just casts to the previous type. When we

start doing changes, the conversions will be a lot more complicated.

* subversion/include/svn_wc.h

(svn_wc_status3_t): New. An exact copy svn_wc_status2_t at the moment.

(svn_wc_status2_t): Mark as deprecated.

(svn_wc_dup_status3): New.

(svn_wc_dup_status2): Mark as deprecated.

(svn_wc_status3,

svn_wc_status_func4_t): Replace svn_wc_status2_t parameter.

* subversion/include/private/svn_wc_private.h

(svn_wc__is_sendable_status): Replace svn_wc_status2_t.

* subversion/libsvn_wc/status.c

(edit_baton): Replace svn_wc_status2_t.

(dir_baton): Update comment referring to status2_t.

(internal_status,

assemble_status,

send_status_structure,

send_unversioned_item,

handle_externals,

hash_stash,

tweak_statushash,

find_dir_url,

make_dir_baton,

svn_wc__is_sendable_status,

mark_deleted,

handle_statii,

close_directory): Replace svn_wc_status2_t.

(svn_wc_dup_status3): New.

(svn_wc_dup_status2): Moved from here ..

* subversion/libsvn_wc/deprecated.c

(svn_wc_dup_status2): .. to here.

(status4_wrapper_func): Replace svn_wc_status2_t parameter and use

svn_wc_dup_status3().

(svn_wc_status2): Use svn_wc_status3() for fetching the status struct.

* subversion/libsvn_client/deprecated.c

(status4_wrapper_func): Use the new status3_t type.

* subversion/libsvn_client/blame.c,

subversion/libsvn_client/cat.c,

subversion/libsvn_client/commit.c,

subversion/libsvn_client/delete.c,

subversion/libsvn_client/export.c,

subversion/libsvn_client/merge.c,

subversion/libsvn_client/patch.c,

subversion/libsvn_client/status.c:

subversion/svn/status-cmd.c

subversion/svn/status.c

subversion/svn/cl.h

Use the new svn_wc_status3_t and in some cases svn_wc_dup_status3().

Approved by: gstein

  1. … 15 more files in changeset.
Fix all callers of svn_wc_get_pristine_contents2() and

svn_wc__get_pristine_contents(): make them able to cope with a returned NULL

stream pointer in *CONTENTS, as advertised by that function.

All current callers would have broken when svn_wc_get_pristine_contents2() was

returning NULL in *CONTENTS as described in the comment. That's probably

because the current implementation in effect assumes the text-base file to be

always present and never successfully returns NULL in *CONTENTS.

This patch adds sensitivity for a NULL returned in *CONTENTS to all callers,

to prepare for a patch that fixes svn_wc_get_pristine_contents2().

* subversion/libsvn_client/cat.c

(cat_local_file):

Handle a return value of *CONTENT == NULL by returning

SVN_ERR_ILLEGAL_TARGET. (Previously failed with an error complaining about

a non-existing text-base file.)

* subversion/libsvn_client/export.c

(copy_one_versioned_file):

Remove a condition that tried to avoid getting a non-existing base and

instead use svn_wc_get_pristine_contents2()'s NULL return value to achieve

the same. This also skips export for replaced files that have no base,

where previously only added files were checked. Add TODO comment to ask

for proper treatment of replaced files (previously possibly failed with an

error complaining about a non-existing text-base file).

(copy_versioned_files):

Fix a condition that avoids getting a non-existing base to also check

replaced files (was checking only added files), and to not skip files that

were copied-/moved-here. (This function can skip more stuff than

copy_one_versioned_file(), so taking a different approach here.) Comment.

* subversion/libsvn_wc/adm_crawler.c

(restore_file):

Handle a return value of *CONTENT == NULL by skipping restoration for such

nodes. (Previously possibly failed with an error complaining about a

non-existing text-base file.)

(svn_wc__internal_transmit_text_deltas):

Handle a return value of *CONTENT == NULL by using an empty stream

instead (in two places).

* subversion/libsvn_wc/copy.c

(copy_file_administratively):

Fix a condition that avoids getting a non-existing base to also check

replaced files (was checking only added files), and to not skip files that

were copied-/moved-here. Add two assertions to make sure we have covered

all cases. Add TODO comment to ask for proper treatment of replaced files.

* subversion/libsvn_wc/diff.c

(apply_textdelta):

Handle a return value of *CONTENT == NULL by using an empty stream

instead.

* subversion/libsvn_wc/questions.c

(svn_wc__internal_text_modified_p):

Handle a return value of *CONTENT == NULL by returning *MODIFIED_P = TRUE.

(Previously possibly failed with an error complaining about a non-existing

text-base file.)

* subversion/libsvn_wc/update_editor.c

(add_file_with_history):

Add assertion to verify that this code only hits nodes that have a base.

(apply_textdelta):

Handle a return value of *CONTENT == NULL by using an empty stream

instead.

  1. … 6 more files in changeset.
Resolve issue #3560, svn_wc_status3() returns incorrect status for

unversioned files. Also resolve a few other issues that cause the

test for this issue to fail.

* subversion/libsvn_client/cat.c

(cat_local_file): Handle kind none with a not exist error instead of

an error that the node is a directory.

* subversion/libsvn_wc/status.c

(internal_status): Check if the node should be hidden and remove a path

empty check that can never be false for an absolute path.

* subversion/tests/cmdline/cat_tests.py

(cat_unversioned_file): Expect absolute path in error message.

(test_list): Remove XFail marking from cat_unversioned_file.

  1. … 2 more files in changeset.
Test out my new and fancy ASF commit priviledges by changing the copyright

wording in our license headers to reflect ownership by the ASF.

* NOTICE:

Change terminology to ASF, and update a link.

* subversion/libsvn_subr/opt.c

(svn_opt__print_version_info): Note that the product as a whole is

copyrighted by the ASF, and update the project website.

* everywhere:

Change license text to reflect ASF ownership.

  1. … 891 more files in changeset.
Add a function to fetch a node's URL, and use it in a couple of places in

the client.

* subversion/tests/cmdline/lock_tests.py

(lock_non_existent_file): Update the expected error message.

* subversion/include/private/svn_wc_private.h

(svn_wc__node_get_url): New.

* subversion/libsvn_wc/node.c

(svn_wc__node_get_url): New.

* subversion/libsvn_client/cat.c

(cat_local_file): Don't fetch the entry, just grab the URL.

* subversion/libsvn_client/locking_commands.c

(organize_lock_targets): Same.

  1. … 4 more files in changeset.
Add a new API to fetch change rev/date/author information, and use said API

within libsvn_client.

* subversion/include/private/svn_wc_private.h

(svn_wc__node_get_changed_info): New.

* subversion/libsvn_wc/node.c

(svn_wc__node_get_changed_info): New.

* subversion/libsvn_client/export.c

(copy_one_versioned_file): Use the new API to fetch the changed information,

instead of reading it from the entry.

* subversion/libsvn_client/info.c

(build_info_from_entry): Same.

* subversion/libsvn_client/cat.c

(cat_local_file): Same.

  1. … 4 more files in changeset.