You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by gb...@apache.org on 2013/11/17 11:02:41 UTC

svn commit: r1542685 [1/5] - in /subversion/branches/invoke-diff-cmd-feature: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ build/win32/ contrib/server-side/svncutter/ notes/ subversion/bindings/javahl/native/ subversion/bindin...

Author: gbg
Date: Sun Nov 17 10:02:39 2013
New Revision: 1542685

URL: http://svn.apache.org/r1542685
Log:
On the invoke-diff-cmd-feature branch: trunk revision 1542632 merged into branch revision 1541728.

Added:
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/ExternalItem.cpp
      - copied unchanged from r1542682, subversion/trunk/subversion/bindings/javahl/native/ExternalItem.cpp
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/ExternalItem.hpp
      - copied unchanged from r1542682, subversion/trunk/subversion/bindings/javahl/native/ExternalItem.hpp
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/SubversionException.cpp
      - copied unchanged from r1542682, subversion/trunk/subversion/bindings/javahl/native/SubversionException.cpp
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/SubversionException.hpp
      - copied unchanged from r1542682, subversion/trunk/subversion/bindings/javahl/native/SubversionException.hpp
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/jniwrapper/
      - copied from r1542682, subversion/trunk/subversion/bindings/javahl/native/jniwrapper/
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_SubstLib.cpp
      - copied unchanged from r1542682, subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_SubstLib.cpp
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/ExternalItem.java
      - copied unchanged from r1542682, subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/ExternalItem.java
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/src/org/apache/subversion/javahl/util/SubstLib.java
      - copied unchanged from r1542682, subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/util/SubstLib.java
    subversion/branches/invoke-diff-cmd-feature/subversion/include/private/svn_object_pool.h
      - copied unchanged from r1542682, subversion/trunk/subversion/include/private/svn_object_pool.h
    subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_repos/authz_pool.c
      - copied unchanged from r1542682, subversion/trunk/subversion/libsvn_repos/authz_pool.c
    subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_repos/repos_pool.c
      - copied unchanged from r1542682, subversion/trunk/subversion/libsvn_repos/repos_pool.c
    subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/object_pool.c
      - copied unchanged from r1542682, subversion/trunk/subversion/libsvn_subr/object_pool.c
Modified:
    subversion/branches/invoke-diff-cmd-feature/   (props changed)
    subversion/branches/invoke-diff-cmd-feature/BRANCH-README
    subversion/branches/invoke-diff-cmd-feature/CHANGES
    subversion/branches/invoke-diff-cmd-feature/Makefile.in
    subversion/branches/invoke-diff-cmd-feature/build.conf
    subversion/branches/invoke-diff-cmd-feature/build/ac-macros/kwallet.m4
    subversion/branches/invoke-diff-cmd-feature/build/generator/gen_win_dependencies.py
    subversion/branches/invoke-diff-cmd-feature/build/generator/templates/vcnet_vcproj.ezt
    subversion/branches/invoke-diff-cmd-feature/build/transform_sql.py
    subversion/branches/invoke-diff-cmd-feature/build/win32/svn.rc
    subversion/branches/invoke-diff-cmd-feature/configure.ac
    subversion/branches/invoke-diff-cmd-feature/contrib/server-side/svncutter/svncutter
    subversion/branches/invoke-diff-cmd-feature/notes/knobs
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/CreateJ.cpp
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/GlobalConfig.h
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/JNIUtil.cpp
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/OperationContext.cpp
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/OperationContext.h
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/RemoteSession.cpp
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/RemoteSession.h
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/RemoteSessionContext.cpp
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/RemoteSessionContext.h
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/Revision.h
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/SVNClient.cpp
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteFactory.cpp
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigLib.cpp
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_PropLib.cpp
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_TunnelChannel.cpp
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNUtil.java
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/RemoteFactory.java
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Revision.java
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/src/org/apache/subversion/javahl/util/ConfigLib.java
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/src/org/apache/subversion/javahl/util/PropLib.java
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java
    subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/tests/org/apache/subversion/javahl/UtilTests.java
    subversion/branches/invoke-diff-cmd-feature/subversion/include/private/svn_diff_tree.h
    subversion/branches/invoke-diff-cmd-feature/subversion/include/private/svn_repos_private.h
    subversion/branches/invoke-diff-cmd-feature/subversion/include/private/svn_subr_private.h
    subversion/branches/invoke-diff-cmd-feature/subversion/include/svn_config.h
    subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_client/merge.c
    subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_fs_fs/hotcopy.c
    subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_fs_fs/transaction.c
    subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_fs_x/   (props changed)
    subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_fs_x/transaction.c
    subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_ra_serf/serf.c
    subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_ra_svn/marshal.c
    subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_repos/authz.c
    subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_repos/config_pool.c
    subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_repos/dump.c
    subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_repos/repos.h
    subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/config_file.c
    subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/iter.c
    subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/diff_local.c
    subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/upgrade.c
    subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc-queries.sql
    subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc_db.c
    subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc_db_private.h
    subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc_db_update_move.c
    subversion/branches/invoke-diff-cmd-feature/subversion/mod_authz_svn/mod_authz_svn.c
    subversion/branches/invoke-diff-cmd-feature/subversion/mod_dav_svn/dav_svn.h
    subversion/branches/invoke-diff-cmd-feature/subversion/mod_dav_svn/mod_dav_svn.c
    subversion/branches/invoke-diff-cmd-feature/subversion/mod_dav_svn/repos.c
    subversion/branches/invoke-diff-cmd-feature/subversion/mod_dav_svn/util.c
    subversion/branches/invoke-diff-cmd-feature/subversion/svnserve/serve.c
    subversion/branches/invoke-diff-cmd-feature/subversion/svnserve/server.h
    subversion/branches/invoke-diff-cmd-feature/subversion/svnserve/svnserve.c
    subversion/branches/invoke-diff-cmd-feature/subversion/tests/cmdline/checkout_tests.py
    subversion/branches/invoke-diff-cmd-feature/subversion/tests/cmdline/move_tests.py
    subversion/branches/invoke-diff-cmd-feature/subversion/tests/cmdline/redirect_tests.py
    subversion/branches/invoke-diff-cmd-feature/subversion/tests/cmdline/svnadmin_tests.py
    subversion/branches/invoke-diff-cmd-feature/subversion/tests/libsvn_repos/repos-test.c
    subversion/branches/invoke-diff-cmd-feature/subversion/tests/libsvn_subr/sqlite-test.c   (props changed)
    subversion/branches/invoke-diff-cmd-feature/subversion/tests/libsvn_wc/op-depth-test.c
    subversion/branches/invoke-diff-cmd-feature/subversion/tests/libsvn_wc/wc-queries-test.c
    subversion/branches/invoke-diff-cmd-feature/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd
    subversion/branches/invoke-diff-cmd-feature/tools/buildbot/slaves/win32-SharpSvn/svntest-build-bindings.cmd
    subversion/branches/invoke-diff-cmd-feature/tools/buildbot/slaves/win32-SharpSvn/svntest-build.cmd
    subversion/branches/invoke-diff-cmd-feature/tools/buildbot/slaves/win32-SharpSvn/svntest-test.cmd
    subversion/branches/invoke-diff-cmd-feature/tools/dist/backport.pl
    subversion/branches/invoke-diff-cmd-feature/tools/examples/svnlook.py   (contents, props changed)
    subversion/branches/invoke-diff-cmd-feature/tools/server-side/mod_dontdothat/mod_dontdothat.c
    subversion/branches/invoke-diff-cmd-feature/win-tests.py

Propchange: subversion/branches/invoke-diff-cmd-feature/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1538928-1542682

Modified: subversion/branches/invoke-diff-cmd-feature/BRANCH-README
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/BRANCH-README?rev=1542685&r1=1542684&r2=1542685&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/BRANCH-README (original)
+++ subversion/branches/invoke-diff-cmd-feature/BRANCH-README Sun Nov 17 10:02:39 2013
@@ -1,3 +1,6 @@
+TODO:  add invoke-diff-cmd help to svnlook.c, log
+change location of opt_invoke_diff_cmd in declarion svn_cl__longopt_t
+
 This branch implements the 'invoke-diff-cmd' feature and is located at 
 https://svn.apache.org/repos/asf/subversion/branches/invoke-diff-cmd-feature/
 

Modified: subversion/branches/invoke-diff-cmd-feature/CHANGES
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/CHANGES?rev=1542685&r1=1542684&r2=1542685&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/CHANGES (original)
+++ subversion/branches/invoke-diff-cmd-feature/CHANGES Sun Nov 17 10:02:39 2013
@@ -26,6 +26,36 @@ http://svn.apache.org/repos/asf/subversi
   - Bindings:
 
 
+Version 1.8.5
+(25 November 2013, from /branches/1.8.x)
+http://svn.apache.org/repos/asf/subversion/tags/1.8.5
+
+ User-visible changes:
+  - Client-side bugfixes:
+    * fix externals that point at redirected locations (issues #4428, #4429)
+    * diff: fix assertion with move inside a copy (issue #4444)
+
+  - Server-side bugfixes:
+    * mod_dav_svn: Prevent crashes with some 3rd party modules (r1537360 et al)
+    * mod_dav_svn: canonicalize paths properly (r1542071)
+    * mod_authz_svn: fix crash of mod_authz_svn with invalid config (r1541432)
+    * hotcopy: fix hotcopy losing revprop files in packed repos (issue #4448)
+ 
+  - Other tool improvements and bugfixes:
+    * mod_dontdothat: Fix the uri parser (r1542069 et al)
+
+ Developer-visible changes:
+  - General:
+    * fix compilation with '--enable-optimize' with clang (r1534860)
+    * fix compilation with debug build of BDB on Windows (r1501656, r1501702)
+    * fix '--with-openssl' option when building on Windows (r1535139) 
+    * add test to fail when built against broken ZLib (r1537193 et al)
+
+  - Bindings:
+    * swig-rb: fix tests to run without installing on OS X (r1535161)
+    * ctypes-python: build with compiler selected via configure (r1536537)
+
+
 Version 1.8.4
 (29 October 2013, from /branches/1.8.x)
 http://svn.apache.org/repos/asf/subversion/tags/1.8.4
@@ -551,6 +581,36 @@ http://svn.apache.org/repos/asf/subversi
     * fix some reference counting bugs in swig-py bindings (r1464899, r1466524)
 
 
+Version 1.7.14
+(25 Nov 2013, from /branches/1.7.x)
+http://svn.apache.org/repos/asf/subversion/tags/1.7.14
+
+ User-visible changes:
+  - Client- and server-side bugfixes:
+    * fix assertion on urls of the form 'file://./' (r1516806)
+
+  - Client-side bugfixes:
+    * upgrade: fix an assertion when used with pre-1.3 wcs (r1530849)
+    * ra_local: fix error with repository in Windows drive root (r1518184)
+    * fix crash on windows when piped command is interrupted (r1522892)
+    * fix externals that point at redirected locations (issues #4428, #4429)
+    * diff: fix incorrect calculation of changes in some cases (issue #4283)
+    * diff: fix errors with added/deleted targets (issues #4153, #4421)
+
+  - Server-side bugfixes:
+    * mod_dav_svn: Prevent crashes with some 3rd party modules (r1537360 et al)
+    * fix OOM on concurrent requests at threaded server start (r1527103 et al)
+    * fsfs: limit commit time of files with deep change histories (r1536790)
+    * mod_dav_svn: canonicalize paths properly (r1542071)
+
+  - Other tool improvements and bugfixes:
+    * mod_dontdothat: Fix the uri parser (r1542069 et al)
+
+ Developer-visible changes:
+  - Bindings:
+    * javahl: canonicalize path for streamFileContent method (r1524869)
+
+
 Version 1.7.13
 (29 Aug 2013, from /branches/1.7.x)
 http://svn.apache.org/repos/asf/subversion/tags/1.7.13

Modified: subversion/branches/invoke-diff-cmd-feature/Makefile.in
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/Makefile.in?rev=1542685&r1=1542684&r2=1542685&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/Makefile.in (original)
+++ subversion/branches/invoke-diff-cmd-feature/Makefile.in Sun Nov 17 10:02:39 2013
@@ -480,8 +480,11 @@ install-javahl: javahl install-javahl-ja
 javahl-compat: javahl-compat-java @JAVAHL_COMPAT_TESTS_TARGET@
 
 clean-javahl:
+	if [ -d $(javahl_test_rootdir) ]; then \
+	  find $(javahl_test_rootdir) -mindepth 1 -maxdepth 1 \
+               -print0 | xargs -0 rm -rf --;   \
+	fi
 	rm -rf $(javahl_java_PATH) $(javahl_javah_PATH) @JAVAHL_OBJDIR@
-	rm -fr $(javahl_test_rootdir)
 	rm -f $(libsvnjavahl_PATH)/*.la $(JAVAHL_JAR)
 	rm -f $(libsvnjavahl_PATH)/*.lo
 	rm -f $(libsvnjavahl_PATH)/*.o
@@ -678,8 +681,8 @@ doc-javahl:
 	  org.apache.subversion.javahl.util
 
 doc-clean:
-	rm -rf $(top_srcdir)/doc/doxygen
-	rm -rf $(top_srcdir)/doc/javadoc
+	rm -rf $(abs_builddir)/doc/doxygen
+	rm -rf $(abs_builddir)/doc/javadoc
 
 # Converting from the .rnc XML shcemas to various other schema formats.
 SCHEMAS_DTD = $(SCHEMA_DIR)/blame.dtd $(SCHEMA_DIR)/info.dtd \

Modified: subversion/branches/invoke-diff-cmd-feature/build.conf
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/build.conf?rev=1542685&r1=1542684&r2=1542685&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/build.conf (original)
+++ subversion/branches/invoke-diff-cmd-feature/build.conf Sun Nov 17 10:02:39 2013
@@ -43,6 +43,8 @@ private-includes =
         subversion/bindings/cxxhl/src/*.hpp
         subversion/bindings/cxxhl/src/aprwrap/*.hpp
         subversion/bindings/cxxhl/src/private/*.hpp
+        subversion/bindings/javahl/native/*.hpp
+        subversion/bindings/javahl/native/jniwrapper/jni_*.hpp
         subversion/libsvn_subr/utf8proc/utf8proc.h
         subversion/libsvn_subr/utf8proc/utf8proc.c
         subversion/libsvn_subr/utf8proc/utf8proc_data.c
@@ -80,6 +82,7 @@ private-built-includes =
         subversion/bindings/javahl/include/org_apache_subversion_javahl_util_ConfigLib.h
         subversion/bindings/javahl/include/org_apache_subversion_javahl_util_DiffLib.h
         subversion/bindings/javahl/include/org_apache_subversion_javahl_util_PropLib.h
+        subversion/bindings/javahl/include/org_apache_subversion_javahl_util_SubstLib.h
         subversion/bindings/javahl/include/org_apache_subversion_javahl_util_TunnelChannel.h
         subversion/bindings/javahl/include/org_apache_subversion_javahl_util_RequestChannel.h
         subversion/bindings/javahl/include/org_apache_subversion_javahl_util_ResponseChannel.h
@@ -375,7 +378,7 @@ msvc-export = 
         private\svn_temp_serializer.h private\svn_io_private.h
         private\svn_string_private.h private\svn_magic.h
         private\svn_subr_private.h private\svn_mutex.h private\svn_named_atomic.h
-        private\svn_packed_data.h
+        private\svn_packed_data.h private\svn_object_pool.h
 
 # Working copy management lib
 [libsvn_wc]
@@ -687,7 +690,7 @@ type = lib
 path = subversion/bindings/javahl/native
 libs = libsvn_repos libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_diff 
        libsvn_subr libsvn_fs aprutil apriconv apr java-sdk
-sources = *.cpp
+sources = *.cpp jniwrapper/*.cpp
 add-deps = $(javahl_java_DEPS) $(javahl_callback_javah_DEPS)
            $(javahl_remote_javah_DEPS) $(javahl_types_javah_DEPS)
            $(javahl_util_javah_DEPS) $(javahl_javah_DEPS)
@@ -1548,6 +1551,7 @@ install = tools
 libs = libsvn_repos libsvn_fs libsvn_subr apr
 
 [svn-populate-node-origins-index]
+description = Repository node origin cache populate tool
 type = exe
 path = tools/server-side
 sources = svn-populate-node-origins-index.c

Modified: subversion/branches/invoke-diff-cmd-feature/build/ac-macros/kwallet.m4
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/build/ac-macros/kwallet.m4?rev=1542685&r1=1542684&r2=1542685&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/build/ac-macros/kwallet.m4 (original)
+++ subversion/branches/invoke-diff-cmd-feature/build/ac-macros/kwallet.m4 Sun Nov 17 10:02:39 2013
@@ -33,78 +33,85 @@ AC_DEFUN(SVN_LIB_KWALLET,
   AC_MSG_CHECKING([whether to look for KWallet])
   if test "$svn_lib_kwallet" != "no"; then
     AC_MSG_RESULT([yes])
-    if test "$svn_enable_shared" = "yes"; then
-      if test "$APR_HAS_DSO" = "yes"; then
-        if test -n "$PKG_CONFIG"; then
-          if test "$HAVE_DBUS" = "yes"; then
-            AC_MSG_CHECKING([for QtCore, QtDBus, QtGui])
-            if $PKG_CONFIG --exists QtCore QtDBus QtGui; then
-              AC_MSG_RESULT([yes])
-              if test "$svn_lib_kwallet" != "yes"; then
-                AC_MSG_CHECKING([for kde4-config])
-                KDE4_CONFIG="$svn_lib_kwallet/bin/kde4-config"
-                if test -f "$KDE4_CONFIG" && test -x "$KDE4_CONFIG"; then
-                  AC_MSG_RESULT([yes])
+    case "$host" in
+    *-*-darwin*)
+      AC_MSG_ERROR([--with-kwallet is not supported on Mac OS X.])
+      ;;
+    *)
+      if test "$svn_enable_shared" = "yes"; then
+        if test "$APR_HAS_DSO" = "yes"; then
+          if test -n "$PKG_CONFIG"; then
+            if test "$HAVE_DBUS" = "yes"; then
+              AC_MSG_CHECKING([for QtCore, QtDBus, QtGui])
+              if $PKG_CONFIG --exists QtCore QtDBus QtGui; then
+                AC_MSG_RESULT([yes])
+                if test "$svn_lib_kwallet" != "yes"; then
+                  AC_MSG_CHECKING([for kde4-config])
+                  KDE4_CONFIG="$svn_lib_kwallet/bin/kde4-config"
+                  if test -f "$KDE4_CONFIG" && test -x "$KDE4_CONFIG"; then
+                    AC_MSG_RESULT([yes])
+                  else
+                    KDE4_CONFIG=""
+                    AC_MSG_RESULT([no])
+                  fi
                 else
-                  KDE4_CONFIG=""
-                  AC_MSG_RESULT([no])
+                  AC_PATH_PROG(KDE4_CONFIG, kde4-config)
                 fi
-              else
-                AC_PATH_PROG(KDE4_CONFIG, kde4-config)
-              fi
-              if test -n "$KDE4_CONFIG"; then
-                AC_MSG_CHECKING([for KWallet])
-                old_CXXFLAGS="$CXXFLAGS"
-                old_LDFLAGS="$LDFLAGS"
-                old_LIBS="$LIBS"
-                for d in [`$PKG_CONFIG --cflags QtCore QtDBus QtGui`]; do
-                  if test -n ["`echo "$d" | $EGREP -- '^-D[^[:space:]]*'`"]; then
-                    CPPFLAGS="$CPPFLAGS $d"
-                  fi
-                done
-                qt_include_dirs="`$PKG_CONFIG --cflags-only-I QtCore QtDBus QtGui`"
-                kde_dir="`$KDE4_CONFIG --prefix`"
-                SVN_KWALLET_INCLUDES="$DBUS_CPPFLAGS $qt_include_dirs -I$kde_dir/include"
-                qt_libs_other_options="`$PKG_CONFIG --libs-only-other QtCore QtDBus QtGui`"
-                SVN_KWALLET_LIBS="$DBUS_LIBS -lQtCore -lQtDBus -lQtGui -lkdecore -lkdeui $qt_libs_other_options"
-                CXXFLAGS="$CXXFLAGS $SVN_KWALLET_INCLUDES"
-                LIBS="$LIBS $SVN_KWALLET_LIBS"
-                qt_lib_dirs="`$PKG_CONFIG --libs-only-L QtCore QtDBus QtGui`"
-                kde_lib_suffix="`$KDE4_CONFIG --libsuffix`"
-                LDFLAGS="$old_LDFLAGS `SVN_REMOVE_STANDARD_LIB_DIRS($qt_lib_dirs -L$kde_dir/lib$kde_lib_suffix)`"
-                AC_LANG(C++)
-                AC_LINK_IFELSE([AC_LANG_SOURCE([[
+                if test -n "$KDE4_CONFIG"; then
+                  AC_MSG_CHECKING([for KWallet])
+                  old_CXXFLAGS="$CXXFLAGS"
+                  old_LDFLAGS="$LDFLAGS"
+                  old_LIBS="$LIBS"
+                  for d in [`$PKG_CONFIG --cflags QtCore QtDBus QtGui`]; do
+                    if test -n ["`echo "$d" | $EGREP -- '^-D[^[:space:]]*'`"]; then
+                      CPPFLAGS="$CPPFLAGS $d"
+                    fi
+                  done
+                  qt_include_dirs="`$PKG_CONFIG --cflags-only-I QtCore QtDBus QtGui`"
+                  kde_dir="`$KDE4_CONFIG --prefix`"
+                  SVN_KWALLET_INCLUDES="$DBUS_CPPFLAGS $qt_include_dirs -I$kde_dir/include"
+                  qt_libs_other_options="`$PKG_CONFIG --libs-only-other QtCore QtDBus QtGui`"
+                  SVN_KWALLET_LIBS="$DBUS_LIBS -lQtCore -lQtDBus -lQtGui -lkdecore -lkdeui $qt_libs_other_options"
+                  CXXFLAGS="$CXXFLAGS $SVN_KWALLET_INCLUDES"
+                  LIBS="$LIBS $SVN_KWALLET_LIBS"
+                  qt_lib_dirs="`$PKG_CONFIG --libs-only-L QtCore QtDBus QtGui`"
+                  kde_lib_suffix="`$KDE4_CONFIG --libsuffix`"
+                  LDFLAGS="$old_LDFLAGS `SVN_REMOVE_STANDARD_LIB_DIRS($qt_lib_dirs -L$kde_dir/lib$kde_lib_suffix)`"
+                  AC_LANG(C++)
+                  AC_LINK_IFELSE([AC_LANG_SOURCE([[
 #include <kwallet.h>
 int main()
 {KWallet::Wallet::walletList();}]])], svn_lib_kwallet="yes", svn_lib_kwallet="no")
-                AC_LANG(C)
-                if test "$svn_lib_kwallet" = "yes"; then
-                  AC_MSG_RESULT([yes])
-                  CXXFLAGS="$old_CXXFLAGS"
-                  LIBS="$old_LIBS"
+                  AC_LANG(C)
+                  if test "$svn_lib_kwallet" = "yes"; then
+                    AC_MSG_RESULT([yes])
+                    CXXFLAGS="$old_CXXFLAGS"
+                    LIBS="$old_LIBS"
+                  else
+                    AC_MSG_RESULT([no])
+                    AC_MSG_ERROR([cannot find KWallet])
+                  fi
                 else
-                  AC_MSG_RESULT([no])
-                  AC_MSG_ERROR([cannot find KWallet])
+                  AC_MSG_ERROR([cannot find kde4-config])
                 fi
               else
-                AC_MSG_ERROR([cannot find kde4-config])
+                AC_MSG_RESULT([no])
+                AC_MSG_ERROR([cannot find QtCore, QtDBus, QtGui])
               fi
             else
-              AC_MSG_RESULT([no])
-              AC_MSG_ERROR([cannot find QtCore, QtDBus, QtGui])
+              AC_MSG_ERROR([cannot find D-Bus])
             fi
           else
-            AC_MSG_ERROR([cannot find D-Bus])
+            AC_MSG_ERROR([cannot find pkg-config])
           fi
         else
-          AC_MSG_ERROR([cannot find pkg-config])
+          AC_MSG_ERROR([APR does not have support for DSOs])
         fi
       else
-        AC_MSG_ERROR([APR does not have support for DSOs])
+        AC_MSG_ERROR([--with-kwallet conflicts with --disable-shared])
       fi
-    else
-      AC_MSG_ERROR([--with-kwallet conflicts with --disable-shared])
-    fi
+    ;;
+    esac
   else
     AC_MSG_RESULT([no])
   fi

Modified: subversion/branches/invoke-diff-cmd-feature/build/generator/gen_win_dependencies.py
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/build/generator/gen_win_dependencies.py?rev=1542685&r1=1542684&r2=1542685&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/build/generator/gen_win_dependencies.py (original)
+++ subversion/branches/invoke-diff-cmd-feature/build/generator/gen_win_dependencies.py Sun Nov 17 10:02:39 2013
@@ -51,7 +51,7 @@ class SVNCommonLibrary:
   def __init__(self, name, include_dirs, lib_dir, lib_name, version=None,
                debug_lib_dir=None, debug_lib_name=None, dll_dir=None,
                dll_name=None, debug_dll_dir=None, debug_dll_name=None,
-               is_src=False, defines=[], forced_includes=[]):
+               is_src=False, defines=[], forced_includes=[], extra_bin=[]):
     self.name = name
     if include_dirs:
       self.include_dirs = include_dirs if isinstance(include_dirs, list) \
@@ -89,6 +89,8 @@ class SVNCommonLibrary:
       self.debug_dll_name = debug_dll_name
     else:
       self.debug_dll_name = dll_name
+      
+    self.extra_bin = extra_bin
 
 class GenDependenciesBase(gen_base.GeneratorBase):
   """This intermediate base class exists to be instantiated by win-tests.py,
@@ -387,6 +389,19 @@ class GenDependenciesBase(gen_base.Gener
       else:
         dll_dir = os.path.join(self.apr_path, 'bin')
         debug_dll_dir = None
+        
+    bin_files = os.listdir(dll_dir)
+    if debug_dll_dir:
+      debug_bin_files = os.listdir(debug_dll_dir)
+    else:
+      debug_bin_files = bin_files 
+    
+    extra_bin = []
+    
+    for bin in bin_files:
+      if bin in debug_bin_files:
+        if re.match('^(lib)?apr[-_].*' + suffix + '(d)?.dll$', bin):
+          extra_bin.append(bin)
       
     self._libraries['apr'] = SVNCommonLibrary('apr', inc_path, lib_dir, lib_name,
                                               apr_version,
@@ -394,7 +409,8 @@ class GenDependenciesBase(gen_base.Gener
                                               dll_dir=dll_dir,
                                               dll_name=dll_name,
                                               debug_dll_dir=debug_dll_dir,
-                                              defines=defines)
+                                              defines=defines,
+                                              extra_bin=extra_bin)
 
   def _find_apr_util_and_expat(self):
     "Find the APR-util library and version"
@@ -479,6 +495,19 @@ class GenDependenciesBase(gen_base.Gener
         dll_dir = os.path.join(self.apr_util_path, 'bin')
         debug_dll_dir = None
 
+    bin_files = os.listdir(dll_dir)
+    if debug_dll_dir:
+      debug_bin_files = os.listdir(debug_dll_dir)
+    else:
+      debug_bin_files = bin_files 
+
+    extra_bin = []
+
+    for bin in bin_files:
+      if bin in debug_bin_files:
+        if re.match('^(lib)?aprutil[-_].*' + suffix + '(d)?.dll$', bin):
+          extra_bin.append(bin)
+
     self._libraries['aprutil'] = SVNCommonLibrary('apr-util', inc_path, lib_dir,
                                                    lib_name,
                                                    aprutil_version,
@@ -486,7 +515,8 @@ class GenDependenciesBase(gen_base.Gener
                                                    dll_dir=dll_dir,
                                                    dll_name=dll_name,
                                                    debug_dll_dir=debug_dll_dir,
-                                                   defines=defines)
+                                                   defines=defines,
+                                                   extra_bin=extra_bin)
 
     # And now find expat
     # If we have apr-util as a source location, it is in a subdir.
@@ -499,14 +529,14 @@ class GenDependenciesBase(gen_base.Gener
       inc_path = os.path.join(self.apr_util_path, 'include')
       lib_dir = os.path.join(self.apr_util_path, 'lib')
       debug_lib_dir = None
-      
+
     version_file_path = os.path.join(inc_path, 'expat.h')
 
     if not os.path.exists(version_file_path):
       sys.stderr.write("ERROR: '%s' not found.\n" % version_file_path);
       sys.stderr.write("Use '--with-apr-util' option to configure APR-Util's XML location.\n");
       sys.exit(1)
-      
+
     txt = open(version_file_path).read()
 
     vermatch = re.search(r'^\s*#define\s+XML_MAJOR_VERSION\s+(\d+)', txt, re.M)
@@ -518,11 +548,17 @@ class GenDependenciesBase(gen_base.Gener
     vermatch = re.search(r'^\s*#define\s+XML_MICRO_VERSION\s+(\d+)', txt, re.M)
     patch = int(vermatch.group(1))
 
+    # apr-Util 0.9-1.4 compiled expat to 'xml.lib', but apr-util 1.5 switched
+    # to the more common 'libexpat.lib'
+    libname = 'libexpat.lib'
+    if not os.path.exists(os.path.join(lib_dir, 'libexpat.lib')):
+      libname = 'xml.lib'
+
     version = (major, minor, patch)
     xml_version = '%d.%d.%d' % version
 
     self._libraries['xml'] = SVNCommonLibrary('expat', inc_path, lib_dir,
-                                               'xml.lib', xml_version,
+                                               libname, xml_version,
                                                debug_lib_dir = debug_lib_dir,
                                                defines=['XML_STATIC'])
 

Modified: subversion/branches/invoke-diff-cmd-feature/build/generator/templates/vcnet_vcproj.ezt
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/build/generator/templates/vcnet_vcproj.ezt?rev=1542685&r1=1542684&r2=1542685&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/build/generator/templates/vcnet_vcproj.ezt (original)
+++ subversion/branches/invoke-diff-cmd-feature/build/generator/templates/vcnet_vcproj.ezt Sun Nov 17 10:02:39 2013
@@ -75,7 +75,7 @@
 [is target_type "4"][else]				OutputFile="$(OutDir)\[target.output_name]"
 [end][is configs.name "Debug"]				LinkIncremental="2"
 [else]				LinkIncremental="1"
-[end]				AdditionalLibraryDirectories="..\..\..\db4-win32\lib;[for configs.libdirs][configs.libdirs];[end]"
+[end]				AdditionalLibraryDirectories="[for configs.libdirs][configs.libdirs];[end]"
 				TargetMachine="[is platforms "Win32"]1[end][is platforms "x64"]17[end]"
 				IgnoreDefaultLibraryNames="libc.lib[is configs.name "debug"];msvcrt.lib[end]"
 [if-any def_file]				ModuleDefinitionFile="[def_file]"

Modified: subversion/branches/invoke-diff-cmd-feature/build/transform_sql.py
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/build/transform_sql.py?rev=1542685&r1=1542684&r2=1542685&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/build/transform_sql.py (original)
+++ subversion/branches/invoke-diff-cmd-feature/build/transform_sql.py Sun Nov 17 10:02:39 2013
@@ -148,6 +148,12 @@ class Processor(object):
       # RELPATH_SKIP_JOIN(x, y, z) skips the x prefix from z and the joins the
       # result after y. In other words it replaces x with y, but follows the
       # relpath rules.
+      #
+      # This matches the C version of:
+      #     svn_relpath_join(y, svn_relpath_skip_ancestor(x, z), pool)
+      # but returns an SQL NULL in case z is not below x.
+      #
+
       line = re.sub(
              r'RELPATH_SKIP_JOIN[(]([?]?[A-Za-z0-9_.]+), ' +
                                  r'([?]?[A-Za-z0-9_.]+), ' +

Modified: subversion/branches/invoke-diff-cmd-feature/build/win32/svn.rc
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/build/win32/svn.rc?rev=1542685&r1=1542684&r2=1542685&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/build/win32/svn.rc (original)
+++ subversion/branches/invoke-diff-cmd-feature/build/win32/svn.rc Sun Nov 17 10:02:39 2013
@@ -74,7 +74,7 @@ BEGIN
       VALUE "FileDescription", APR_STRINGIFY(SVN_FILE_DESCRIPTION) "\0"
       VALUE "FileVersion", SVN_VER_NUMBER "\0"
       VALUE "InternalName", "SVN\0"
-      VALUE "LegalCopyright", "Copyright (c) 2011 The Apache Software Foundation\0"
+      VALUE "LegalCopyright", "Copyright (c) The Apache Software Foundation\0"
       VALUE "OriginalFilename", APR_STRINGIFY(SVN_FILE_NAME) "\0"
       VALUE "ProductName", "Subversion\0"
       VALUE "ProductVersion", SVN_VERSION "\0"

Modified: subversion/branches/invoke-diff-cmd-feature/configure.ac
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/configure.ac?rev=1542685&r1=1542684&r2=1542685&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/configure.ac (original)
+++ subversion/branches/invoke-diff-cmd-feature/configure.ac Sun Nov 17 10:02:39 2013
@@ -567,58 +567,69 @@ found_gnome_keyring=no
 AC_MSG_CHECKING([whether to look for GNOME Keyring])
 if test "$with_gnome_keyring" != "no"; then
   AC_MSG_RESULT([yes])
-  if test "$svn_enable_shared" = "yes"; then
-    if test "$APR_HAS_DSO" = "yes"; then
-      if test -n "$PKG_CONFIG"; then
-        AC_MSG_CHECKING([for GLib and GNOME Keyring .pc files])
-        if $PKG_CONFIG --exists glib-2.0 gnome-keyring-1; then
-          AC_MSG_RESULT([yes])
-          old_CPPFLAGS="$CPPFLAGS"
-          SVN_GNOME_KEYRING_INCLUDES="`$PKG_CONFIG --cflags glib-2.0 gnome-keyring-1`"
-          CPPFLAGS="$CPPFLAGS $SVN_GNOME_KEYRING_INCLUDES"
-          AC_CHECK_HEADER(gnome-keyring.h, found_gnome_keyring=yes, found_gnome_keyring=no)
-          AC_MSG_CHECKING([for GNOME Keyring])
-          if test "$found_gnome_keyring" = "yes"; then
+  case "$host" in
+  *-*-darwin*)
+    if test "$with_gnome_keyring" = "yes"; then
+      AC_MSG_ERROR([--with-gnome-keyring is not supported on Mac OS X.])
+    else
+      with_gnome_keyring=no
+    fi
+    ;;
+  *)
+    if test "$svn_enable_shared" = "yes"; then
+      if test "$APR_HAS_DSO" = "yes"; then
+        if test -n "$PKG_CONFIG"; then
+          AC_MSG_CHECKING([for GLib and GNOME Keyring .pc files])
+          if $PKG_CONFIG --exists glib-2.0 gnome-keyring-1; then
             AC_MSG_RESULT([yes])
-            AC_DEFINE([SVN_HAVE_GNOME_KEYRING], [1], 
-                      [Is GNOME Keyring support enabled?])
-            CPPFLAGS="$old_CPPFLAGS"
-            SVN_GNOME_KEYRING_LIBS="`$PKG_CONFIG --libs glib-2.0 gnome-keyring-1`"
+            old_CPPFLAGS="$CPPFLAGS"
+            SVN_GNOME_KEYRING_INCLUDES="`$PKG_CONFIG --cflags glib-2.0 gnome-keyring-1`"
+            CPPFLAGS="$CPPFLAGS $SVN_GNOME_KEYRING_INCLUDES"
+            AC_CHECK_HEADER(gnome-keyring.h, found_gnome_keyring=yes, found_gnome_keyring=no)
+            AC_MSG_CHECKING([for GNOME Keyring])
+            if test "$found_gnome_keyring" = "yes"; then
+              AC_MSG_RESULT([yes])
+              AC_DEFINE([SVN_HAVE_GNOME_KEYRING], [1], 
+                        [Is GNOME Keyring support enabled?])
+              CPPFLAGS="$old_CPPFLAGS"
+              SVN_GNOME_KEYRING_LIBS="`$PKG_CONFIG --libs glib-2.0 gnome-keyring-1`"
+            else
+              AC_MSG_RESULT([no])
+              if test "$with_gnome_keyring" = "yes"; then
+                AC_MSG_ERROR([cannot find GNOME Keyring])
+              fi
+            fi
           else
             AC_MSG_RESULT([no])
             if test "$with_gnome_keyring" = "yes"; then
-              AC_MSG_ERROR([cannot find GNOME Keyring])
+              AC_MSG_ERROR([cannot find GLib and GNOME Keyring .pc files.])
+            else
+              with_gnome_keyring=no
             fi
           fi
         else
-          AC_MSG_RESULT([no])
           if test "$with_gnome_keyring" = "yes"; then
-            AC_MSG_ERROR([cannot find GLib and GNOME Keyring .pc files.])
+            AC_MSG_ERROR([cannot find pkg-config. GNOME Keyring requires this.])
           else
             with_gnome_keyring=no
           fi
         fi
       else
         if test "$with_gnome_keyring" = "yes"; then
-          AC_MSG_ERROR([cannot find pkg-config. GNOME Keyring requires this.])
+          AC_MSG_ERROR([APR does not have support for DSOs. GNOME Keyring requires this.])
         else
           with_gnome_keyring=no
         fi
       fi
     else
       if test "$with_gnome_keyring" = "yes"; then
-        AC_MSG_ERROR([APR does not have support for DSOs. GNOME Keyring requires this.])
+        AC_MSG_ERROR([--with-gnome-keyring conflicts with --disable-shared])
       else
         with_gnome_keyring=no
       fi
     fi
-  else
-    if test "$with_gnome_keyring" = "yes"; then
-      AC_MSG_ERROR([--with-gnome-keyring conflicts with --disable-shared])
-    else
-      with_gnome_keyring=no
-    fi
-  fi
+    ;;
+  esac
 else
   AC_MSG_RESULT([no])
 fi

Modified: subversion/branches/invoke-diff-cmd-feature/contrib/server-side/svncutter/svncutter
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/contrib/server-side/svncutter/svncutter?rev=1542685&r1=1542684&r2=1542685&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/contrib/server-side/svncutter/svncutter (original)
+++ subversion/branches/invoke-diff-cmd-feature/contrib/server-side/svncutter/svncutter Sun Nov 17 10:02:39 2013
@@ -126,10 +126,12 @@ in the LOGFILE, which should be in the f
 Replacements may be restricted to a specified range.
 """,
     "skeleton": """\
-skeleton: usage: svncutter [-r SELECTION] skeleton
+skeleton: usage: svncutter [-r SELECTION] skeleton PATTERN...
 
-Replace content with unique generated cookies.  Useful
-when you need to examine a particularly complex node structure.
+Replace content with unique generated cookies on all node paths
+matching the specified regular expressions; if no expressions are
+given, match all paths.  Useful when you need to examine a
+particularly complex node structure.
 """,
     "expunge": """\
 expunge: usage: svncutter [-r SELECTION ] expunge PATTERN...
@@ -725,7 +727,7 @@ def setlog(source, logpatch, selection):
         return (propkeys, propdict)
     source.apply_property_hook(selection, loghook)
 
-def skeletonize(source, selection):
+def skeletonize(source, selection, patterns):
     "Skeletonize a portion of the dump file defined by a revision selection."
     def __skeletonize(header, properties, content):
         def get_header(hd, name):
@@ -733,6 +735,18 @@ def skeletonize(source, selection):
             return m and m.group(1)
         def set_length(hd, name, val):
             return re.sub("(?<=%s: )[0-9]+" % name, str(val), hd)
+
+        # first check against the pattern
+        ok = True
+        for pattern in patterns:
+            if header.startswith("Node-path: ") and re.search(pattern, header[11:]):
+                #sys.stderr.write("skeletonize skipping: " + header[11:header.index("\n")] +"\n")
+                ok = False
+                break
+        if not ok:
+            return header + properties + content
+        del ok
+
         if content:
             tell = "Revision is %s, file path is %s.\n\n\n" % \
                       (source.revision, get_header(header, "Node-path"),)
@@ -756,7 +770,8 @@ def expunge(source, selection, patterns)
     "Strip out ops defined by a revision selection and a path regexp."
     def __expunge(header, properties, content):
         for pattern in patterns:
-            if re.search("Node-path: " + pattern, header):
+            if header.startswith("Node-path: ") and re.search(pattern, header[11:]):
+                #sys.stderr.write("expunge skipping: " + header[11:header.index("\n")] +"\n")
                 return ""
         else:
             return header + properties + content
@@ -840,9 +855,9 @@ if __name__ == '__main__':
                 sys.stderr.write("svncutter: setlog requires a log entries file.\n")
             setlog(DumpfileSource(sys.stdin, baton), logpatch, selection)
         elif arguments[0] == "skeleton":
-            skeletonize(DumpfileSource(sys.stdin, baton), selection)
+            skeletonize(DumpfileSource(sys.stdin, baton), selection, arguments[1:])
         elif arguments[0] == "expunge":
-            expunge(DumpfileSource(sys.stdin, baton), selection, arguments)
+            expunge(DumpfileSource(sys.stdin, baton), selection, arguments[1:])
         elif arguments[0] == "renumber":
             renumber(DumpfileSource(sys.stdin, baton))
         elif arguments[0] == "help":

Modified: subversion/branches/invoke-diff-cmd-feature/notes/knobs
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/notes/knobs?rev=1542685&r1=1542684&r2=1542685&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/notes/knobs (original)
+++ subversion/branches/invoke-diff-cmd-feature/notes/knobs Sun Nov 17 10:02:39 2013
@@ -52,6 +52,7 @@ SVN_FS_FS_DELTIFY_DIRECTORIES
 SVN_FS_FS_DELTIFY_PROPS
 SVN_SQLITE_MIN_VERSION_NUMBER
 SVN_SQLITE_MIN_VERSION
+SVN_SERF_NO_LOGGING
 
 2.3 Debugging Support
 

Modified: subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/CreateJ.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/CreateJ.cpp?rev=1542685&r1=1542684&r2=1542685&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/CreateJ.cpp (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/CreateJ.cpp Sun Nov 17 10:02:39 2013
@@ -784,6 +784,7 @@ CreateJ::ClientNotifyInformation(const s
                                "L"JAVA_PACKAGE"/ClientNotifyInformation$LockStatus;"
                                "JLjava/lang/String;"
                                "L"JAVA_PACKAGE"/types/RevisionRange;"
+                               "Ljava/lang/String;"
                                "Ljava/lang/String;Ljava/lang/String;"
                                "Ljava/util/Map;JJJJJJI)V");
       if (JNIUtil::isJavaExceptionThrown() || midCT == 0)
@@ -841,6 +842,10 @@ CreateJ::ClientNotifyInformation(const s
         POP_AND_RETURN_NULL;
     }
 
+  jstring jUrl = JNIUtil::makeJString(wcNotify->url);
+  if (JNIUtil::isJavaExceptionThrown())
+    POP_AND_RETURN_NULL;
+
   jstring jpathPrefix = JNIUtil::makeJString(wcNotify->path_prefix);
   if (JNIUtil::isJavaExceptionThrown())
     POP_AND_RETURN_NULL;
@@ -872,7 +877,7 @@ CreateJ::ClientNotifyInformation(const s
                                  jKind, jMimeType, jLock, jErr, jErrStack,
                                  jContentState, jPropState, jLockState,
                                  (jlong) wcNotify->revision, jChangelistName,
-                                 jMergeRange, jpathPrefix, jpropName,
+                                 jMergeRange, jUrl, jpathPrefix, jpropName,
                                  jrevProps, joldRevision,
                                  jhunkOriginalStart, jhunkOriginalLength,
                                  jhunkModifiedStart, jhunkModifiedLength,

Modified: subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/GlobalConfig.h
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/GlobalConfig.h?rev=1542685&r1=1542684&r2=1542685&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/GlobalConfig.h (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/GlobalConfig.h Sun Nov 17 10:02:39 2013
@@ -33,7 +33,6 @@ class GlobalConfig
 {
  public:
   static bool useNativeCredentialsStore();
-  static jobject getConfigCallback();
 };
 
 #endif  // JAVAHL_GLOBAL_CONFIG_H

Modified: subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/JNIUtil.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/JNIUtil.cpp?rev=1542685&r1=1542684&r2=1542685&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/JNIUtil.cpp (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/JNIUtil.cpp Sun Nov 17 10:02:39 2013
@@ -64,6 +64,8 @@
 #include "Pool.h"
 
 
+#include "jniwrapper/jni_env.hpp"
+
 // Static members of JNIUtil are allocated here.
 apr_pool_t *JNIUtil::g_pool = NULL;
 std::list<SVNBase*> JNIUtil::g_finalizedObjects;
@@ -76,34 +78,13 @@ JNIEnv *JNIUtil::g_initEnv;
 int JNIUtil::g_logLevel = JNIUtil::noLog;
 std::ofstream JNIUtil::g_logStream;
 
-namespace {
-JavaVM *g_jvm = NULL;
-} // anonymous namespace
-
-extern "C" JNIEXPORT jint JNICALL
-JNI_OnLoad(JavaVM *jvm, void*)
-{
-  g_jvm = jvm;
-  return JNI_VERSION_1_2;
-}
-
-extern "C" JNIEXPORT void JNICALL
-JNI_OnUnload(JavaVM*, void*)
-{}
-
 /**
  * Return the JNI environment to use
  * @return the JNI environment
  */
 JNIEnv *JNIUtil::getEnv()
 {
-  // During init -> look into the global variable.
-  if (g_inInit)
-    return g_initEnv;
-
-  void* penv;
-  g_jvm->GetEnv(&penv, JNI_VERSION_1_2);
-  return static_cast<JNIEnv*>(penv);
+  return Java::Env().get();
 }
 
 /**

Modified: subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/OperationContext.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/OperationContext.cpp?rev=1542685&r1=1542684&r2=1542685&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/OperationContext.cpp (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/OperationContext.cpp Sun Nov 17 10:02:39 2013
@@ -82,10 +82,6 @@ OperationContext::attachJavaObject(
     return;
 
   env->DeleteLocalRef(jctx);
-
-  m_jcfgcb = env->NewGlobalRef(GlobalConfig::getConfigCallback());
-  if (JNIUtil::isJavaExceptionThrown())
-    return;
 }
 
 OperationContext::~OperationContext()
@@ -282,6 +278,26 @@ OperationContext::getConfigDirectory() c
   return (m_configDir.empty() ? NULL : m_configDir.c_str());
 }
 
+void OperationContext::setConfigEventHandler(jobject jcfgcb)
+{
+  JNIEnv *env = JNIUtil::getEnv();
+  if (jcfgcb)
+    {
+      jcfgcb = env->NewGlobalRef(jcfgcb);
+      if (JNIUtil::isJavaExceptionThrown())
+        return;
+    }
+
+  if (m_jcfgcb)
+    env->DeleteGlobalRef(m_jcfgcb);
+  m_jcfgcb = jcfgcb;
+}
+
+jobject OperationContext::getConfigEventHandler() const
+{
+  return m_jcfgcb;
+}
+
 const char *
 OperationContext::getUsername() const
 {

Modified: subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/OperationContext.h
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/OperationContext.h?rev=1542685&r1=1542684&r2=1542685&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/OperationContext.h (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/OperationContext.h Sun Nov 17 10:02:39 2013
@@ -114,6 +114,9 @@ class OperationContext
    */
   apr_hash_t *getConfigData();
 
+  void setConfigEventHandler(jobject jcfgcb);
+  jobject getConfigEventHandler() const;
+
   static svn_error_t * clientName(void *baton, const char **name, apr_pool_t *pool);
   virtual const char * getClientName() const;
 

Modified: subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/RemoteSession.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/RemoteSession.cpp?rev=1542685&r1=1542684&r2=1542685&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/RemoteSession.cpp (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/RemoteSession.cpp Sun Nov 17 10:02:39 2013
@@ -68,7 +68,8 @@ RemoteSession::open(jint jretryAttempts,
                     jstring jurl, jstring juuid,
                     jstring jconfigDirectory,
                     jstring jusername, jstring jpassword,
-                    jobject jprompter, jobject jprogress, jobject jtunnelcb)
+                    jobject jprompter, jobject jprogress,
+                    jobject jcfgcb, jobject jtunnelcb)
 {
   JNIEnv *env = JNIUtil::getEnv();
 
@@ -111,7 +112,7 @@ RemoteSession::open(jint jretryAttempts,
   jobject jremoteSession = open(
       jretryAttempts, url.c_str(), uuid,
       (jconfigDirectory ? configDirectory.c_str() : NULL),
-      usernameStr, passwordStr, prompter, jprogress, jtunnelcb);
+      usernameStr, passwordStr, prompter, jprogress, jcfgcb, jtunnelcb);
   if (JNIUtil::isExceptionThrown() || !jremoteSession)
     {
       delete prompter;
@@ -125,7 +126,8 @@ RemoteSession::open(jint jretryAttempts,
                     const char* url, const char* uuid,
                     const char* configDirectory,
                     const char*  usernameStr, const char*  passwordStr,
-                    Prompter*& prompter, jobject jprogress, jobject jtunnelcb)
+                    Prompter*& prompter, jobject jprogress,
+                    jobject jcfgcb, jobject jtunnelcb)
 {
   /*
    * Initialize ra layer if we have not done so yet
@@ -139,7 +141,7 @@ RemoteSession::open(jint jretryAttempts,
 
   RemoteSession* session = new RemoteSession(
       jretryAttempts, url, uuid, configDirectory,
-      usernameStr, passwordStr, prompter, jtunnelcb);
+      usernameStr, passwordStr, prompter, jcfgcb, jtunnelcb);
   if (JNIUtil::isJavaExceptionThrown() || !session)
     {
       delete session;
@@ -201,11 +203,12 @@ RemoteSession::RemoteSession(int retryAt
                              const char* url, const char* uuid,
                              const char* configDirectory,
                              const char*  username, const char*  password,
-                             Prompter*& prompter, jobject jtunnelcb)
+                             Prompter*& prompter,
+                             jobject jcfgcb, jobject jtunnelcb)
   : m_session(NULL), m_context(NULL)
 {
   m_context = new RemoteSessionContext(
-      pool, configDirectory, username, password, prompter, jtunnelcb);
+      pool, configDirectory, username, password, prompter, jcfgcb, jtunnelcb);
   if (JNIUtil::isJavaExceptionThrown())
     return;
 

Modified: subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/RemoteSession.h
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/RemoteSession.h?rev=1542685&r1=1542684&r2=1542685&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/RemoteSession.h (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/RemoteSession.h Sun Nov 17 10:02:39 2013
@@ -49,13 +49,13 @@ class RemoteSession : public SVNBase
                         jstring jconfigDirectory,
                         jstring jusername, jstring jpassword,
                         jobject jprompter, jobject jprogress,
-                        jobject jtunnelcb);
+                        jobject jcfgcb, jobject jtunnelcb);
     static jobject open(jint jretryAttempts,
                         const char* url, const char* uuid,
                         const char* configDirectory,
                         const char* username, const char* password,
                         Prompter*& prompter, jobject jprogress,
-                        jobject jtunnelcb);
+                        jobject jcfgcb, jobject jtunnelcb);
     ~RemoteSession();
 
     void cancelOperation() const { m_context->cancelOperation(); }
@@ -119,7 +119,7 @@ class RemoteSession : public SVNBase
                   const char* url, const char* uuid,
                   const char* configDirectory,
                   const char* username, const char* password,
-                  Prompter*& prompter, jobject jtunnelcb);
+                  Prompter*& prompter, jobject jcfgcb, jobject jtunnelcb);
 
     svn_ra_session_t* m_session;
     RemoteSessionContext* m_context;

Modified: subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/RemoteSessionContext.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/RemoteSessionContext.cpp?rev=1542685&r1=1542684&r2=1542685&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/RemoteSessionContext.cpp (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/RemoteSessionContext.cpp Sun Nov 17 10:02:39 2013
@@ -33,7 +33,7 @@
 RemoteSessionContext::RemoteSessionContext(
     SVN::Pool &pool, const char* configDirectory,
     const char* usernameStr, const char* passwordStr,
-    Prompter* prompter, jobject jtunnelcb)
+    Prompter* prompter, jobject jcfgcb, jobject jtunnelcb)
   : OperationContext(pool), m_raCallbacks(NULL)
 {
   setConfigDirectory(configDirectory);
@@ -44,6 +44,7 @@ RemoteSessionContext::RemoteSessionConte
     password(passwordStr);
 
   setPrompt(prompter);
+  setConfigEventHandler(jcfgcb);
   setTunnelCallback(jtunnelcb);
 
   /*

Modified: subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/RemoteSessionContext.h
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/RemoteSessionContext.h?rev=1542685&r1=1542684&r2=1542685&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/RemoteSessionContext.h (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/RemoteSessionContext.h Sun Nov 17 10:02:39 2013
@@ -37,7 +37,8 @@ class RemoteSessionContext : public Oper
     RemoteSessionContext(SVN::Pool &pool,
                          const char* jconfigDirectory,
                          const char* jusername, const char* jpassword,
-                         Prompter* prompter, jobject jtunnelcb);
+                         Prompter* prompter,
+                         jobject jcfgcb, jobject jtunnelcb);
     virtual ~RemoteSessionContext();
     void activate(jobject jremoteSession, jobject jprogress);
     void * getCallbackBaton();

Modified: subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/Revision.h
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/Revision.h?rev=1542685&r1=1542684&r2=1542685&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/Revision.h (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/Revision.h Sun Nov 17 10:02:39 2013
@@ -50,6 +50,7 @@ class Revision
    * Make a Revision Java object.
    */
   static jobject makeJRevision(svn_revnum_t rev);
+  static jobject makeJRevision(const svn_opt_revision_t& rev);
 };
 
 #endif // REVISION_H

Modified: subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/SVNClient.cpp?rev=1542685&r1=1542684&r2=1542685&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/SVNClient.cpp (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/SVNClient.cpp Sun Nov 17 10:02:39 2013
@@ -1521,7 +1521,8 @@ SVNClient::openRemoteSession(const char*
         retryAttempts, path_info.url.c_str(), path_info.uuid.c_str(),
         context.getConfigDirectory(),
         context.getUsername(), context.getPassword(),
-        prompter, context.getSelf(), context.getTunnelCallback());
+        prompter, context.getSelf(),
+        context.getConfigEventHandler(), context.getTunnelCallback());
     if (JNIUtil::isJavaExceptionThrown())
       delete prompter;
 

Modified: subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp?rev=1542685&r1=1542684&r2=1542685&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp Sun Nov 17 10:02:39 2013
@@ -1666,6 +1666,36 @@ Java_org_apache_subversion_javahl_SVNCli
 }
 
 JNIEXPORT void JNICALL
+Java_org_apache_subversion_javahl_SVNClient_setConfigEventHandler(
+    JNIEnv* env, jobject jthis, jobject jcallback)
+{
+  JNIEntry(SVNClient, setConfigEventHandler);
+  SVNClient *cl = SVNClient::getCppObject(jthis);
+  if (cl == NULL)
+    {
+      JNIUtil::throwError(_("bad C++ this"));
+      return;
+    }
+
+  cl->getClientContext().setConfigEventHandler(jcallback);
+}
+
+JNIEXPORT jobject JNICALL
+Java_org_apache_subversion_javahl_SVNClient_getConfigEventHandler(
+    JNIEnv* env, jobject jthis)
+{
+  JNIEntry(SVNClient, getConfigEventHandler);
+  SVNClient *cl = SVNClient::getCppObject(jthis);
+  if (cl == NULL)
+    {
+      JNIUtil::throwError(_("bad C++ this"));
+      return NULL;
+    }
+
+  return cl->getClientContext().getConfigEventHandler();
+}
+
+JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_cancelOperation
 (JNIEnv *env, jobject jthis)
 {

Modified: subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteFactory.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteFactory.cpp?rev=1542685&r1=1542684&r2=1542685&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteFactory.cpp (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteFactory.cpp Sun Nov 17 10:02:39 2013
@@ -41,7 +41,7 @@ Java_org_apache_subversion_javahl_remote
     jstring jconfigDirectory,
     jstring jusername, jstring jpassword,
     jobject jprompter, jobject jprogress,
-    jobject jtunnelcb)
+    jobject jcfgcb, jobject jtunnelcb)
 {
   //JNI macros need jthis but this is a static call
   JNIEntryStatic(RemoteFactory, open);
@@ -51,7 +51,8 @@ Java_org_apache_subversion_javahl_remote
    */
   jobject jremoteSession = RemoteSession::open(
       jretryAttempts, jurl, juuid,
-      jconfigDirectory, jusername, jpassword, jprompter, jprogress, jtunnelcb);
+      jconfigDirectory, jusername, jpassword, jprompter, jprogress,
+      jcfgcb, jtunnelcb);
   if (JNIUtil::isJavaExceptionThrown())
     return NULL;
 

Modified: subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigLib.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigLib.cpp?rev=1542685&r1=1542684&r2=1542685&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigLib.cpp (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigLib.cpp Sun Nov 17 10:02:39 2013
@@ -34,7 +34,6 @@
 
 namespace {
 bool g_ignore_native_credentials = false;
-jobject g_config_callback = NULL;
 } // anonymous callback
 
 bool GlobalConfig::useNativeCredentialsStore()
@@ -43,13 +42,6 @@ bool GlobalConfig::useNativeCredentialsS
   return !g_ignore_native_credentials;
 }
 
-jobject GlobalConfig::getConfigCallback()
-{
-  JNICriticalSection lock(*JNIUtil::g_configMutex);
-  return g_config_callback;
-}
-
-
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_util_ConfigLib_enableNativeCredentialsStore(
     JNIEnv* env, jobject jthis)
@@ -70,11 +62,6 @@ Java_org_apache_subversion_javahl_util_C
   g_ignore_native_credentials = true;
 }
 
-/*
- * Class:     org_apache_subversion_javahl_util_ConfigLib
- * Method:    isNativeCredentialsStoreEnabled
- * Signature: ()Z
- */
 JNIEXPORT jboolean JNICALL
 Java_org_apache_subversion_javahl_util_ConfigLib_isNativeCredentialsStoreEnabled(
     JNIEnv* env, jobject jthis)
@@ -83,36 +70,3 @@ Java_org_apache_subversion_javahl_util_C
 
   return jboolean(GlobalConfig::useNativeCredentialsStore());
 }
-
-/*
- * Class:     org_apache_subversion_javahl_util_ConfigLib
- * Method:    setConfigEventHandler
- * Signature: (Lorg/apache/subversion/javahl/callback/ConfigEvent;)V
- */
-JNIEXPORT void JNICALL
-Java_org_apache_subversion_javahl_util_ConfigLib_setConfigEventHandler(
-    JNIEnv* env, jobject jthis, jobject jcallback)
-{
-  JNIEntry(ConfigLib, setConfigEventHandler);
-
-  JNICriticalSection lock(*JNIUtil::g_configMutex);
-  if (g_config_callback)
-    {
-      env->DeleteGlobalRef(g_config_callback);
-      g_config_callback = NULL;
-    }
-  if (jcallback)
-    {
-      g_config_callback = env->NewGlobalRef(jcallback);
-      env->DeleteLocalRef(jcallback);
-    }
-}
-
-JNIEXPORT jobject JNICALL
-Java_org_apache_subversion_javahl_util_ConfigLib_getConfigEventHandler(
-    JNIEnv* env, jobject jthis)
-{
-  JNIEntry(ConfigLib, getConfigEventHandler);
-
-  return GlobalConfig::getConfigCallback();
-}

Modified: subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_PropLib.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_PropLib.cpp?rev=1542685&r1=1542684&r2=1542685&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_PropLib.cpp (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_PropLib.cpp Sun Nov 17 10:02:39 2013
@@ -24,6 +24,9 @@
  * @brief Implementation of the native methods in the Java class PropLib
  */
 
+#include <iostream>
+#include <sstream>
+
 #include "../include/org_apache_subversion_javahl_util_PropLib.h"
 
 #include "JNIStackElement.h"
@@ -36,8 +39,12 @@
 #include "Pool.h"
 
 #include "svn_props.h"
+#include "svn_time.h"
 #include "svn_wc.h"
 
+#include "private/svn_wc_private.h"
+#include "svn_private_config.h"
+
 
 namespace {
 class PropGetter
@@ -132,3 +139,260 @@ Java_org_apache_subversion_javahl_util_P
 
   return JNIUtil::makeJByteArray(canonval->data, int(canonval->len));
 }
+
+
+#include "jniwrapper/jni_stack.hpp"
+#include "jniwrapper/jni_array.hpp"
+#include "jniwrapper/jni_list.hpp"
+#include "jniwrapper/jni_string.hpp"
+#include "ExternalItem.hpp"
+#include "SubversionException.hpp"
+
+
+namespace {
+struct FormatRevision
+{
+  explicit FormatRevision(const svn_opt_revision_t* const& revarg,
+                          const SVN::Pool& poolarg)
+    : rev(revarg), pool(poolarg)
+    {}
+
+  const svn_opt_revision_t* const& rev;
+  const SVN::Pool& pool;
+};
+
+std::ostream& operator<<(std::ostream& os, const FormatRevision& pr)
+{
+  switch (pr.rev->kind)
+    {
+    case svn_opt_revision_number:
+      os << pr.rev->value.number;
+      break;
+    case svn_opt_revision_date:
+      os << '{'
+         << svn_time_to_cstring(pr.rev->value.date, pr.pool.getPool())
+         << '}';
+      break;
+    default:
+      throw std::logic_error(
+          _("Invalid revision tag; must be a number or a date"));
+    }
+  return os;
+}
+
+bool operator==(const svn_opt_revision_t& a,
+                const svn_opt_revision_t& b)
+{
+  if (a.kind != b.kind)
+    return false;
+  if (a.kind == svn_opt_revision_number
+      && a.value.number != b.value.number)
+    return false;
+  if (a.kind == svn_opt_revision_date
+      && a.value.date != b.value.date)
+    return false;
+  return true;
+}
+
+inline bool operator!=(const svn_opt_revision_t& a,
+                       const svn_opt_revision_t& b)
+{
+  return !(a == b);
+}
+
+class UnparseFunctor
+{
+public:
+  explicit UnparseFunctor(std::ostringstream& buffer, bool old_format,
+                          SVN::Pool& iterpool)
+    : m_buffer(buffer),
+      m_old_format(old_format),
+      m_iterpool(iterpool)
+    {}
+
+  void operator()(const JavaHL::ExternalItem& item)
+    {
+      m_iterpool.clear();
+
+      const Java::Env env(item.get_env());
+      const Java::LocalFrame frame(env);
+
+      if (!m_old_format)
+        {
+          if (item.revision()->kind != svn_opt_revision_head
+              && *item.revision() != *item.peg_revision())
+            {
+              m_buffer << "-r"
+                       << FormatRevision(item.revision(), m_iterpool)
+                       << ' ';
+            }
+          if (item.peg_revision()->kind == svn_opt_revision_head)
+            m_buffer << item.url() << ' ';
+          else
+            {
+              m_buffer << item.url() << '@'
+                       << FormatRevision(item.peg_revision(), m_iterpool)
+                       << ' ';
+            }
+          m_buffer << item.target_dir() << '\n';
+        }
+      else
+        {
+          // Sanity check: old format does not support peg revisions
+          if (item.peg_revision()->kind != svn_opt_revision_head
+              && *item.revision() != *item.peg_revision())
+            {
+              JavaHL::SubversionException(env)
+                .raise(_("Clients older than Subversion 1.5"
+                         " do not support peg revision syntax"
+                         " in the svn:externals property"));
+            }
+
+          // Sanity check: old format does not support relative URLs
+          const std::string url = item.url();
+          if (   (url.size() >= 1 && (url[0] == '.' || url[0] == '/'))
+                 || (url.size() >= 2 && (url[0] == '^' && url[1] == '/')))
+            {
+              JavaHL::SubversionException(env)
+                .raise(_("Clients older than Subversion 1.5"
+                         " do not support relative URLs"
+                         " in the svn:externals property"));
+            }
+
+          m_buffer << item.target_dir() << ' ';
+          if (item.revision()->kind != svn_opt_revision_head)
+            {
+              m_buffer << "-r"
+                       << FormatRevision(item.revision(), m_iterpool)
+                       << ' ';
+            }
+          m_buffer << url << '\n';
+        }
+    }
+
+private:
+  std::ostringstream& m_buffer;
+  const bool m_old_format;
+  SVN::Pool& m_iterpool;
+};
+} // anoymous namespace
+
+
+JNIEXPORT jobject JNICALL
+Java_org_apache_subversion_javahl_util_PropLib_parseExternals(
+    JNIEnv* jenv, jobject jthis,
+    jbyteArray jdescription, jstring jparent_dir, jboolean jcanonicalize_url)
+{
+  SVN_JAVAHL_JNI_TRY(PropLib, parseExternals)
+    {
+      const Java::Env env(jenv);
+
+      const Java::ByteArray description(env, jdescription);
+      const Java::String parent_dir(env, jparent_dir);
+
+      // Using a "global" request pool since we don't keep a context
+      // with its own pool around for these functions.
+      SVN::Pool pool;
+
+      apr_array_header_t* externals;
+      {
+        // There is no guarantee that the description contents are
+        // null-terminated. Copy them to an svn_string_t to make sure
+        // that they are.
+        svn_string_t* const description_contents =
+          Java::ByteArray::Contents(description).get_string(pool);
+
+        SVN_JAVAHL_CHECK(svn_wc_parse_externals_description3(
+                             &externals,
+                             Java::String::Contents(parent_dir).c_str(),
+                             description_contents->data,
+                             svn_boolean_t(jcanonicalize_url),
+                             pool.getPool()));
+      }
+
+      Java::MutableList<JavaHL::ExternalItem> items(env, externals->nelts);
+      for (jint i = 0; i < externals->nelts; ++i)
+        {
+          // References to the newly created external items are stored
+          // in the list, so make sure the local reference in this
+          // frame get cleared on each iteration.
+          Java::LocalFrame frame;
+
+          const svn_wc_external_item2_t* const item =
+            APR_ARRAY_IDX(externals, i, svn_wc_external_item2_t*);
+          items.add(JavaHL::ExternalItem(env,
+                                         item->target_dir,
+                                         item->url,
+                                         &item->revision,
+                                         &item->peg_revision));
+        }
+      return items.get();
+    }
+  SVN_JAVAHL_JNI_CATCH;
+  return NULL;
+}
+
+
+JNIEXPORT jbyteArray JNICALL
+Java_org_apache_subversion_javahl_util_PropLib_unparseExternals(
+    JNIEnv* jenv, jobject jthis,
+    jobject jitems, jstring jparent_dir, jboolean jold_format)
+{
+  SVN_JAVAHL_JNI_TRY(PropLib, unparseExternals)
+    {
+      const Java::Env env(jenv);
+
+      const Java::List<JavaHL::ExternalItem> items(env, jitems);
+      const Java::String parent_dir(env, jparent_dir);
+
+      // Using a "global" iteration pool since we don't keep a context
+      // with its own pool around for these functions.
+      SVN::Pool iterpool;
+
+      std::ostringstream buffer;
+      items.for_each(UnparseFunctor(buffer, jold_format, iterpool));
+      const std::string description(buffer.str());
+
+      // Validate the result. Even though we generated the string
+      // ourselves, we did not validate the input paths and URLs.
+      SVN_JAVAHL_CHECK(svn_wc_parse_externals_description3(
+                           NULL,
+                           Java::String::Contents(parent_dir).c_str(),
+                           description.c_str(),
+                           false, iterpool.getPool()));
+      return Java::ByteArray(env, description).get();
+    }
+  SVN_JAVAHL_JNI_CATCH;
+  return NULL;
+}
+
+
+JNIEXPORT jstring JNICALL
+Java_org_apache_subversion_javahl_util_PropLib_resolveExternalsUrl(
+    JNIEnv* jenv, jobject jthis,
+    jobject jitem, jstring jrepos_root_url, jstring jparent_dir_url)
+{
+  SVN_JAVAHL_JNI_TRY(PropLib, unparseExternals)
+    {
+      const Java::Env env(jenv);
+
+      const Java::String repos_root_url(env, jrepos_root_url);
+      const Java::String parent_dir_url(env, jparent_dir_url);
+      const JavaHL::ExternalItem item(env, jitem);
+
+      // Using a "global" request pool since we don't keep a context
+      // with its own pool around for these functions.
+      SVN::Pool pool;
+
+      const char* resolved_url;
+      SVN_JAVAHL_CHECK(svn_wc__resolve_relative_external_url(
+                           &resolved_url,
+                           item.get_external_item(pool),
+                           Java::String::Contents(repos_root_url).c_str(),
+                           Java::String::Contents(parent_dir_url).c_str(),
+                           pool.getPool(), pool.getPool()));
+      return Java::String(env, resolved_url).get();
+    }
+  SVN_JAVAHL_JNI_CATCH;
+  return NULL;
+}

Modified: subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_TunnelChannel.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_TunnelChannel.cpp?rev=1542685&r1=1542684&r2=1542685&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_TunnelChannel.cpp (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_TunnelChannel.cpp Sun Nov 17 10:02:39 2013
@@ -25,8 +25,6 @@
  *        TunnelChannel, RequestChannel and ResponseChannel
  */
 
-#include <assert.h>             // TEMPORARY until we handle weird byte arrays
-
 #include <string>
 
 #include <apr_file_io.h>
@@ -35,191 +33,142 @@
 #include "../include/org_apache_subversion_javahl_util_RequestChannel.h"
 #include "../include/org_apache_subversion_javahl_util_ResponseChannel.h"
 
-#include "JNIUtil.h"
-#include "JNIStackElement.h"
-#include "JNIByteArray.h"
+#include "jniwrapper/jni_exception.hpp"
+#include "jniwrapper/jni_channel.hpp"
+#include "jniwrapper/jni_stack.hpp"
 
 #include "svn_private_config.h"
 
 namespace {
-apr_file_t* get_file_descriptor(jlong jfd)
+apr_file_t* get_file_descriptor(Java::Env env, jlong jfd)
 {
   apr_file_t* fd = reinterpret_cast<apr_file_t*>(jfd);
   if (!fd)
-    {
-      JNIUtil::throwNullPointerException("nativeChannel");
-      return NULL;
-    }
+    Java::NullPointerException(env).raise("nativeChannel");
   return fd;
 }
 
-void throw_IOException(const char* message, apr_status_t status)
+void throw_IOException(Java::Env env, const char* message,
+                       apr_status_t status)
 {
+  char buf[1024];
   std::string msg(message);
-  if (status)
-    {
-      char buf[1024];
-      apr_strerror(status, buf, sizeof(buf) - 1);
-      msg += ": ";
-      msg += buf;
-    }
-  JNIUtil::raiseThrowable("java/io/IOException", msg.c_str());
+  apr_strerror(status, buf, sizeof(buf) - 1);
+  msg += buf;
+  Java::IOException(env).raise(msg.c_str());
 }
 
-class ByteBufferProxy
+class TunnelReader : public Java::ChannelReader
 {
 public:
-  ByteBufferProxy(jobject buf, JNIEnv* env)
-    : m_buf(buf),
-      m_direct(env->GetDirectBufferAddress(buf)),
-      m_array(m_direct ? NULL : get_array(buf, env)),
-      m_array_offset(m_array ? get_array_offset(buf, env) : 0),
-      m_offset(get_position(buf, env)),
-      m_size(get_remaining(buf, env))
+  explicit TunnelReader(Java::Env env, jlong jnative_channel)
+    : m_fd(get_file_descriptor(env, jnative_channel))
     {}
 
-  jint read(apr_file_t* fd, JNIEnv* env)
+  virtual jint operator()(Java::Env env, void* buffer, jint length)
     {
-      if (!m_size)
+      if (!length)
         return 0;
 
-      JNIByteArray arr(m_array, false, false);
-      apr_size_t bytes_read = m_size;
-      apr_status_t status = apr_file_read(
-          fd, get_base_address(arr), &bytes_read);
+      apr_size_t bytes_read = length;
+      const apr_status_t status = apr_file_read(m_fd, buffer, &bytes_read);
       if (status && !APR_STATUS_IS_EOF(status))
         {
-          throw_IOException(_("Error reading from native file handle"),
-                            status);
-          return 0;
+          throw_IOException(
+              env, _("Error reading from native file handle: "),
+              status);
+          return -1;
         }
-      update_position(bytes_read, env);
+      if (APR_STATUS_IS_EOF(status))
+        return -1;
       return jint(bytes_read);
     }
 
-  jint write(apr_file_t* fd, JNIEnv* env)
+private:
+  apr_file_t* const m_fd;
+};
+
+class TunnelWriter : public Java::ChannelWriter
+{
+public:
+  explicit TunnelWriter(Java::Env env, jlong jnative_channel)
+    : m_fd(get_file_descriptor(env, jnative_channel))
+    {}
+
+  virtual jint operator()(Java::Env env, const void* buffer, jint length)
     {
-      if (!m_size)
+      if (!length)
         return 0;
 
-      JNIByteArray arr(m_array);
       apr_size_t bytes_written;
-      apr_status_t status = apr_file_write_full(
-          fd, get_base_address(arr), m_size, &bytes_written);
+      const apr_status_t status =
+        apr_file_write_full(m_fd, buffer, length, &bytes_written);
       if (status)
         {
-          throw_IOException(_("Error writing to native file handle"),
-                            status);
-          return 0;
+          throw_IOException(
+              env, _("Error writing to native file handle: "),
+              status);
+          return -1;
         }
-      update_position(bytes_written, env);
       return jint(bytes_written);
     }
 
 private:
-  void *get_base_address(JNIByteArray& arr)
-    {
-      void* base = (m_direct ? m_direct
-                    : const_cast<signed char*>(arr.getBytes()));
-      // FIXME: We do not currently support buffers that are nether
-      // direct, nor have an accessible array.
-      assert(base != 0);
-      return static_cast<char*>(base) + m_offset + m_array_offset;
-    }
-
-  void update_position(apr_size_t amount, JNIEnv* env)
-    {
-      jmethodID mid = env->GetMethodID(
-          env->GetObjectClass(m_buf), "position", "(I)Ljava/nio/Buffer;");
-      if (mid)
-        env->CallObjectMethod(m_buf, mid, jint(amount));
-    }
-
-  static jbyteArray get_array(jobject buf, JNIEnv* env)
-    {
-      jclass cls = env->GetObjectClass(buf);
-      jmethodID mid = env->GetMethodID(cls, "hasArray", "()Z");
-      if (!mid)
-        return NULL;
-
-      jboolean has_array = env->CallBooleanMethod(buf, mid);
-      if (!has_array)
-        return NULL;
-
-      mid = env->GetMethodID(cls, "array", "()[B");
-      if (mid)
-        return jbyteArray(env->CallObjectMethod(buf, mid));
-      return NULL;
-    }
-
-  static apr_size_t get_array_offset(jobject buf, JNIEnv* env)
-    {
-      jmethodID mid = env->GetMethodID(
-          env->GetObjectClass(buf), "arrayOffset", "()I");
-      if (mid)
-        return env->CallIntMethod(buf, mid);
-      return 0;
-    }
-
-  static apr_size_t get_position(jobject buf, JNIEnv* env)
-    {
-      jmethodID mid = env->GetMethodID(
-          env->GetObjectClass(buf), "position", "()I");
-      if (mid)
-        return env->CallIntMethod(buf, mid);
-      return 0;
-    }
-
-  static apr_size_t get_remaining(jobject buf, JNIEnv* env)
-    {
-      jmethodID mid = env->GetMethodID(
-          env->GetObjectClass(buf), "remaining", "()I");
-      if (mid)
-        return env->CallIntMethod(buf, mid);
-      return 0;
-    }
-
-  jobject m_buf;
-  void *m_direct;
-  jbyteArray m_array;
-  apr_size_t m_array_offset;
-  apr_size_t m_offset;
-  apr_size_t m_size;
+  apr_file_t* const m_fd;
 };
+
 } // anonymous namespace
 
+
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_util_TunnelChannel_nativeClose(
-    JNIEnv* env, jclass jclazz, jlong nativeChannel)
+    JNIEnv* jenv, jclass jclazz, jlong jnative_channel)
 {
-  JNIEntryStatic(TunnelChannel, close);
-  apr_file_t* fd = reinterpret_cast<apr_file_t*>(nativeChannel);
-  if (!fd)
-    return;
+  SVN_JAVAHL_JNI_TRY_STATIC(TunnelChannel, close)
+    {
+      const Java::Env env(jenv);
+
+      apr_file_t* const fd = get_file_descriptor(env, jnative_channel);
+      if (!fd)
+        return;
 
-  apr_status_t status = apr_file_close(fd);
-  if (status)
-    throw_IOException(_("Error closing native file handle"), status);
+      const apr_status_t status = apr_file_close(fd);
+      if (status)
+        throw_IOException(
+            env, _("Error closing native file handle: "),
+            status);
+    }
+  SVN_JAVAHL_JNI_CATCH;
 }
 
 JNIEXPORT jint JNICALL
 Java_org_apache_subversion_javahl_util_RequestChannel_nativeRead(
-    JNIEnv* env, jclass jclazz, jlong nativeChannel, jobject dst)
+    JNIEnv* jenv, jclass jclazz, jlong jnative_channel, jobject jdst_buffer)
 {
-  JNIEntryStatic(RequestChannel, read);
-  apr_file_t* fd = get_file_descriptor(nativeChannel);
-  if (fd)
-    return ByteBufferProxy(dst, env).read(fd, env);
+  SVN_JAVAHL_JNI_TRY_STATIC(RequestChannel, read)
+    {
+      const Java::Env env(jenv);
+
+      TunnelReader reader(env, jnative_channel);
+      Java::ReadableByteChannel channel(env, reader);
+      return channel.read(jdst_buffer);
+    }
+  SVN_JAVAHL_JNI_CATCH;
   return -1;
 }
 
 JNIEXPORT jint JNICALL
 Java_org_apache_subversion_javahl_util_ResponseChannel_nativeWrite(
-    JNIEnv* env, jclass jclazz, jlong nativeChannel, jobject src)
+    JNIEnv* jenv, jclass jclazz, jlong jnative_channel, jobject jsrc_buffer)
 {
-  JNIEntryStatic(ResponseChannel, write);
-  apr_file_t* fd = get_file_descriptor(nativeChannel);
-  if (fd)
-    return ByteBufferProxy(src, env).write(fd, env);
+  SVN_JAVAHL_JNI_TRY_STATIC(ResponseChannel, write)
+    {
+      const Java::Env env(jenv);
+
+      TunnelWriter writer(env, jnative_channel);
+      Java::WritableByteChannel channel(env, writer);
+      return channel.write(jsrc_buffer);
+    }
+  SVN_JAVAHL_JNI_CATCH;
   return -1;
 }