Checkout Tools
  • last updated 1 hour ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
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

correctly.

- 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

SVN_ERR_ENTRY_MISSING_REVISION error to the client.

* 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_no_delete,

test_get_deleted_rev_errors): New tests.

(test_funcs): Run them.

  1. … 2 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

behavior.

* 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

information.

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

(check_tunnel_callback_test,

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

callbacks.

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

(error_log_receiver,

error_segment_receiver): New helper functions.

(errors_from_callbacks): New test.

(test_funcs): Add errors_from_callbacks.

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

(commit_changes,

commit_tree,

delete_revision_above_youngest,

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_start,

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

svn_ra_replay().

* 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

invalid.

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

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

(stub_file_rev_handler): New function.

(lock_stub_baton_t): New struct.

(store_lock_result): New function.

(ra_revision_errors): Extend tests to include the blame and lock apis.

Add a few more boundary revision checks on the ra_revision_errors test.

* subversion/libsvn_repos/rev_hunt.c

(svn_repos_node_location_segments): Make sanity checks more explicit,

instead of relying on later fs calls to produce similar results.

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

(stub_log_receiver,

stub_segment_receiver): New function.

(ra_revision_errors): Extend function.

  1. … 1 more file in changeset.
In ra-tests.c: Minor housekeeping, including removing a SVN_DBG().

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

(SVN_DEPRECATED): Remove define.

(commit_changes,

commit_tree): Use non-deprecated function.

(ra_revision_errors): Remove SVN_DBG().

(max_threads): Increase to 4.