Add the gtest_addition branch which will be used for testing the
Subversion C++ bindings.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/gtest_addition@1452117 13f79535-47bb-0310-9956-ffa450edef68
Add the optional dependency Googletest (aka Gtest) to be compiled by
the build system.
 
* trunk/get-deps.sh (gtest): change gtest dir to libgtest and
  add user information.

* trunk/build/generator/gen_base.py (TargetLinked.add_dependencies): 
  Add .cc extension.

* trunk/gen-make.py (_usage_exit): add gtest flag help info. 

* trunk/Makefile.in(): various entries for gtest flags
 
* trunk/build.conf (install): Add Gtest target.

* trunk/configure.ac (): Add AC_ARG_ENABLE command hook and test
  (build rules): add gtest build rules

* INSTALL (Dependency Overview): add entry for Gtest
  (Dependencies in Detail): add entry for Gtest

* doc/programmer/gtest-guide.txt(): Documentation for Subversion's
  installation of Gtest.

* subversion/bindings/cxxhl/gtests/GtestAcceptance.cpp(): Sample test
  for gtest.

* subversion/bindings/cxxhl/gtests/Makefile(): Makefile for sample
  test for gtest.
  

  


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/gtest_addition@1452120 13f79535-47bb-0310-9956-ffa450edef68
Add inheritance info to JavaHL's RevisionRange type.

* subversion/bindings/javahl/src/org/apache/subversion/javahl/types/RevisionRange.java
  (RevisionRange.serialVersionUID): Updated.
  (RevisionRange.inheritable): New private member.
  (RevisionRange.RevisionRange): Updated construcors and parsers.
  (RevisionRange.isInheritable): New public method.
  (RevisionRange.toString): Note inheritable flag in returned string.
  (RevisionRange.hashCode, RevisionRange.equals): Use inheritable flag.

* subversion/bindings/javahl/native/RevisionRange.cpp
  (RevisionRange::makeJRevisionRange): Update Java object construction.

* subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
  (BasicTests.testMergeinfoParser): Test non-inheritable ranges.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1499308 13f79535-47bb-0310-9956-ffa450edef68
* subversion/bindings/javahl/native/RemoteSession.cpp (fill_dirents):
   Don't crash if the dirents hash is NULL.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1499327 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_wc/deprecated.c
  (svn_wc__status2_from_3): Fix a wrong pointer passed to svn_wc__cd3_to_cd2().
   Should fix segfaults in ruby-bindings tests on the bb-openbsd bot.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1499360 13f79535-47bb-0310-9956-ffa450edef68
Followup to r1499308: Fix some failing JavaHL tests.

* subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
  (acquireMergeinfoAndAssertEquals): Ignore the merge range inheritance flag.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1499361 13f79535-47bb-0310-9956-ffa450edef68
* subversion/bindings/javahl/src/org/apache/subversion/javahl/types/RevisionRange.java:
  (RevisionRange.RevisionRange, RevisionRange.compareTo): Update docstrings.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1499364 13f79535-47bb-0310-9956-ffa450edef68
Improve transition based xml parser validations a bit by checking for opening
and closing of a document element. Also improve an error message for this
parser, to help me in debugging.

* subversion/libsvn_ra_serf/ra_serf.h
  (svn_ra_serf__xml_context_destroy): Rename to ...
  (svn_ra_serf__xml_context_done): ... this.

* subversion/libsvn_ra_serf/util.c
  (expat_response_handler): Avoid duplicated code by using an at_eof flag.
     Call svn_ra_serf__xml_context_done() to verify clean parser shutdown.

* subversion/libsvn_ra_serf/xml.c
  (svn_ra_serf__xml_context_destroy): Rename to...
  (svn_ra_serf__xml_context_done): ... this and add verification on the
    final state of the transition parser.

  (svn_ra_serf__xml_cb_start): Improve error message.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1499386 13f79535-47bb-0310-9956-ffa450edef68
Checkpoint some preparation for converting the update report xml parser in
ra_serf to the transition based parser. This patch just adds new and
updates existing commented out code.

The code currently doesn't exit the processing loop when enabled.

* subversion/libsvn_ra_serf/update.c
  (USE_TRANSITION_PARSER): Add commented define.
  (report_state_e): Add a few more states.
  (update_ttable): Fix a few existing transitions and add new
    ones as needed by a simple checkout.

  (update_opened,
   update_closed,
   update_cdata): Move functions to ...

  (update_opened,
   update_closed,
   update_cdata): ... here, to allow calling the required helper functions,
     Add some temporary SVN_DBG() calls to verify the transition table.

  (finish_report): Add code to allow enabling the new parser, depending on
    USE_TRANSITION_PARSER.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1499393 13f79535-47bb-0310-9956-ffa450edef68
Follow-up to r1495329:

* Makefile.in
  (INSTALL_EXTRA_TOOLS): Use an absolute symlink instead of a relative 

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1499403 13f79535-47bb-0310-9956-ffa450edef68
Following up on r1499393, remove done variable from report baton that should
not be used separately from the handler done variable, as that breaks parsing
responses.

This might resolve some hard to test error handling issues.

* subversion/libsvn_ra_serf/update.c
  (report_state_e): Use proper macro.
  (report_context_t): Remove variable.
  (update_ttable): Request callback on close of document element.
  (update_closed): Don't reset done. The xml parser handles the handler done
    for us.
  (finish_report): Use handler->done as loop check and remove last usages of
    parser_ctx when USE_TRANSITION_PARSER.

  (make_update_reporter): Update baton initialization.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1499416 13f79535-47bb-0310-9956-ffa450edef68
Fix busted-proxy detection: any 411 will be received without a
Subversion error.  Tested by tweaking the testsuite code to set
busted-proxy=yes and running the entire testsuite through nginx;
all tests pass in this configuration.  One remaining problem is
that redirect_tests.py 2 and 3 FAIL when busted-proxy is set and
the client connects directly to httpd without a proxy.

* subversion/libsvn_ra_serf/options.c
  (svn_ra_serf__probe_proxy): Handle 411 in the SVN_NO_ERROR path.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1499423 13f79535-47bb-0310-9956-ffa450edef68
Block building with BDB 6.

* build/ac-macros/berkeley-db.m4
  (SVN_LIB_BERKELEY_DB_TRY): Block building with BDB 6, with a comment
    explaining why.
  (SVN_LIB_BERKELEY_DB): Document that only 4.x and 5.x are supported.
  (--with-berkeley-db): Ditto.  The help string does not evaluate the $,
    but that is a preexisting bug that should be fixed separately.X.lists.svn-dev [Msgs:15841 New:82

* build/generator/gen_win.py
  (GeneratorBase._find_bdb): Add a comment cautioning against enabling
    BDB 6.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1499438 13f79535-47bb-0310-9956-ffa450edef68
* configure.ac: Nuke the warning at the end about not building with BDB,
    because the BDB backend is deprecated.
    The warning had a bug: it referred to $with_berkeley_db which is never set.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1499447 13f79535-47bb-0310-9956-ffa450edef68
configure: Add an opt-in for BDB 6.

Review by: stsp
(He co-authored the warning text, too.)

* build/ac-macros/berkeley-db.m4
  (--enable-banging-head-against-wall): New option.
  (SVN_LIB_BERKELEY_DB_TRY): Grow new parameter, add a possible return value.
  (SVN_LIB_BERKELEY_DB): Add a new failure mode when bdb6 was found but the
    opt-in not used.

* configure.ac: Add a detailed warning message for "Found, but not opt-in" case.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1499460 13f79535-47bb-0310-9956-ffa450edef68
* subversion/svn/svn.c
  (sub_main): Also flush stdout when returning an error, for the same reason
    as why we flush on success.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1499470 13f79535-47bb-0310-9956-ffa450edef68
Fix a typo in the config file BOM test.

* subversion/tests/libsvn_subr/config-test.c
  (test_ignore_bom): First char of UTF-8 BOM is 0xEF not 0xEE


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1499483 13f79535-47bb-0310-9956-ffa450edef68
Fix incorrect conversion of char to int in config file parsing.

See: https://www.securecoding.cert.org/confluence/display/seccode/STR34-C.+Cast+characters+to+unsigned+char+before+converting+to+larger+integer+sizes

* subversion/libsvn_subr/config_file.c
  (parser_getc, parser_getc_plain): Before converting char to int cast to
    unsigned char.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1499492 13f79535-47bb-0310-9956-ffa450edef68
Allow config files to have a UTF-8 BOM at the start.

* subversion/libsvn_subr/config_file.c
  (skip_bom): New function to skip a UTF-8 BOM.
  (svn_config__parse_stream): Call skip_bom() at start of parsing.

* subversion/tests/libsvn_subr/config-test.c
  (test_funcs): Mark test_ignore_bom as passing.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1499496 13f79535-47bb-0310-9956-ffa450edef68
Clean up some style nits in skip_bom().

* subversion/libsvn_subr/config_file.c
  (skip_bom): Remove some unnecessary syntax that I thought I'd
    removed before committing r1499496.


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