Checkout Tools
  • last updated 2 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Adjust lifetime of the result returned from svn_repos__normalize_prop().

Previously, this function would make an unconditional copy of the value into

the result pool. While this may look convenient in some of the cases, there

is a downside of making unnecessary copies even if no normalization happened.

Instead of that, let's give the calling site control over the results' lifetime

by not making the copy if the input did not change. The callers may still dup()

the value if they need to, but with this approach there are no unavoidable

copies in various situations, such as where we would like to only update the

value if it changed or where we don't have an appropriate scratch pool, but

need to normalize the property value anyway.

* subversion/include/private/svn_repos_private.h

(svn_repos__normalize_prop): Adjust documentation.

* subversion/libsvn_repos/fs-wrap.c

(svn_repos__normalize_prop): Do not duplicate the input if no normalization

is required.

* subversion/libsvn_repos/dump_editor.c

(normalize_props): Adjust call to svn_repos__normalize_prop(), explicitly

duplicate the property value into the result pool.

* subversion/svnrdump/load_editor.c

(set_revision_property, set_node_property): Explicitly duplicate the property

values into the long-living pool.

* subversion/svnrdump/util.c

(svn_rdump__normalize_props): Adjust call to svn_repos__normalize_prop(),

explicitly duplicate the property value into the result pool.

  1. … 4 more files in changeset.
svnadmin: Introduce the `--normalize-props` option for the load and

load-revprops commands.

Currently, the only performed normalization is the automatic translation

of non-LF line endings in the svn: property values. Apparently, this is

a common issue reported by our users, as Subversion versions prior to 1.6

allowed such values for properties like svn:log and so they can be present

in the dump files. The behavior before this changeset is that a user can

either force loading the dump with such invalid properties using the

--bypass-prop-validation (that affects reading them in the future),

manually repair the dump file or use a tool like svnsync that performs

the property normalization. It would be better if the users had an option

to fix this right in the svnadmin load command.

See also the corresponding FAQ entry and related issues that have been

fixed in svnsync and svnrdump:

https://subversion.apache.org/faq.html#fix-nonLF-log

https://issues.apache.org/jira/browse/SVN-3404

https://issues.apache.org/jira/browse/SVN-4263

* subversion/include/svn_repos.h

(svn_repos_load_fs6): New version of svn_repos_load_fs5() accepting the

new `normalize_props` argument.

(svn_repos_load_fs5): Deprecate.

(svn_repos_load_fs_revprops): Accept the new `normalize_props` argument.

(svn_repos_get_fs_build_parser6): New version of

svn_repos_get_fs_build_parser5() accepting the new `normalize_props`

argument.

* subversion/include/private/svn_repos_private.h

(svn_repos__normalize_prop): New private helper. The `normalized_p`

argument will be currently unused by all calling sites, but it's added

as the groundwork to simplify implementing the notifications about

normalized properties in the future.

* subversion/libsvn_repos/deprecated.c

(svn_repos_load_fs5, svn_repos_get_fs_build_parser5): Implement by

forwarding to the new versions of these functions.

* subversion/libsvn_repos/fs-wrap.c

(): Include svn_subst.h.

(svn_repos__normalize_prop): Implement this new helper function.

The implementation is close to how svn_rdump__normalize_prop() is

written, but this function accepts two pools and handles the new

`normalized_p` output argument.

* subversion/libsvn_repos/load-fs-vtable.c

(struct parse_baton): Add new `normalize_props` field.

(change_rev_prop): Accept new `normalize_props` argument, call the

new helper function if it's set.

(close_revision): Normalize the revision properties if necessary.

(svn_repos_get_fs_build_parser6): New, replacing ...

(svn_repos_get_fs_build_parser5): ...this function.

(svn_repos_load_fs6): New, replacing ...

(svn_repos_load_fs5): ...this function.

(revprops_close_revision): Update call to change_rev_prop().

(build_revprop_parser): Accept new `normalize_props` argument, use it

to initialize the new field in the parse_baton.

(svn_repos_load_fs_revprops): Handle the new `normalize_props` argument

by forwarding it to build_revprop_parser().

* subversion/svnadmin/svnadmin.c

(svnadmin__cmdline_options_t, options_table): Add svnadmin__normalize_props.

(cmd_table): Enable the new option for load and load-revprops commands.

(struct svnadmin_opt_state): Add new `normalize_props` field and ...

(sub_main): ...initialize it here.

(subcommand_load, subcommand_load_revprops): Normalize properties when

running with --normalize-props. Use separate hints when encountering

invalid properties with non-LF line endings and all other kinds of

invalid properties.

* subversion/svnrdump/svnrdump.h

(svn_rdump__normalize_prop): Remove this declaration. This function is

now superseded by the new svn_repos__normalize_prop() helper.

* subversion/svnrdump/util.c

(): Include svn_repos_private.h, drop other includes.

(svn_rdump__normalize_prop): Remove. This function is now superseded

by the new svn_repos__normalize_prop() helper.

(svn_rdump__normalize_props): Use the new svn_repos__normalize_prop()

helper function.

* subversion/svnrdump/load_editor.c

(set_revision_property, set_node_property): Use the new

svn_repos__normalize_prop() helper function.

* subversion/tests/libsvn_repos/dump-load-test.c

(test_load_bad_props): Use the new svn_repos_load_fs6() function, keep

the previous behavior unchanged, i.e., do not normalize the properties.

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

(run_and_verify_load, load_repo): Accept new `normalize_props` argument.

* subversion/tests/cmdline/svnadmin_tests.py

(load_bad_props): Test loading with --normalize-props. Check for the error

codes reported during load with non-LF line endings and without the new

option. In cases when the load is successful, check the resulting

svn:log property value in the repository.

* tools/client-side/bash-completion

(_svnadmin): Extend completion info.

  1. … 12 more files in changeset.
Avoid a function with a potentially unexpected side effect by introducing

an output parameter instead of changing the value in place.

* subversion/svnrdump/svnrdump.h

(svn_rdump__normalize_prop): Add output parameter and update the docstring.

(svn_rdump__normalize_props): Update the docstring.

* subversion/svnrdump/util.c

(svn_rdump__normalize_prop): Populate the output parameter. Ensure

that the resulting value is always copied (even if unchanged) to the

result pool; that should also allow to sometimes get rid of the double

copying on the calling site.

(svn_rdump__normalize_props): Update call to svn_rdump__normalize_prop().

* subversion/svnrdump/load_editor.c

(set_revision_property, set_node_property): Update these calling sites of

svn_rdump__normalize_prop(). Don't make unnecessary copies, as

now the values are always copied to the result pool during the call

to svn_rdump__normalize_prop().

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

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

substitutes only when APR is too old to provide them.

* subversion/include/svn_types.h,

subversion/libsvn_subr/iter.c

(svn__apr_hash_index_key,

svn__apr_hash_index_klen,

svn__apr_hash_index_val):

Rename to apr_hash_this_key, apr_hash_this_key_len, apr_hash_this_val.

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

Everywhere else: track the renames.

  1. … 102 more files in changeset.
* subversion/svnrdump/util.c

(svn_rdump__normalize_prop): Resolve segfault on deleting a eol

normalized property.

Revert r1508225, which moved the include of svn_private_config.h before all

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

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

This patch excludes all conflicting cases.

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

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

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

* subversion/libsvn_auth_gnome_keyring/gnome_keyring.c

* subversion/libsvn_client/add.c

* subversion/libsvn_client/cat.c

* subversion/libsvn_client/changelist.c

* subversion/libsvn_client/cleanup.c

* subversion/libsvn_client/commit.c

* subversion/libsvn_client/commit_util.c

* subversion/libsvn_client/copy.c

* subversion/libsvn_client/copy_foreign.c

* subversion/libsvn_client/ctx.c

* subversion/libsvn_client/delete.c

* subversion/libsvn_client/deprecated.c

* subversion/libsvn_client/diff.c

* subversion/libsvn_client/diff_local.c

* subversion/libsvn_client/diff_summarize.c

* subversion/libsvn_client/export.c

* subversion/libsvn_client/externals.c

* subversion/libsvn_client/import.c

* subversion/libsvn_client/info.c

* subversion/libsvn_client/iprops.c

* subversion/libsvn_client/list.c

* subversion/libsvn_client/locking_commands.c

* subversion/libsvn_client/log.c

* subversion/libsvn_client/merge.c

* subversion/libsvn_client/mergeinfo.c

* subversion/libsvn_client/patch.c

* subversion/libsvn_client/prop_commands.c

* subversion/libsvn_client/ra.c

* subversion/libsvn_client/repos_diff.c

* subversion/libsvn_client/resolved.c

* subversion/libsvn_client/revert.c

* subversion/libsvn_client/switch.c

* subversion/libsvn_client/update.c

* subversion/libsvn_client/util.c

* subversion/libsvn_delta/compat.c

* subversion/libsvn_delta/xdelta.c

* subversion/libsvn_diff/parse-diff.c

* subversion/libsvn_diff/util.c

* subversion/libsvn_fs/access.c

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

* subversion/libsvn_fs_base/bdb/env.c

* subversion/libsvn_fs_base/dag.c

* subversion/libsvn_fs_base/fs.c

* subversion/libsvn_fs_base/lock.c

* subversion/libsvn_fs_base/revs-txns.c

* subversion/libsvn_fs_base/tree.c

* subversion/libsvn_fs_fs/caching.c

* subversion/libsvn_fs_fs/lock.c

* subversion/libsvn_fs_fs/temp_serializer.c

* subversion/libsvn_fs_fs/tree.c

* subversion/libsvn_ra/compat.c

* subversion/libsvn_ra/deprecated.c

* subversion/libsvn_ra/ra_loader.c

* subversion/libsvn_ra_local/ra_plugin.c

* subversion/libsvn_ra_serf/blame.c

* subversion/libsvn_ra_serf/blncache.c

* subversion/libsvn_ra_serf/commit.c

* subversion/libsvn_ra_serf/getlocations.c

* subversion/libsvn_ra_serf/getlocationsegments.c

* subversion/libsvn_ra_serf/getlocks.c

* subversion/libsvn_ra_serf/inherited_props.c

* subversion/libsvn_ra_serf/log.c

* subversion/libsvn_ra_serf/merge.c

* subversion/libsvn_ra_serf/mergeinfo.c

* subversion/libsvn_ra_serf/options.c

* subversion/libsvn_ra_serf/property.c

* subversion/libsvn_ra_serf/replay.c

* subversion/libsvn_ra_serf/serf.c

* subversion/libsvn_ra_serf/update.c

* subversion/libsvn_ra_serf/util.c

* subversion/libsvn_ra_serf/xml.c

* subversion/libsvn_ra_svn/client.c

* subversion/libsvn_ra_svn/editorp.c

* subversion/libsvn_ra_svn/marshal.c

* subversion/libsvn_repos/authz.c

* subversion/libsvn_repos/commit.c

* subversion/libsvn_repos/delta.c

* subversion/libsvn_repos/deprecated.c

* subversion/libsvn_repos/fs-wrap.c

* subversion/libsvn_repos/hooks.c

* subversion/libsvn_repos/log.c

* subversion/libsvn_repos/replay.c

* subversion/libsvn_repos/reporter.c

* subversion/libsvn_repos/repos.c

* subversion/libsvn_repos/rev_hunt.c

* subversion/libsvn_subr/auth.c

* subversion/libsvn_subr/cmdline.c

* subversion/libsvn_subr/compat.c

* subversion/libsvn_subr/config.c

* subversion/libsvn_subr/config_auth.c

* subversion/libsvn_subr/deprecated.c

* subversion/libsvn_subr/dso.c

* subversion/libsvn_subr/hash.c

* subversion/libsvn_subr/io.c

* subversion/libsvn_subr/mergeinfo.c

* subversion/libsvn_subr/opt.c

* subversion/libsvn_subr/properties.c

* subversion/libsvn_subr/simple_providers.c

* subversion/libsvn_subr/sorts.c

* subversion/libsvn_subr/ssl_client_cert_providers.c

* subversion/libsvn_subr/ssl_client_cert_pw_providers.c

* subversion/libsvn_subr/ssl_server_trust_providers.c

* subversion/libsvn_subr/subst.c

* subversion/libsvn_subr/types.c

* subversion/libsvn_subr/username_providers.c

* subversion/libsvn_subr/utf.c

* subversion/libsvn_subr/win32_crypto.c

* subversion/libsvn_wc/adm_crawler.c

* subversion/libsvn_wc/adm_files.c

* subversion/libsvn_wc/conflicts.c

* subversion/libsvn_wc/copy.c

* subversion/libsvn_wc/deprecated.c

* subversion/libsvn_wc/diff_editor.c

* subversion/libsvn_wc/diff_local.c

* subversion/libsvn_wc/entries.c

* subversion/libsvn_wc/externals.c

* subversion/libsvn_wc/info.c

* subversion/libsvn_wc/lock.c

* subversion/libsvn_wc/node.c

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

* subversion/libsvn_wc/props.c

* subversion/libsvn_wc/revert.c

* subversion/libsvn_wc/status.c

* subversion/libsvn_wc/update_editor.c

* subversion/libsvn_wc/upgrade.c

* subversion/libsvn_wc/wc_db_update_move.c

* subversion/libsvn_wc/wc_db_wcroot.c

* subversion/mod_dav_svn/repos.c

* subversion/mod_dav_svn/version.c

* subversion/svn/cl-conflicts.c

* subversion/svn/commit-cmd.c

* subversion/svn/conflict-callbacks.c

* subversion/svn/diff-cmd.c

* subversion/svn/help-cmd.c

* subversion/svn/notify.c

* subversion/svn/propedit-cmd.c

* subversion/svn/propget-cmd.c

* subversion/svn/props.c

* subversion/svn/status-cmd.c

* subversion/svn/status.c

* subversion/svn/svn.c

* subversion/svn/util.c

* subversion/svnadmin/svnadmin.c

* subversion/svnlook/svnlook.c

* subversion/svnrdump/dump_editor.c

* subversion/svnrdump/svnrdump.c

* subversion/svnrdump/util.c

* subversion/svnserve/serve.c

* subversion/svnsync/svnsync.c

* subversion/svnsync/sync.c

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

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

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

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

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

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

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

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

* subversion/tests/svn_test_fs.c

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

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

  1. … 162 more files in changeset.
Fix 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.
Use svn_hash_gets and svn_hash_sets.

* 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/commit.c

* subversion/libsvn_delta/compat.c

* subversion/libsvn_delta/editor.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/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/fs_fs.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/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/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/mod_dav_svn/activity.c

* subversion/mod_dav_svn/lock.c

* subversion/mod_dav_svn/merge.c

* subversion/mod_dav_svn/reports/update.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/help-cmd.c

* subversion/svn/propedit-cmd.c

* subversion/svn/propget-cmd.c

* subversion/svn/status-cmd.c

* subversion/svn/status.c

* subversion/svn/svn.c

* subversion/svn/util.c

* subversion/svnadmin/svnadmin.c

* subversion/svndumpfilter/svndumpfilter.c

* subversion/svnlook/svnlook.c

* subversion/svnmucc/svnmucc.c

* subversion/svnrdump/dump_editor.c

* subversion/svnrdump/load_editor.c

* subversion/svnrdump/svnrdump.c

* subversion/svnrdump/util.c

* subversion/svnserve/serve.c

* subversion/svnsync/svnsync.c

* subversion/svnsync/sync.c

  1. … 70 more files in changeset.
Fix issue #4263: svnrdump: E125005: Cannot accept non-LF line endings in

'svn:log' property

Fix to ensure that no "\r" characters are present in revision or node

props.

In the case of "\r\n" character sequences, the "\r" is removed.

In the case of "\r" characters which are not followed by "\n", the "\r"

is replaced by a "\n" character.

* subversion/svnrdump/svnrdump.h:

(svn_rdump__normalize_prop): New function declaration.

* subversion/svnrdump/util.c:

(svn_rdump__normalize_prop): New function to allow "svnrdump load" to

use existing logic

(svn_rdump__normalize_props): Refactored to move logic into

svn_rdump__normalize_prop()

* subversion/svnrdump/load_editor.c:

(set_revision_property): Added call to svn_rdump__normalize_prop()

(set_node_property): Added call to svn_rdump__normalize_prop()

* subversion/tests/cmdline/svnrdump_tests.py:

(copy_bad_line_endings_load): Removed "XFail" decorator

Patch by: Gabriela Gibson <gabriela.gibson@gmail.com>

  1. … 3 more files in changeset.
Avoid a function with magical side effects by introducing an output parameter

instead of changing the hash inplace.

* subversion/svnrdump/svnrdump.c

(replay_revstart): Update caller.

* subversion/svnrdump/svnrdump.h

(svn_rdump__normalize_props): Add output parameter and update docs.

* subversion/svnrdump/dump_editor.c

(do_dump_props): Update caller.

* subversion/svnrdump/util.c

(svn_rdump__normalize_props): Add output parameter, and populate it from

the input param.

  1. … 3 more files in changeset.
Some code reorganization in svnrdump. This commit adds a couple of files, and

moves a utility function to one of them. It also renames this function to

give it the proper prefix.

* subversion/svnrdump/svnrdump.c

(replay_revstart): Update caller.

* subversion/svnrdump/svnrdump.h:

New.

* subversion/svnrdump/dump_editor.c

(normalize_props): Remove.

(do_dump_props): Update caller.

* subversion/svnrdump/util.c:

New.

  1. … 3 more files in changeset.
Follow-up to r966595:

* subversion/svnrdump/util.c: Remove, this file is emtpy and should have

been removed as part of r966595.

Move an svnrdump helper function from svnrdump/util.c to

svnrdump/dump_editor.c, because it's only used there.

* subversion/svnrdump/dump_editor.c

(dump_props): Moved here from util.c. Make it a static function.

Docstring was tweaked, and also fix indentation of an if-statement

to conform to our coding style.

* subversion/svnrdump/util.c

(dump_props): Moved to dump_editor.c.

* subversion/svnrdump/svnrdump.h

(dump_props): Undeclare.

  1. … 2 more files in changeset.
Switch svnrdump to using the generic svn_hash_write2() and

svn_hash_write_incremental() functions instead of a custom helper

function. This should make svnrdump's way of writing properties match

the output of svnadmin dump.

Also fix a segmentation fault that occured when dumping deleted properties.

* subversion/svnrdump/util.c

(write_hash_to_stringbuf): Remove this helper.

(dump_props): Use svn_hash_write_incremental() instead of removed helper.

* subversion/svnrdump/dump_editor.c

(change_dir_prop, change_file_prop): Instead of representing deleted

property values in eb->del_properties with (void*) 0x01, just use an empty

string as value. Combined with switching to svn_hash_write_incremental(),

this fixes a crash when dumping deleted properties.

Also, change_file_prop() was putting deleted properties into the wrong

hash table, so fix that.

* subversion/svnrdump/svnrdump.c

(replay_revstart): Replace call to write_hash_to_stringbuf() with call

to svn_hash_write2().

  1. … 2 more files in changeset.
svnrdump: Restructure code and cleanup comments.

Cleanup comments in:

* subversion/svnrdump/svnrdump.c

* subversion/svnrdump/svnrdump.h

* subversion/svnrdump/util.c

* subversion/svnrdump/dump_editor.c

* subversion/svnrdump/dump_editor.h

Refactor code in:

* subversion/svnrdump/dump_editor.h (edit_baton): Remove is_copy.

* subversion/svnrdump/dump_editor.c: Track removing is_copy from the

edit baton. Make it a local variable where necessary.

* subversion/svnrdump/util.c (write_hash_to_stringbuf): Collapse two

loops into one.

  1. … 4 more files in changeset.
Add some Doxygen-friendly documentation to the files in

subversion/svnrdump. Files touched:

* subversion/svnrdump/dump_editor.h

* subversion/svnrdump/dump_editor.c

* subversion/svnrdump/util.c

* subversion/svnrdump/svnrdump.c

* subversion/svnrdump/svnrdump.h

  1. … 4 more files in changeset.
Follow-up to 965126: replace 2 more apr_hash_clear() invocations.
Initial checkin of svnrdump

svnrdump is a tool that produces a dumpfile v3 without filesystem

backing by playing back the Subversion repository through the replay

API. It can be used with remote repositories as well as local

repositories over the file:// protocol.

Approved by: stsp

  1. … 7 more files in changeset.