* subversion/bindings/javahl/src/org/apache/subversion/javahl/util/TunnelChannel.java
  (TunnelChannel.close): Make sure we don't try to close an apr handle twice
    in an attempt to unbreak the javahl tests on Windows.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1532714 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_repos/config_pool.c
  (find_repos_config): Make the preprocessor ignore DEAD code instead of the
    having the compiler do that. Leave the code as it looks like this function
    was written to actually do something. No functional changes.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1532730 13f79535-47bb-0310-9956-ffa450edef68
Fix an access violation caused by incorrect pointer use.

* subversion/libsvn_repos/dump.c
  (verify_directory_entry): the cache returns a pointer to data -
                            not the data directly

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1532866 13f79535-47bb-0310-9956-ffa450edef68
Effectively undo r1532730 and remove the bogus "return SVN_NO_ERROR"
line that slipped in accidentally -- probably while going through
the code and commenting everything properly.

* subversion/libsvn_repos/config_pool.c
  (find_repos_config): remove early return statement and re-enable
                       remaining code

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1532874 13f79535-47bb-0310-9956-ffa450edef68
Follow-up to r1532866: make the de-serializer actually return
a pointer to the copy of the cache contents.

* subversion/libsvn_repos/dump.c
  (deserialize_node_kind): fix access violation

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1532879 13f79535-47bb-0310-9956-ffa450edef68
Follow-up to r1527217: improve code readability. No functional change.

* subversion/libsvn_fs_fs/transaction.c
  (write_final_changed_path_info): formatting fix; use utility function

Suggested by: ivan

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1532893 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_repos/authz.c
  (includes): Add private/svn_repos_private.h to verify the prototype of
    svn_repos__retrieve_config, and avoid a gcc warning.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1532914 13f79535-47bb-0310-9956-ffa450edef68
Followup to r1532866: derefence pointer to svn_node_kind_t when including node
type value in an error message.

* subversion/libsvn_repos/dump.c
  (verify_directory_entry): kind is a pointer to svn_node_kind_t.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1532943 13f79535-47bb-0310-9956-ffa450edef68
Followup to r1532866: remove a pointless cast dance now that we're not shoving
the kind value in a void pointer.

* subversion/libsvn_repos/dump.c
  (deserialize_node_kind): Both values are already voids.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1532944 13f79535-47bb-0310-9956-ffa450edef68
Better detection of the warning attribute for SVN_EXPERIMENTAL.

First of all we should try to use the __has_attribute macro if available.
Which should allow clang to start using the warning attribute if/when
they add it.  

If not then we'll need to fall back on checking the compiler.  If the compiler
is the gcc driver for clang then it doesn't support __has_attribute and it
also won't set __clang__.  So we need to check for __llvm__ to properly
exclude this.  There's no way to gracefully start using the attribute
if the gcc driver gains support for this, but that's basically gcc's fault
for not having feature detection functionality.

* subversion/include/svn_types.h
  (SVN_EXPERIMENTAL): Use __has_attribute if available and __llvm__ to
    exclude the gcc driver for clang.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1532954 13f79535-47bb-0310-9956-ffa450edef68
Coding style police.  No functional change.

* subversion/libsvn_subr/time.c
  (human_timestamp_format_suffix): rename to ...
  (HUMAN_TIMESTAMP_FORMAT_SUFFIX): ... this since it's a #define
  (svn_time_to_human_cstring): update user

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1533386 13f79535-47bb-0310-9956-ffa450edef68
Minor speed-up to the str->time conversion function that is
used e.g. in our network layers.

* subversion/libsvn_subr/time.c
  (svn_time_from_cstring): use SVN's own, faster atol variant

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1533387 13f79535-47bb-0310-9956-ffa450edef68
Remove some unnecessary work from from our "ls" code.

* subversion/libsvn_client/list.c
  (get_dir_contents): don't attempt to match locks when there are none

* subversion/libsvn_ra_svn/client.c
  (ra_svn_get_dir): according to the protocol spec, we send the name
                    of the dirents (i.e. 1 segment) -- never a multi-
                    segment relpath.  There is nothing to canonicalize.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1533392 13f79535-47bb-0310-9956-ffa450edef68
Minor tuning of our all-time favorite hot path: get_dag.

* subversion/libsvn_fs_fs/tree.c
  (get_dag): unconditionally canonicalize the path - see comment


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1533396 13f79535-47bb-0310-9956-ffa450edef68
Fix a major latency snafu in svnserve.  Sequences of small requests
and responses would be delayed in the TCP/IP stack by Nagle's alogrithm.
That becomes obvious when e.g. running "ls -R".

* subversion/libsvn_ra_svn/marshal.c
  (svn_ra_svn_create_conn3): send data as soon as write copy it from
                             our send buffers to the socket

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1533530 13f79535-47bb-0310-9956-ffa450edef68
Make the channel implementation thread-safe(r) and add additional checks
for file descriptor validity.

[in subversion/bindings/javahl/src/org/apache/subversion/javahl]

* util/TunnelChannel.java
  (TunnelChannel.nativeChannel): Use an atomic long to store the native handle.
  (TunnelChannel.TunnelChannel, TunnelChannel.isOpen, TunnelChannel.close):
   Update to use atomic operations.
* util/RequestChannel.java (RequestChannel.read): Properly detect a closed
   channel, and deactivate it if the underlying implementation threw
   an exception.
* util/ResponseChannel.java (ResponseChannel.write): As above.

[in subversion/bindings/javahl/native]

* org_apache_subversion_javahl_util_TunnelChannel.cpp
  (throw_IOException): Allow the APR status to be zero.
  (Java_org_apache_subversion_javahl_util_RequestChannel_nativeRead,
   Java_org_apache_subversion_javahl_util_ResponseChannel_nativeWrite):
   Throw an exception if the read failed.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1533790 13f79535-47bb-0310-9956-ffa450edef68
Fix some wrong assumptions in JavaHL that led to wrong implementation,
and simplify JNI environment handling.

Amongst other things, the assumption that looking at a Java exception
will remove it from the environment was incorrect.

* build.conf (libsvnjavahl): There are no C files in JavaHL.

* subversion/bindings/javahl/native/JNIThreadData.cpp,
  subversion/bindings/javahl/native/JNIThreadData.h: Removed, unused.
* subversion/bindings/javahl/native/libsvnjavahl.la.c: Removed.
   Implementation moved to JNIUtil.cpp.

* subversion/bindings/javahl/native/SVNClient.cpp,
  subversion/bindings/javahl/native/JNIStackElement.cpp,
  subversion/bindings/javahl/native/JNIStackElement.h:
   Removed all references to JNIThreadData.

* subversion/bindings/javahl/native/JNIUtil.h:
   Removed all references to JNIThreadData.
  (JNIUtil::getFormatBuffer, JNIUtil::formatBufferSize,
   JNIUtil::g_initFormatBuffer, JNIUtil::setEnv,
   JNIUtil::setExceptionThrown): Removed.
  (JNIUtil::isExceptionThrown(), JNIUtil::isJavaExceptionThrown()):
   Changed to simple inline implementations.

* subversion/bindings/javahl/native/JNIUtil.cpp:
   Removed implementaitons that were removed from the class declaration.
   (JNI_OnLoad): Remember the VM pointer.
   (JNIUtil::getEnv): Get an environemnt from the JVM.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1533804 13f79535-47bb-0310-9956-ffa450edef68
Add paranoia check on the ra_svn receiver side.

* subversion/libsvn_ra_svn/client.c
  (ra_svn_get_dir): return an error when dirent names contain path separators

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1533812 13f79535-47bb-0310-9956-ffa450edef68
Improve code uniformity.  No functional change.

* subversion/libsvn_subr/file.c
  (reclaim_shared_handle,
   close_handle): use our wrapper macro instead of calling APR directly

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1533814 13f79535-47bb-0310-9956-ffa450edef68
Try to unstick the JavaHL tests.

* subversion/bindings/javahl/native/OperationContext.cpp
  (TunnelContext::~TunnelContext): Close our end of the pipes.


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