Checkout Tools
  • last updated a few minutes ago
Constraints: committers
Constraints: files
Constraints: dates
Update svn_ra_open4() to svn_ra_open5() across the tree.

Most of these changes are mechanical. JavaHL gains a redirect cycle fix.

The set_svn_ra_open() callback gets updated to the new API.

* subversion/bindings/javahl/native/CommitEditor.cpp

(open_callback_session): Use svn_ra_open5() and show the redirected URL in

an error message.

* subversion/bindings/javahl/native/RemoteSession.cpp

(RemoteSession::RemoteSession): Use svn_ra_open5() and detect redirect

cycles based on the actual redirection URL sent by the server.

* subversion/libsvn_client/ra.c

(svn_client__open_ra_session_internal): Use svn_ra_open5().

* subversion/libsvn_ra/ra_loader.c

(svn_ra_open5): Pass svn_ra_open5 to the svn_svn_ra_open() callback.

* subversion/libsvn_ra/ra_loader.h

(svn_ra__open_func_t): Update to match svn_ra_open5().

* subversion/libsvn_ra_serf/serf.c

(svn_ra_serf__open): Update comment referring to svn_ra_open4().

* subversion/svnsync/svnsync.c

(do_initialize, open_source_session,

open_target_session): Update to svn_ra_open5().

* subversion/tests/cmdline/atomic-ra-revprop-change.c

(change_rev_prop): Update to svn_ra_open5().

* subversion/tests/libsvn_ra/ra-test.c

(make_and_open_repos, check_tunnel_callback_test, tunnel_callback_test,

tunnel_run_checkout, commit_locked_file): Update to svn_ra_open5().

  1. … 8 more files in changeset.
* everywhere: Run tools/dev/ to remove

trailing whitespace before we branch 1.14.

  1. … 105 more files in changeset.
Adjust expectations of a new test to account for differences between RA

layers. A follow-up to r1860936.

* subversion/tests/libsvn_ra/ra-test.c

(test_get_deleted_rev_errors): Expect a generic error code when running

over HTTP, otherwise the specific error code for this error case.

Provide a way for svnserve's 'get-deleted-rev' API to return 'not deleted'.

Previously the answer 'not deleted' was indistinguishable from an error when

using the svnserve protocol.

The standard 'svn' client software does not appear to invoke this case, but

it is meant to be a valid answer and is supported by the other repository

access protocols.

To work around the problem without changing the protocol, we re-purpose the

obsolete error code 'SVN_ERR_ENTRY_MISSING_REVISION' to communicate this

'not deleted' reply to the client.

(Re-purposing an old error code was not essential. An alternative would be

to create a new error code which would become part of the public API in the

next minor release, but would be deemed non-public when backported to older

release lines.)

Behaviour changes:

- With a new client against a new server, such queries are now handled


- With an old client against a new server, the client will report a more

informative error message.

- With a new client against an old server, there is no improvement.

* subversion/svnserve/serve.c

(get_deleted_rev): If the answer is SVN_INVALID_REVNUM, return a


* subversion/libsvn_ra_svn/client.c

(ra_svn_get_deleted_rev): Convert the error SVN_ERR_ENTRY_MISSING_REVISION

back to a response of SVN_INVALID_REVNUM.

* subversion/tests/libsvn_ra/ra-test.c

(commit_two_changes): New.


test_get_deleted_rev_errors): New tests.

(test_funcs): Run them.

  1. … 2 more files in changeset.
Add a bunch of missing build artifact svn:ignore items.
  1. … 7 more files in changeset.
* subversion/tests/libsvn_ra/ra-test.c

(lock_cb): Use svn_lock_dup() instead of making a field-by-field copy

of the svn_lock_t.

Follow-up to r1815799: Fix assertion triggered in ra-tests over ra_svn.

* subversion/tests/libsvn_ra/ra-test.c

(commit_locked_file): Don't use a closed editor, create a new one instead.

Following up on r1815799, rework the commit_locked_empty_relpath_test().

Within it, don't test an undocumented/invalid usage of the delta editor

API with using open_root() for a file URL as, apparently, that works by

a coincidence.

* subversion/tests/libsvn_ra/ra-test.c

(commit_locked_empty_relpath_test): Rename to...

(commit_locked_file): ...this. Properly open the parent folder as

the root of the edit and avoid using empty relpaths.

(test_funcs): Track the test rename.

ra_serf: Properly process lock tokens for empty relative paths ("")

within the commit editor.

Previously, the condition in maybe_set_lock_token_header() would silently

skip adding the corresponding headers for the supplied lock tokens with

empty relpaths. That, in turn, would result in a failure when committing

changes for a locked file with an RA session opened for a file URL,

even with appropriate lock tokens passed to the commit editor.

(Apparently, "svn commit" is not affected by this issue, as it uses the

file's parent URL when opening the RA session; but nevertheless, the

issue prevents a legit usage of the public API.)

* subversion/libsvn_ra_serf/commit.c

(maybe_set_lock_token_header): Disallow NULL relpaths, but allow

the empty ones.

* subversion/tests/libsvn_ra/ra-test.c

(commit_locked_empty_relpath_test): New test.

(test_funcs): Add new test.

  1. … 1 more file in changeset.
Follow-up to r1723865: Relax check in newly added test to copy with known

problem in ra_serf.

* subversion/tests/libsvn_ra/ra-test.c

(get_dir_test): Do not check DIRENT->SIZE due known problem in ra_serf. This

test for different bug.

Fix bug when svn_ra_get_dir2() will fail if invoked with SVN_DIRENT_SIZE, but

without SVN_DIRENT_KIND. There is no user visible bug, since Subversion

command line client always ask for SVN_DIRENT_KIND.

* subversion/libsvn_ra_local/ra_plugin.c

(svn_ra_local__get_dir): Do not access possibly uninitialized local variable.

* subversion/svnserve/serve.c

(get_dir): Do not access possibly uninitialized local variable.

* subversion/tests/libsvn_ra/ra-test.c

(get_dir_test): Extend test to test svn_ra_get_dir2(SVN_DIRENT_SIZE).

  1. … 2 more files in changeset.
Following up on r1720220, make testcase expect new behavior.

* subversion/tests/libsvn_ra/ra-test.c

(commit_empty_last_change): Update expected result.

* subversion/tests/libsvn_ra/ra-test.c

(commit_empty_last_change): Fix minor const issue, not detected by my

compiler in plain C mode.

Following up on r1716579, add a test to verify that we can copy from

a no-op revisions in later revisions, and that the history is kept

up to date.

On the FS layer in BDB this will currently be represented as a copy

from something later than what the transaction is based on.

(But everything works as expected)

* subversion/tests/libsvn_ra/ra-test.c

(AA_receiver): New function.

(commit_empty_last_change): Extend test.

Following up on r1716548, add another regression test. Asserting current


* subversion/tests/libsvn_ra/ra-test.c

(commit_empty_last_change): New test.

(test_funcs): Add commit_empty_last_change.

Fix const/non-const pointer conversion warning.

* subversion/tests/libsvn_ra/ra-test.c

(tunnel_run_checkout): svn_ra_do_update3 takes a const svn_ra_reporter3_t** parameter.

Following up on r1696222, implement polling on pipes on Windows.

Note that PeekNamedPipe() also works on unnamed pipes, such as those created

by apr to hook stdin and stdout of subprocesses.

* subversion/libsvn_subr/stream.c

(data_available_handler_apr): Implement polling on pipes for Win32.

* subversion/tests/libsvn_ra/ra-test.c

(test_funcs): Remove Windows specific XFail marking.

  1. … 1 more file in changeset.
Improve tunnel callback tests to include more scenarios and to stop allocating

a baton on the stack that is referenced from cleanup functions.

This test ensures that we try to poll the connection at least once; which

currently fails on Windows.

* subversion/tests/libsvn_ra/ra-test.c

(check_tunnel_callback_test): Allocate baton in pool. Ensure specific error.

(tunnel_callback_test): Don't ignore some errors for FAIL reporting.

(tunnel_run_checkout): New test.

(test_funcs): Add new test.

* subversion/tests/libsvn_ra/ra-test.c

(ra_list_has_props): Following up on r1673170, remove call to SVN_DBG().

Add an fs layer api that allows obtaining just a boolean indicating whether

properties exist on a node, instead of always obtaining the properties and

checking their count.

This is by far the most expensive operation on 'svn ls -v' in Subversion <=

1.8.x on huge directories as it requires fetching much 'new' data, and has

the risk of trashing the node cache.

r1673153 made new 'svn' clients stop asking for this information for this

scenario but existing clients do ask and so will most likely many third

party clients (confirmed for TortoiseSVN), will keep asking for this


This function introduces the FS api and updates callers, but doesn't provide

optimized implementations yet, so the result is that this doesn't change

runtime behaviour yet, but just moves the implementation into the fs layer.

I hope this patch will be accepted for 1.9.0 to allow further improvements

in later patches, potentially after 1.9.0.

* subversion/include/svn_fs.h

(svn_fs_node_has_props): New function.

* subversion/libsvn_fs/fs-loader.c

(svn_fs_node_has_props): New function.

* subversion/libsvn_fs/fs-loader.h

(root_vtable_t): Add node_has_props.

* subversion/libsvn_fs_base/tree.c

(base_node_has_props): New function.

(root_vtable): Add function.

* subversion/libsvn_fs_fs/tree.c

(fs_node_has_props): New function.

(root_vtable): Add function.

* subversion/libsvn_fs_x/tree.c

(x_node_has_props): New function.

(root_vtable): Add function.

* subversion/libsvn_ra_local/ra_plugin.c

(svn_ra_local__get_dir): Use new optimized fs call. Rename subpool

to iterpool.

* subversion/libsvn_repos/repos.c

(svn_repos_stat): Use new optimized fs call.

* subversion/mod_dav_svn/liveprops.c

(insert_prop_internal): Use optimized code for svn clients.

* subversion/svnserve/serve.c

(get_dir): Use optimized fs code.

* subversion/tests/libsvn_ra/ra-test.c

(ra_list_has_props): New function.

(test_funcs): Add ra_list_has_props.

  1. … 10 more files in changeset.
Following up on r1665902, update callers in our test suite to newer api.

* subversion/tests/cmdline/atomic-ra-revprop-change.c

(construct_auth_baton): Update caller.

* subversion/tests/libsvn_ra/ra-test.c


tunnel_callback_test): Update caller.

* subversion/tests/svn_test_main.c

(svn_test__init_auth_baton): Update caller.

  1. … 2 more files in changeset.
Following up on r1665557, add regression test ensuring that all ra layers

properly support interupting results from the log and location segment


* subversion/tests/libsvn_ra/ra-test.c


error_segment_receiver): New helper functions.

(errors_from_callbacks): New test.

(test_funcs): Add errors_from_callbacks.

* subversion/tests/libsvn_ra/ra-test.c




ra_revision_errors): Properly close all directories that were opened.

* subversion/tests/libsvn_ra/ra-test.c

(ra_revision_errors): Make variables const to resolve compiler warnings.

* subversion/tests/libsvn_ra/ra-test.c

(ra_revision_errors): Remove SVN_DBG() call.

Following up on r1665480, add regression test for the issues

resolved in this patch.

* subversion/tests/libsvn_ra/ra-test.c


replay_range_rev_end): New functions.

(ra_revision_errors): Add test on svn_ra_replay_range().

Make all ra layers behave the same way on passing invalid revisions to


* subversion/libsvn_ra/ra_loader.c

(svn_ra_replay): Add assertion on requirements as already checked by DAV

and SVN.

* subversion/libsvn_repos/replay.c

(path_driver_cb_func): Let the actual editor decide how it uses its batons.

The standard delta editor always uses NULL batons, which doesn't make it


(svn_repos_replay2): Apply sanity check instead of correcting.

(svn_repos__replay_ev2): Use proper check.

* subversion/tests/libsvn_ra/ra-test.c

(ra_revision_errors): Extend test.

  1. … 2 more files in changeset.
* subversion/tests/libsvn_ra/ra-test.c

(ra_revision_errors): Add comment.

Make al ra layers consistently handle invalid revisions when retrieving

inherited properties: add errors in a few cases that worked before, but

used to provide results that couldn't be trusted.

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

(svn_fs_bdb__get_rev): Show understandable error on SVN_INVALID_REVNUM instead

of a raw database error.

* subversion/libsvn_ra_local/ra_plugin.c

(svn_ra_local__get_inherited_props): Remove invalid->youngest handling.

* subversion/mod_dav_svn/reports/inherited-props.c

(dav_svn__get_inherited_props_report): Retrieving iprops on a not existing

path is an error.

* subversion/svnserve/serve.c

(get_inherited_props): Remove invalid->youngest handling. Retrieving iprops

on a not existing path is an error.

* subversion/tests/libsvn_ra/ra-test.c

(ra_revision_errors): Extend tests.

  1. … 4 more files in changeset.
* subversion/tests/libsvn_ra/ra-test.c

(ra_revision_errors): Add a few more lock/unlock behavior tests.