Fix svn_io_file_aligned_seek for non-buffered files.  Add test cases to
cover non-buffered files as well.

* subversion/libsvn_subr/io.c
  (svn_io_file_aligned_seek): Re-introduce an "else" that probably got lost
                              as part of some manual conflict resolution -
                              not necessarily on /trunk.

* subversion/tests/libsvn_subr/io-test.c
  (aligned_seek,
   aligned_read_at,
   aligned_read): Add BUFFERED parameter to switch the post-condition
                  checks on svn_io_file_aligned_seek on and off.
  (aligned_seek_test): Add a second access sequence for the same file
                       but in non-buffered mode.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1558484 13f79535-47bb-0310-9956-ffa450edef68
Cleanup test infrastructure creation a bit.

* subversion/tests/libsvn_wc/db-test.c
  (create_open): Remove tree before creating new data.

* subversion/tests/libsvn_wc/utils.c
  (svn_test__create_fake_wc): Remove single file DB delete right before
    creating the new database.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1558566 13f79535-47bb-0310-9956-ffa450edef68
In the C tests: When we create a wc.db file containing test data, we should
close it before running the tests on it using another db instance.

* subversion/tests/libsvn_wc/db-test.c
  (create_open): Update caller.

* subversion/tests/libsvn_wc/entries-compat.c
  (create_fake_wc): Update caller.

* subversion/tests/libsvn_wc/utils.c
  (svn_test__create_fake_wc): Remove result pool. There are no output
    arguments. Install statistics.

* subversion/tests/libsvn_wc/utils.h
  (svn_test__create_fake_wc): Update prototype.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1558571 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_wc/wc_db.c
  (init_db): Revert accidental change in r1558571, this init is already
    handled via a call to svn_wc__db_install_schema_statistics().


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1558573 13f79535-47bb-0310-9956-ffa450edef68
Move some test creation to its single user.

* subversion/tests/libsvn_wc/entries-compat.c
  (create_fake_wc): Move M subdir creation...
  (test_stubs): ... to this test, as no other test uses it.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1558616 13f79535-47bb-0310-9956-ffa450edef68
Hide the informational 'Malformed XML: parsing aborted' errors in ra serf,
when we have a better error message in the error chain.

(See authz_tests.py 25 "remove a subdir with authz file" as an example
 of a simplified error chain)

This resolves a slight regression against 1.8 where we ignored all xml
errors when we had an error in the chain.

* subversion/libsvn_ra_serf/xml.c
  (EXPAT_HAS_STOPPARSER): Remove macro.
  (parse_xml): Update argument to expat context. Handle the inner error here
    instead of in the caller to allow hiding our abort handling.

  (expat_start,
   expat_end,
   expat_cdata): Update abort call.

  (expat_response_handler): Update caller.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1558745 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_wc/wc_db.c
  (init_db): Reorder two queries to avoid a statement reprepare in sqlite.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1558758 13f79535-47bb-0310-9956-ffa450edef68
* subversion/tests/libsvn_wc/op-depth-test.c
  (check_db_rows): Properly join both wc_id and local_relpath to avoid
    creating a temporary index.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1558759 13f79535-47bb-0310-9956-ffa450edef68
Extract common code.

* subversion/libsvn_ra_serf/update.c
  (process_buffer): New helper for update_delay_handler() and 
   process_pending(). Extracted from update_delay_handler().
  (update_delay_handler, process_pending): Use process_buffer().


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1558843 13f79535-47bb-0310-9956-ffa450edef68
Following up on r1558468, send output of the sqlite error logging (when
enabled) to the same output stream as SVN_DBG(); typically stdout.

* subversion/include/private/svn_sqlite.h
  (svn_sqlite__dbg_enable_errorlog): Update documentation.

* subversion/libsvn_subr/sqlite.c
  (sqlite_error_log): Update implementation.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1558907 13f79535-47bb-0310-9956-ffa450edef68
* subversion/mod_dav_svn/dav_svn.h
  (dav_svn__bulk_upd_conf): Fix reference in comment.

* subversion/mod_dav_svn/mod_dav_svn.c
  (conf_flag): Fix reference in comment.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1558908 13f79535-47bb-0310-9956-ffa450edef68
Prevent spurious failures in client-test 8 when CLEANUP isn't used.

* subversion/tests/libsvn_client/client-test.c
  (test_suggest_mergesources): Have to remove the wc before doing
    a checkout, otherwise you get an error on UUID mismatches.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1558946 13f79535-47bb-0310-9956-ffa450edef68
Rename variable to be consistent with other tests.  No functional change.

* subversion/tests/libsvn_client/client-test.c
  (test_suggest_mergesources): s/wc_dir/wc_path/


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1558947 13f79535-47bb-0310-9956-ffa450edef68
Make some errors when running tests more friendly.

"Don't know what to do about" is not a helpful error.

* build/run_tests.py
  (TestHarness._run_c_test): Specify what we were testing the executable flag,
    prefix the error with a newline so it doesn't run into the test name,
    and simplify the code some.
  (TestHarness._run_py_test): Specify there was an error while loading the
    test, prefix error with newline like above, and print a traceback of
    the exception.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1558962 13f79535-47bb-0310-9956-ffa450edef68
swig-pl: Fix when configure is passed --enable-sqlite-compatibility-version

* subversion/bindings/swig/perl/native/Makefile.PL.in
  ($cppflags, $cflags): Set from autoconf with here documents to avoid quoting
    issues.

Patch by: James McCoy <jamessan{_AT_}debian.org>



git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1559009 13f79535-47bb-0310-9956-ffa450edef68
Fix issue #4463: log -g --xml doesn't differentiate between forward and
reverse merges.

This adds a new attribute on the logentry entity named reverse-merge,
which is true if the merge is a reverse merge and false if it's a
regular merge.

* subversion/tests/cmdline/svntest/actions.py
  (LogEntry.__init__): Add an attributes dict
  (LogEntry.assert_log_attrs): Provide a way to compare attributes dict
  (LogParser.logentry_start): Pass the attributes from the logentry to
    the LogEntry constructor.
  (svntest.run_and_verify_log_xml): Add a new expected_log_attrs argument
    which lets you test the logentry entity's attributes.

* subversion/tests/cmdline/log_tests.py
  (merge_sensitive_log_xml_reverse_merges, test_list): New test

* subversion/svn/log-cmd.c
  (svn_cl__log_entry_receiver_xml): Output the reverse-merge attribute
    for the logentry entity when there the revision is a merge from -g.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1559032 13f79535-47bb-0310-9956-ffa450edef68
Followup to r1559032: fix a style nit.  No functional change.

* subversion/svn/log-cmd.c
  (svn_cl__log_entry_receiver_xml): Use indented brackets per our style


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1559035 13f79535-47bb-0310-9956-ffa450edef68
Fix the fact that my editor decided not to follow style entirely.
No functional change.

* subversion/svn/log-cmd.c
  (svn_cl__log_entry_receiver_xml): split up else and brakets per our style


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1559177 13f79535-47bb-0310-9956-ffa450edef68
Fix use of an unitialised variable identified by valgrind.

* subversion/libsvn_ra_serf/commit.c
  (setup_if_header_recursive): Always initialise return value.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1559197 13f79535-47bb-0310-9956-ffa450edef68
In our internal sqlite api provide sqlite with the knowledge if certain
defined functions are deterministic (as defined by sqlite). This allows Sqlite
to optimize their usage in very recent Sqlite versions.

* subversion/include/private/svn_sqlite.h
  (svn_sqlite__create_scalar_function): Add argument.

* subversion/libsvn_subr/sqlite.c
  (SQLITE_DETERMINISTIC): Define as 0 for older Sqlite versions.
  (svn_sqlite__open): Declare utf functions as deterministic.
  (svn_sqlite__create_scalar_function): Allow declaring deterministic.

* subversion/libsvn_wc/wc_db_util.c
  (svn_wc__db_util_open_db): Update caller.

* subversion/tests/libsvn_subr/sqlite-test.c
  (test_sqlite_reset): Update caller.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1559352 13f79535-47bb-0310-9956-ffa450edef68