Checkout Tools
  • last updated 1 hour ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates

Changeset 1804811 is being indexed.

Stream svndiff deltas without creating temporary files during 'svn import'

over HTTP.

Creating the temporary files has a certain overhead (time to write them

and disk space), but what is more important, it prevents the client and

server from simultaneously processing the data, i.e., checksumming and

compressing it.

This is an alternative solution that involves using resettable streams.

The original and more complex solution was implemented in r1803144, see

its log message for more details on why do we start streaming deltas.

* subversion/libsvn_client/import.c

(open_txdelta_stream_baton_t): New.

(open_txdelta_stream): New, implements svn_txdelta_stream_open_func_t.

Note that this function must be restartable, as it can be called

more than once, for example, if the HTTP server decides to do a

renegotiation, and we would be forced to resend the whole request

body. If this is the case, we reset the stream and continue.

(send_file_contents): Use the new apply_textdelta_stream() delta

editor callback. Calculate the MD5 checksum with the help of

svn_stream_checksummed2() stream instead of using svn_txdelta2()

for this purpose. Pass the disowned stream to the open txdelta

callback, and explicitly close the stream in this function (to

finalize the checksum).

(import_file): Update, according to the changes in send_file_contents().

Revert r1804673, r1804672 and r1803144 which made "svn import" stream

deltas without creating temporary files over HTTP.

There is a better (simpler and less invasive) solution that involves using

resettable streams, instead of implementing an open txdelta callback that

always creates a new stream. That is what I'll try to do.

The shortlog of the reverted changesets is:

r1803144: Stream svndiff deltas without creating temporary files during

'svn import' over HTTP.

r1804672: Fix an oversight in the txdelta_next_window adapter used when

importing files over HTTP.

r1804673: Rewrite the txdelta_next_window() function using a local variable.

* subversion/libsvn_client/import.c

(txdelta_next_window): Rewrite this function using a local variable

for the result, to prevent bugs similar to the one fixed in r1804672.

Following up on r1803144, fix an oversight in the txdelta_next_window

adapter used when importing files over HTTP.

This bug has inadvertently disabled the checksum validation for such

imports, because the resulting checksum has always been all-zeroes.

* subversion/libsvn_client/import.c

(txdelta_next_window): Check if the svn_txdelta_window_t pointer

is null, instead of checking that for the pointer to a pointer, which

is never null.

Stream svndiff deltas without creating temporary files during 'svn import'

over HTTP.

Creating the temporary files has a certain overhead (time to write them

and disk space), but what is more important, it prevents the client and

server from simultaneously processing the data, i.e., checksumming and

compressing it.

This can have a significant effect for large binary files, and the new

approach can be up to 2x faster. The actual improvement depends on the

configuration, but is generally more visible if the server and the client

process data with roughly the same speed. Several tests in my environment

showed that the import time was reduced from 63s to 32s, and from 8s to 5s

for two (different) large binary files.

Technically, this is achieved by teaching the delta editor driver that

is used in svn_client_import5() to use the new apply_textdelta_stream()

editor callback.

* subversion/libsvn_client/import.c

(open_txdelta_stream_baton_t): New.

(txdelta_stream_baton_t, txdelta_next_window, txdelta_md5_digest):

New. Used to create a custom txdelta stream that retargets the result

checksum into a supplied buffer. Used in open_txdelta_stream().

(send_file_contents): Move the core of this function, i.e., preparation

of the delta stream into ...

(open_txdelta_stream): ...this new svn_txdelta_stream_open_func_t

implementation, and pass the necessary arguments via baton. Use

result and scratch pools. Note that this function must be restartable,

as it can be called more than once, for example, if the HTTP server

decides to do a renegotiation, and we would be forced to resend

the whole request body.

(import_file): Use the new apply_textdelta_stream() editor callback.

* subversion/libsvn_client/import.c

(import): Update doc string.

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.
Following up on r1655637, fill even more svn_client_commit_item3_t fields

and apply some updated expected results in JavaHL.

* subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java

(testJNIError,

testBasicMkdirUrl): Expect creation of directory when using mkdir URL.

* subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java

(setUp): Expect import to provide a url and kind.

* subversion/bindings/javahl/tests/org/tigris/subversion/javahl/SVNTests.java

(setUp): Expect import to provide a url and kind.

* subversion/libsvn_client/import.c

(svn_client_import5): Provide kind an url in commit item.

* subversion/libsvn_client/util.c

(svn_client_commit_item3_create): Use svn_node_unknown as default kind.

  1. … 4 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.
Fix a client API rule violation in 'svn import'.

* subversion/libsvn_client/import.c

(svn_client_import5): A commit item's path is supposed to be absolute

so set item->path to the already calculated absolute path.

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/import.c

(svn_client_import5): Pass valid pool in abort_edit() call.

Avoid a theoretical case where we call editor->abort_edit() twice.

(Only triggerable by an import, which imported nothing... where the

first abort fails)

Found by: ivan

* subversion/libsvn_client/import.c

(import_ctx_t): Remove TODO comment that describes implementation that

doesn't follow current best practices.

(import): Add output argument describing whether we committed something.

Allocate import_ctx on the stack. Remove abort on no-change.

(svn_client_import5): Use new information to determine when to abort.

Always destroy iterpool.

Add new libsvn_client notification between transmitting deltas and

finalizing commit. The final stage of commit may consume significant

amount of time, especially if we have automatic packing someday.

NOTE: Subversion command line handling of this notification will come in

later commits.

* subversion/include/svn_wc.h

(svn_wc_notify_action_t): Add svn_wc_notify_commit_finalizing.

* subversion/libsvn_client/add.c

* subversion/libsvn_client/commit_util.c

* subversion/libsvn_client/copy.c

* subversion/libsvn_client/delete.c

* subversion/libsvn_client/mtcc.c

* subversion/libsvn_client/prop_commands.c

(mkdir_urls, svn_client__do_commit, repos_to_repos_copy,

single_repos_delete, svn_client_mtcc_commit, propset_on_url): Send

svn_wc_notify_commit_finalizing notification before closing edit.

* subversion/libsvn_client/import.c

(import): Add URL argument and send svn_wc_notify_commit_finalizing

notification before closing edit.

(svn_client_import5): Update caller.

  1. … 7 more files 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.
Followup to r1572916, fix error return handling.

* subversion/include/private/svn_magic.h

* subversion/libsvn_subr/magic.c

(svn_magic__init): Change return type.

* subversion/libsvn_client/add.c

(add): Handle svn_magic__init return.

* subversion/libsvn_client/import.c

(import): Handle svn_magic__init return.

  1. … 3 more files in changeset.
Provide config:miscellany:enable-magic-file to control the use of

libmagic. There are environment variables that do this already but

they are not specific to Subversion and affect other applications.

* subversion/include/svn_config.h

(SVN_CONFIG_OPTION_ENABLE_MAGIC_FILE): New.

* subversion/include/private/svn_magic.h

(svn_magic__init): Add config parameter.

* subversion/libsvn_subr/config_file.c

(svn_config_ensure): Document new setting.

* subversion/libsvn_subr/magic.c

(svn_magic__init): Check for enable-magic-file=no.

* subversion/libsvn_client/add.c

(add): Pass config to svn_magic__init.

* subversion/libsvn_client/import.c

(import): Pass config to svn_magic__init.

  1. … 5 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/import.c

(import_file,

import): Add some error tracing.

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

(svn_client_import5): Remove unused variable.

* subversion/libsvn_client/import.c

(import): Following up on r1482966, update comment.

Don't create two unneeded ra sessions on every 'svn import' without

--no-ignore. Also avoid a race condition on the HEAD revision by passing

the explicit revision to several ra operations, to make sure they all look

at the same revision.

* subversion/libsvn_client/import.c

(import): Add base_rev argument and pass it for the root open operation.

(svn_client_import5): Obtain the base revision, properties and inherited

properties on the primary ra session instead of via two separate sessions.

Add note that we still open an ra session for the autoprops.

Update calls to deprecated svn_io_stat_dirent.

* subversion/libsvn_fs_fs/fs_fs.c

(hotcopy_io_dir_file_copy): Update deprecated calls.

* src/subversion/libsvn_client/import.c

(import): Update deprecated call.

* src/subversion/libsvn_wc/questions.c

(svn_wc__internal_file_modified_p): Update deprecated call.

* src/subversion/libsvn_wc/status.c

(internal_status): Update deprecated call.

* src/subversion/libsvn_wc/wc_db.c

(remove_node_txn, has_local_mods): Update deprecated calls.

  1. … 4 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.
Use svn_hash_gets/svn_hash_sets, part 1: #include "svn_hash.h" everywhere

that <apr_hash.h> is included. I assume most of those use APR_HASH_KEY_STRING.

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

* subversion/libsvn_client/commit.c

* subversion/libsvn_client/diff_local.c

* subversion/libsvn_client/import.c

* subversion/libsvn_delta/xdelta.c

* subversion/libsvn_fs/access.c

* subversion/libsvn_fs/fs-loader.c

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

* subversion/libsvn_fs_base/bdb/env.c

* subversion/libsvn_fs_fs/tree.c

* subversion/libsvn_ra/ra_loader.c

* subversion/libsvn_repos/delta.c

* subversion/libsvn_subr/dso.c

* subversion/libsvn_subr/properties.c

* subversion/libsvn_subr/sorts.c

* subversion/libsvn_wc/adm_crawler.c

* subversion/libsvn_wc/conflicts.c

* subversion/mod_dav_svn/deadprops.c

* subversion/mod_dav_svn/merge.c

* subversion/mod_dav_svn/mod_dav_svn.c

* subversion/mod_dav_svn/repos.c

* subversion/svn/props.c

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

(svn_hash.h): Add #include.

  1. … 22 more files 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.
* subversion/libsvn_client/import.c

(svn_client_import5): Use the new svn_sort__array_reverse() instead of

doing it the long way. Clean up some use of local variables, moving to

tighter scope etc.