Checkout Tools
  • last updated a few minutes ago
Constraints: committers
Constraints: files
Constraints: dates

Changeset 1807956 is being indexed.

Following up on r1807584, remove unnecessary SQL statements from

the WC schema definition and simplify a step in the upgrade process.

* subversion/libsvn_wc/wc-metadata.sql

(STMT_CREATE_NODES): Remove and include into STMT_CREATE_SCHEMA.




Combine these statements into a single ...

(STMT_UPGRADE_TO_31): ... which is new.

(STMT_UPGRADE_TO_32): Remove as unused.

(-- format: YYY): Remove as unused, it converted to a comment anyway.

* subversion/libsvn_wc/wc_db.c

(init_db): Remove use of deleted SQL statements.

* subversion/libsvn_wc/upgrade.c

(bump_to_31): Remove the manual check for the existence of the

NODES.inherited_props column since we no longer support the

unreleased formats prior to format 20 that did not have

a NODES table.

* subversion/tests/libsvn_wc/utils.c

(svn_test__create_fake_wc): Remove use of deleted SQL statements.

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

(schema_statements): Remove use of deleted SQL statements.

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:

* 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`


* 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/

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

* subversion/tests/cmdline/

(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.

* subversion/tests/cmdline/

(load_and_verify_dumpstream): Use "is" instead of "==" to check for

svntest.verify.AnyOutput. Otherwise, this check will fail when given

an svntest.verify.ExpectedOutput or its subclass, as they disallow

direct equality comparisons.

Introduce a new error code that allows distinguishing invalid property

values with non-LF line endings.

This lays the necessary groundwork for the `svnadmin load --normalize-props`

implementation. To keep our existing API promises in functions such as

svn_repos_fs_change_node_prop(), where we say that the existing error

code (SVN_ERR_BAD_PROPERTY_VALUE) will be returned in case of any

invalid properties, we would only add the new error code to the bottom

of the chain, while still keeping the original error code first in the chain.

* subversion/include/svn_error_codes.h


* subversion/libsvn_repos/fs-wrap.c

(svn_repos__validate_prop): Return the new error code when encountering

property values with non-LF line endings. Keep the original error code

(SVN_ERR_BAD_PROPERTY_VALUE) in the top of the error chain.

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().

Remove another test of a now unsupported upgrade. Users still using these

development only working copy formats can upgrade via Subversion 1.7-1.9.

* subversion/tests/cmdline/

(upgrade_tree_conflict_data): Remove test.

(test_list): Update list.

* subversion/tests/cmdline/upgrade_tests_data/format_12a.tar.bz2

* subversion/tests/cmdline/upgrade_tests_data/format_12b.tar.bz2

* subversion/tests/cmdline/upgrade_tests_data/format_13.tar.bz2

* subversion/tests/cmdline/upgrade_tests_data/format_14.tar.bz2

* subversion/tests/cmdline/upgrade_tests_data/format_15.tar.bz2

* subversion/tests/cmdline/upgrade_tests_data/format_16.tar.bz2

* subversion/tests/cmdline/upgrade_tests_data/format_28.tar.bz2

* subversion/tests/cmdline/upgrade_tests_data/upgrade_tc.tar.bz2

Remove unreferenced test data.

Following up on r1807584 remove more dead code, which should fix the build

breakage caused by that previous patch.

* subversion/libsvn_wc/upgrade.c



migrate_tree_conflict_data): Remove functions.

Drop support for upgrading working copies created with Subversion 1.7

development versions (using WC-NG development formats). Users can use

Subversion 1.7, 1.8 or 1.9 to perform an upgrade if they really need to.

We never promised to support these after the release of 1.7.0... And

not before that either ;-)

* subversion/libsvn_wc/upgrade.c












bump_to_29): Remove unused code.

(svn_wc__upgrade_sdb): Handle now unsupported formats with a proper


* subversion/libsvn_wc/wc-metadata.sql












STMT_UPGRADE_TO_29): Remove unused statements.

* subversion/tests/cmdline/

(upgrade_from_format_28): Remove test.

(test_list): Update list.

On the better-pristines branch: Update the branch documentation.

* BRANCH-README: Mention 'svn cleanup --compress-pristines'.

On the better-pristines branch: Minor improvements to docs and API.

* subversion/include/svn_version.h


* subversion/include/svn_client.h

(svn_client_upgrade2): Update docstring.

(svn_client_upgrade): Return the @since tag and update the deprecation tag.

(svn_client_supported_wc_version): New prototype.

* subversion/include/svn_wc.h

(svn_wc_upgrade): Return the @since tag and update the deprecation tag.

* subversion/libsvn_client/upgrade.c

(svn_client_upgrade2): Wrap call to upgrade_internal into SVN_ERR().

(svn_client_supported_wc_version): Implement.

* subversion/libsvn_wc/upgrade.c

(svn_wc__update_schema): Use a temporary macro for the upgrade cases.

Verify that the working copy was upgraded to the target_format.

* subversion/libsvn_wc/wc.h

(SVN_WC__SUPPORTED_VERSION): Add link to svn_client_supported_wc_version().

Suggested by: danielsh

On the better-pristines branch: Introduce the concept of a target

format for working copy upgrades into the client library.

* subversion/include/svn_client.h

(svn_client_upgrade2): New public function.

(svn_client_upgrade): Deprecate.

* subversion/libsvn_client/upgrade.c

(upgrade_externals_from_properties): Add parameter wc_format.

(upgrade_internal): New helper function, extracted from svn_client_upgrade.

(svn_client_upgrade2): Implement.

(upgrade_external_item): Add parameter wc_format.

* subversion/libsvn_client/deprecated.c

(svn_client_upgrade): Move here from upgrade.c

* subversion/include/svn_wc.h

(svn_wc_upgrade): Deprecate.

* subversion/include/private/svn_wc_private.h

(svn_wc__format_from_version_string, svn_wc__upgrade): New.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_bump_format): Add parameter target_format.

* subversion/libsvn_wc/upgrade.c

(svn_wc__format_from_version_string): Implement.

(svn_wc__upgrade): Implement; renamed and updated from svn_wc_upgrade.

* subversion/libsvn_wc/wc_db.c

(svn_wc__db_bump_format): Use parameter target_format.

* subversion/libsvn_wc/deprecated.c

(svn_wc_upgrade): Move here from upgrade.c

* subversion/include/svn_version.h


* subversion/svn/upgrade-cmd.c

(svn_cl__upgrade): Call svn_client_upgrade2.

Fix the authz error testing code in the conflict resolver.

Sometimes, the actual error gets wrapped in another.

* subversion/libsvn_client/conflicts.c

(ignore_authz_failures): Search the whole error chain for the relevant

authz failure codes.

On the better-pristines branch: Fix unintended fallout from r1807225.

* subversion/libsvn_wc/upgrade.c

(svn_wc__upgrade_sdb): Install schema statistics with a savepoint, not

a transaction, as we did before r1807225.

On the better-pristines branch: Begin adding support for multiple

working copy formats.

Instead of supporting just one format, introduce a current formaat

(the default for new working copies) and a lowest supported format,

and change the way new working copies are created: instead of the

base schema defining the current format, it defines the lowest

supporting format and a series of format updates are performed

to bring it to the current shape.

* subversion/libsvn_wc/wc.h

(SVN_WC__VERSION): Bump to 32.

(SVN_WC__SUPPORTED_VERSION): New; set to 31, the 1.8/1.9 format.


(svn_wc__upgrade_sdb): Add parameter target_format.

(svn_wc__update_schema): New prototype.

* subversion/libsvn_wc/wc_db_private.h

(VERIFY_USABLE_WCROOT): Check the range of supported formats.

* subversion/libsvn_wc/wc_db.c

(init_db): Add parameter wcroot_abspath.

Update the schema to the current format.

(create_db): Update the call to init_db.

(svn_wc__db_bump_format): Update the call to svn_wc__upgrade_sdb.

* subversion/libsvn_wc/wc_db_wcroot.c

(svn_wc__db_pdh_create_wcroot): Allow the range of supported formats.

* subversion/libsvn_wc/lock.c

(open_single): Allow the range of supported formats.

* subversion/libsvn_wc/upgrade.c: Include svn_version.h.

(bump_to_32): New private function.

(svn_wc__version_string_from_format): Add new mappings.

(svn_wc__upgrade_sdb): Extract the schema-update part into ...

(svn_wc__update_schema): ... here.

(svn_wc__update_schema): Implement.

* subversion/libsvn_wc/wc-metadata.sql


(STMT_BUMP_TO_32): Update the user_version.

    • ?
On the better-pristines branch: Add branch documentation.

* BRANCH-README: New file.

    • ?
Follow-up on r1807154:

* subversion/libsvn_client/conflicts.c

(ignore_authz_failures): Turns out, mod_dav uses its own error codes

for authz failures.

* subversion/libsvn_subr/utf8proc.c

(svn_utf__fuzzy_glob_match): Never let invalid UTF data be a match.

Suggested by: brane

Fix the authz test failures caused by the latest tree conflict resolution UI


The problem is triggered when we try to gather details for a given conflict

to present those details to the user such that they may make a well-informed

decision about how to proceed. If that user fails to authenticate with

sufficient access rights, we can't gather that data.

Instead of bailing out with an error, we now gracefully degrade to displaying

only reduced (client-only) conflict info, if there was an authz failure.

Ideally, we would mention that failure in the conflict info as well but that

can be done at some point in the future.

* subversion/libsvn_client/conflicts.c

(ignore_authz_failures): New utility function.

(svn_client_conflict_tree_get_details): Ignore authz failures and proceed

with whatever information we have.

Create a branch for pristine storage improvements.
Improve UI documentation for the '--search' option.

* subversion/svn/svn.c

(svn_cl__options): Mention that '--search' is case- and accent-insensitive.

(svn_cl__cmd_table): Explain how '--search' operates on 'svn ls'.

* subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout

Update test expectations.

* subversion/tests/cmdline/

(filtered_ls): Actually check for the expected outputs. Add test cases

to cover case insensitivity and segment matching.


(1.10): The '--pattern' option is now '--search' again.

Make the 'svn ls --search' implementation actually case- and accent-

insensitive. The option handling of '--search' already assumes it

but the implementation did not follow up.

That's easily done by using the same generic UTF8-based normalization

to the path segments as 'svn' applies to the patterns. To reduce code

duplication, move the normalization and matching function to lib_subr.

And because there isn't really a better place to put it, add it to


* subversion/include/private/svn_utf_private.h

(svn_utf__fuzzy_glob_match): Declare new private API.

* subversion/libsvn_subr/utf8proc.c

(svn_utf__fuzzy_glob_match): Implement the function, code mostly taken

from list.c.

* subversion/libsvn_client/list.c

(match_patterns): Forward to the new matching function.

(get_dir_contents): Add SCRATCH_BUFFER as a pass-through argument.

(list_internal): Provide the SCRATCH_BUFFER.

* subversion/libsvn_repos/list.c



svn_repos_list): Mirror the changes from the client side above.

Revert r1806548.
No functional change.

* subversion/include/svn_delta.h

(svn_delta_editor_t.apply_textdelta_stream): Add a doxygen link.

* subversion/include/svn_delta.h

(svn_delta_editor_t): Clarify that users shouldn't allocate structs of this type.


From: Daniel Shahaf

To: dev@

Subject: Re: svn commit: r1803143 - in /subversion/trunk/subversion: include/ libsvn_delta/ libsvn_ra_serf/ mod_dav_svn/

Date: Wed, 30 Aug 2017 05:07:21 GMT

Message-ID: <>

Teach the conflict resolver to detect merged moves.

If a move is merged without conflict, the client creates copyfrom info

which points back into a different branch, such that matching a copyfrom

path to the deleted conflict victim's path won't work (see issue #2685).

While scanning for moves, the resolver now also investigates whether any

copies within a revision are related to any deleted paths within that same

revision. If so, it assumes a merged move and constructs move information

which looks as if this move had occured directly on the local branch.

* subversion/libsvn_client/conflicts.c

(push_move): New function, extracted from find_moves_in_revision().

(find_yca): Move upwards in the file so it is declared earlier.

(find_related_move): New function which registers deletions and related

copies as a move in the moves table.

(match_copies_to_deletion): New function, taken from find_moves_in_revision()

in order to make it easier to use nested iterpools. Note that this now loops

over all copies in a revision, not just those with copyfrom paths matching

the deleted path being searched.

(find_moves_in_revision): Expect repository UUID and client context params.

With most code migrated elsewhere what remains amounts to a small loop

around match_copies_to_deletion().

(find_moves): Update caller.

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

(A_branch2): New constant.


test_merge_incoming_move_dir_across_branches): New test which runs a

basic exercise for the new code.

(test_funcs): Add new test.

In the conflict resolver, split some code out of a function to make it shorter.

* subversion/libsvn_client/conflicts.c

(cache_copied_item): New helper function, extracted from ...

(find_moves): .. here.

* subversion/libsvn_client/conflicts.c

(find_moves_in_revision_range): Replace the 'conflict' parameter with the

items actually required by this function: repository root URL, repository

UUID, and the absolute path to the conflict victim.

(find_revision_for_suspected_deletion): Update caller.

Fix a conflict resolver bug where moves reported for moved-along children

were storing the moved parent path instead of the moved-along child's path.

* subversion/libsvn_client/conflicts.c

(find_revision_for_suspected_deletion): If a node is found to have moved,

pass the deleted node's path to find_operative_moves() instead of the

(potentially, parent) path where the move occurred.