davautocheck.sh: When running under something other than bash, teach the
prompt to exit as soon as something is available on stdin.  (Previously,
on FreeBSD, just answering "y\n" to the prompt would not be immediately
recognized.)

Thanks to gstein and peters for feedback.

* subversion/tests/cmdline/davautocheck.sh
  (query): Juggle a little to ensure that the terminal is in cbreak mode for
    the propmt.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1507851 13f79535-47bb-0310-9956-ffa450edef68
swig-py: In 'from svn.core import *', actually import all libsvn_subr public
symbols (such as SVN_VER_MAJOR).

* subversion/bindings/swig/python/svn/core.py
  (all): Set dynamically, in a manner consistent with the other svn/*.py
    modules.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1507860 13f79535-47bb-0310-9956-ffa450edef68
* subversion/tests/cmdline/davautocheck.sh
  (PATH): Add a comment that describes the presumed intent of a line of code,
    not only what the code itself already says.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1507888 13f79535-47bb-0310-9956-ffa450edef68
davautocheck.sh: use the APXS value from Makefile.  Without this patch,
/usr/bin/apxs2 would be used even if --with-apxs=... was passed to configure.

I think the
 || APXS=$(which apxs) \
 || APXS=$(which apxs2) \
lines may be removed now, too.

* subversion/tests/cmdline/davautocheck.sh
  (APXS): Sniff the value from Makefile.  Since this depends on $ABS_BUILDDIR,
    move the code that sets that variable up (without changing it).

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

* Makefile.in
  (APXS): Strip whitespace at the end of the definition, which propagates to
    the value.

* subversion/tests/cmdline/davautocheck.sh
  (APXS): Fix the sniffing from Makefile so that it works not only when
    grep/sed failed, but also when they succeeded (by promoting the setting
    of the parameter outside of a subshell).

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1507891 13f79535-47bb-0310-9956-ffa450edef68
davautocheck.sh: teach it to re-use the same port every time.  I really
shouldn't have to copy the port number from the "run httpd under gdb" shell
to the "exercise it" shell by hand.

Note: this also makes davautocheck.sh auto-stop the last instance it started.

* subversion/tests/cmdline/davautocheck.sh
  (STOPSCRIPT): New filename.
  (random_port): Remove as unused.
  (HTTPD_PORT): Use the first available port ≥3691.
  (START): Before starting httpd, automatically stop the previous httpd
   launched by this script.

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

* subversion/tests/cmdline/davautocheck.sh:
    Remove a scalpel.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1507938 13f79535-47bb-0310-9956-ffa450edef68
* subversion/tests/cmdline/davautocheck.sh
  (--gdb): New cmdline option.

[ Unrelated change in this commit: make $STOPSCRIPT emit an info message as it
  runs, to make the subsequent output from 'httpd -k stop' clearer. ]

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1507939 13f79535-47bb-0310-9956-ffa450edef68
davautocheck.sh: reuse the same port number when stopping a previous instance.

* subversion/tests/cmdline/davautocheck.sh:
    Stop the previous instance before choosing an available port.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1507946 13f79535-47bb-0310-9956-ffa450edef68
backport.pl: Restore cooked mode upon abnormal termination.

* tools/dist/backport.pl
  (prompt.$getchar): Restore cooked mode if ReadKey croaked.
  (signal_handler): New.
  (main): Use signal_handler() to restore cooked mode if ReadKey was
    interrupted by a SIGTERM.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1507967 13f79535-47bb-0310-9956-ffa450edef68
* autogen.sh: Configure stores initial CFLAGS and CXXFLAGS in the internal
   CUSERFLAGS and CXXUSERFLAGS, not the other way around.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1507977 13f79535-47bb-0310-9956-ffa450edef68
Convert C++HL exception test to Gmock, and fix a bug in the exception converter.

* subversion/bindings/cxxhl/src/exception.cpp (detail::checked_call):
   Use separate ErrorBuilder and CancelledBuilder internal classes in order
    to avoid the vagaries of slicing constructors.

* subversion/bindings/cxxhl/tests/test_exception.cpp
  (traceall, tracecheck, DummyTest): Removed.
  (CatchError): Replaces test_error, converted to Gmock.
  (CatchCancelled): Replaces test_cancelled, converted to Gmock.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1507987 13f79535-47bb-0310-9956-ffa450edef68
Fix the out-of-bounds memory access in test_string_matching_test.  Follow-up
to r1505336.

* subversion/tests/libsvn_subr/string-test.c
  (test_string_matching): Correctly initialize the 'max_match' value to avoid
    out-of-bounds memory access.

Patch by: Evgeny Kotkov <evgeny.kotkov{_AT_}visualsvn.com>


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1507993 13f79535-47bb-0310-9956-ffa450edef68
Merge the docstring improvement of r1471208 from /branches/fsfs-format7.
No functional change.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1508006 13f79535-47bb-0310-9956-ffa450edef68
In C++HL, add a size() method to the APR hash wrappers, and convert the
hash tests to Gmock.

* subversion/bindings/cxxhl/src/aprwrap/hash.hpp (Hash::size): New method.

* subversion/bindings/cxxhl/tests/test_aprwrap.cpp (hashtest): Removed.
  (StringHash, FixedStringHash, Delete, Iterate): New test cases.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1508018 13f79535-47bb-0310-9956-ffa450edef68
* subversion/bindings/cxxhl/tests/test_aprwrap.cpp:
   Do not rely on compilers doing constant-string optimization.
   Use the EXPECT_STREQ predicate when comparing strings.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1508164 13f79535-47bb-0310-9956-ffa450edef68
Follow-up to r1507366: svn_hash_gets: compute the length of string literal
keys (common case) at compile-time, without multiply-evaluating dynamically-
computed keys.

Review by: philip
           breser

* build/ac-macros/svn-macros.m4
  (SVN_CHECK_FOR_DUNDER_BUILTINS): New macro.

* configure.ac:
    Call SVN_CHECK_FOR_DUNDER_BUILTINS() and set -D SVN_HAS_DUNDER_BUILTINS.

* subversion/include/svn_hash.h
  (svn_hash_gets): Use __builtin_choose_expr() and __builtin_constant_p(),
    when available.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1508170 13f79535-47bb-0310-9956-ffa450edef68
Fix the detection of __builtin_constant_p support.
We cannot use __builtin_choose_expr as explained here:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19449

* build/ac-macros/svn-macros.m4
  (AC_DEFUN): simply check that __builtin_constant_p works

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1508221 13f79535-47bb-0310-9956-ffa450edef68
Depending on the #include order of svn_private_config.h vs.
svn_hash.h, SVN_HAS_DUNDER_BUILTINS may not be defined when
the svn_hash_gets macro is being parsed.

Generate a compiler warning when svn_hash.h gets #included
before svn_private_config.h.

* subversion/include/svn_hash.h
  (SVN_HAS_DUNDER_BUILTINS): disable optimization when undefined
  (svn_hash_gets): extend commentary

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1508222 13f79535-47bb-0310-9956-ffa450edef68
Fix the #include order such that svn_private_config.h is always
included first before any other svn header - if we also include
svn_hash.h.

* subversion/bindings/javahl/native/org_apache_subversion_javahl_ConfigImpl_Category.cpp,
  subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c,
  subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c,
  subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c,
  subversion/libsvn_auth_gnome_keyring/gnome_keyring.c,
  subversion/libsvn_client/add.c,
  subversion/libsvn_client/cat.c,
  subversion/libsvn_client/changelist.c,
  subversion/libsvn_client/cleanup.c,
  subversion/libsvn_client/commit.c,
  subversion/libsvn_client/commit_util.c,
  subversion/libsvn_client/copy.c,
  subversion/libsvn_client/copy_foreign.c,
  subversion/libsvn_client/ctx.c,
  subversion/libsvn_client/delete.c,
  subversion/libsvn_client/deprecated.c,
  subversion/libsvn_client/diff.c,
  subversion/libsvn_client/diff_local.c,
  subversion/libsvn_client/diff_summarize.c,
  subversion/libsvn_client/export.c,
  subversion/libsvn_client/externals.c,
  subversion/libsvn_client/import.c,
  subversion/libsvn_client/info.c,
  subversion/libsvn_client/iprops.c,
  subversion/libsvn_client/list.c,
  subversion/libsvn_client/locking_commands.c,
  subversion/libsvn_client/log.c,
  subversion/libsvn_client/merge.c,
  subversion/libsvn_client/mergeinfo.c,
  subversion/libsvn_client/patch.c,
  subversion/libsvn_client/prop_commands.c,
  subversion/libsvn_client/ra.c,
  subversion/libsvn_client/repos_diff.c,
  subversion/libsvn_client/resolved.c,
  subversion/libsvn_client/revert.c,
  subversion/libsvn_client/status.c,
  subversion/libsvn_client/switch.c,
  subversion/libsvn_client/update.c,
  subversion/libsvn_client/util.c,
  subversion/libsvn_delta/compat.c,
  subversion/libsvn_delta/xdelta.c,
  subversion/libsvn_diff/parse-diff.c,
  subversion/libsvn_diff/util.c,
  subversion/libsvn_fs/access.c,
  subversion/libsvn_fs_base/bdb/changes-table.c,
  subversion/libsvn_fs_base/bdb/env.c,
  subversion/libsvn_fs_base/dag.c,
  subversion/libsvn_fs_base/fs.c,
  subversion/libsvn_fs_base/lock.c,
  subversion/libsvn_fs_base/revs-txns.c,
  subversion/libsvn_fs_base/tree.c,
  subversion/libsvn_fs_fs/caching.c,
  subversion/libsvn_fs_fs/fs_fs.c,
  subversion/libsvn_fs/fs-loader.c,
  subversion/libsvn_fs_fs/lock.c,
  subversion/libsvn_fs_fs/temp_serializer.c,
  subversion/libsvn_fs_fs/tree.c,
  subversion/libsvn_fs_util/fs-util.c,
  subversion/libsvn_ra/compat.c,
  subversion/libsvn_ra/deprecated.c,
  subversion/libsvn_ra_local/ra_plugin.c,
  subversion/libsvn_ra/ra_loader.c,
  subversion/libsvn_ra_serf/blame.c,
  subversion/libsvn_ra_serf/blncache.c,
  subversion/libsvn_ra_serf/commit.c,
  subversion/libsvn_ra_serf/getlocations.c,
  subversion/libsvn_ra_serf/getlocationsegments.c,
  subversion/libsvn_ra_serf/getlocks.c,
  subversion/libsvn_ra_serf/inherited_props.c,
  subversion/libsvn_ra_serf/log.c,
  subversion/libsvn_ra_serf/merge.c,
  subversion/libsvn_ra_serf/mergeinfo.c,
  subversion/libsvn_ra_serf/options.c,
  subversion/libsvn_ra_serf/property.c,
  subversion/libsvn_ra_serf/replay.c,
  subversion/libsvn_ra_serf/serf.c,
  subversion/libsvn_ra_serf/update.c,
  subversion/libsvn_ra_serf/util.c,
  subversion/libsvn_ra_serf/xml.c,
  subversion/libsvn_ra_svn/client.c,
  subversion/libsvn_ra_svn/editorp.c,
  subversion/libsvn_ra_svn/marshal.c,
  subversion/libsvn_repos/authz.c,
  subversion/libsvn_repos/commit.c,
  subversion/libsvn_repos/delta.c,
  subversion/libsvn_repos/deprecated.c,
  subversion/libsvn_repos/fs-wrap.c,
  subversion/libsvn_repos/hooks.c,
  subversion/libsvn_repos/log.c,
  subversion/libsvn_repos/replay.c,
  subversion/libsvn_repos/reporter.c,
  subversion/libsvn_repos/repos.c,
  subversion/libsvn_repos/rev_hunt.c,
  subversion/libsvn_subr/auth.c,
  subversion/libsvn_subr/cmdline.c,
  subversion/libsvn_subr/compat.c,
  subversion/libsvn_subr/config_auth.c,
  subversion/libsvn_subr/config.c,
  subversion/libsvn_subr/deprecated.c,
  subversion/libsvn_subr/dso.c,
  subversion/libsvn_subr/hash.c,
  subversion/libsvn_subr/io.c,
  subversion/libsvn_subr/mergeinfo.c,
  subversion/libsvn_subr/opt.c,
  subversion/libsvn_subr/properties.c,
  subversion/libsvn_subr/simple_providers.c,
  subversion/libsvn_subr/sorts.c,
  subversion/libsvn_subr/ssl_client_cert_providers.c,
  subversion/libsvn_subr/ssl_client_cert_pw_providers.c,
  subversion/libsvn_subr/ssl_server_trust_providers.c,
  subversion/libsvn_subr/subst.c,
  subversion/libsvn_subr/types.c,
  subversion/libsvn_subr/username_providers.c,
  subversion/libsvn_subr/utf.c,
  subversion/libsvn_subr/win32_crypto.c,
  subversion/libsvn_wc/adm_crawler.c,
  subversion/libsvn_wc/adm_files.c,
  subversion/libsvn_wc/adm_ops.c,
  subversion/libsvn_wc/conflicts.c,
  subversion/libsvn_wc/copy.c,
  subversion/libsvn_wc/deprecated.c,
  subversion/libsvn_wc/diff_editor.c,
  subversion/libsvn_wc/diff_local.c,
  subversion/libsvn_wc/entries.c,
  subversion/libsvn_wc/externals.c,
  subversion/libsvn_wc/info.c,
  subversion/libsvn_wc/lock.c,
  subversion/libsvn_wc/node.c,
  subversion/libsvn_wc/old-and-busted.c,
  subversion/libsvn_wc/props.c,
  subversion/libsvn_wc/revert.c,
  subversion/libsvn_wc/status.c,
  subversion/libsvn_wc/translate.c,
  subversion/libsvn_wc/update_editor.c,
  subversion/libsvn_wc/upgrade.c,
  subversion/libsvn_wc/wc_db.c,
  subversion/libsvn_wc/wc_db_update_move.c,
  subversion/libsvn_wc/wc_db_wcroot.c,
  subversion/libsvn_wc/workqueue.c,
  subversion/mod_dav_svn/activity.c,
  subversion/mod_dav_svn/deadprops.c,
  subversion/mod_dav_svn/lock.c,
  subversion/mod_dav_svn/merge.c,
  subversion/mod_dav_svn/mod_dav_svn.c,
  subversion/mod_dav_svn/reports/update.c,
  subversion/mod_dav_svn/repos.c,
  subversion/mod_dav_svn/version.c,
  subversion/svnadmin/svnadmin.c,
  subversion/svnauth/svnauth.c,
  subversion/svn/cl-conflicts.c,
  subversion/svn/commit-cmd.c,
  subversion/svn/conflict-callbacks.c,
  subversion/svn/diff-cmd.c,
  subversion/svn/help-cmd.c,
  subversion/svnlook/svnlook.c,
  subversion/svnmucc/svnmucc.c,
  subversion/svn/notify.c,
  subversion/svn/propedit-cmd.c,
  subversion/svn/propget-cmd.c,
  subversion/svn/props.c,
  subversion/svnrdump/dump_editor.c,
  subversion/svnrdump/svnrdump.c,
  subversion/svnrdump/util.c,
  subversion/svnserve/serve.c,
  subversion/svn/status.c,
  subversion/svn/status-cmd.c,
  subversion/svn/svn.c,
  subversion/svnsync/svnsync.c,
  subversion/svnsync/sync.c,
  subversion/svn/util.c,
  subversion/tests/libsvn_fs/fs-test.c,
  subversion/tests/libsvn_repos/repos-test.c,
  subversion/tests/libsvn_subr/hashdump-test.c,
  subversion/tests/libsvn_subr/mergeinfo-test.c,
  subversion/tests/libsvn_subr/subst_translate-test.c,
  subversion/tests/libsvn_wc/conflict-data-test.c,
  subversion/tests/libsvn_wc/op-depth-test.c,
  subversion/tests/libsvn_wc/wc-test.c,
  subversion/tests/svn_test_fs.c,
  tools/dev/fsfs-reorg.c,
  tools/server-side/fsfs-stats.c): #include svn_private_config.h first

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