subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1509270 [1/4] - in /subversion/branches/fsfs-improvements: ./ subversion/ subversion/bindings/cxxhl/include/svncxxhl/ subversion/bindings/cxxhl/src/ subversion/bindings/cxxhl/src/aprwrap/ subversion/bindings/cxxhl/src/private/ subversion/b...
Date Thu, 01 Aug 2013 14:55:37 GMT
Author: stefan2
Date: Thu Aug  1 14:55:32 2013
New Revision: 1509270

URL: http://svn.apache.org/r1509270
Log:
On the fsfs-improvement branch: sync with /trunk up to r1509265.
Resolved a trivial conflict in fs_fs.c.

Added:
    subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/private/
      - copied from r1509265, subversion/trunk/subversion/bindings/cxxhl/src/private/
    subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/private.hpp
      - copied unchanged from r1509265, subversion/trunk/subversion/bindings/cxxhl/src/private.hpp
    subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/private/exception-private.hpp
      - copied unchanged from r1509265, subversion/trunk/subversion/bindings/cxxhl/src/private/exception-private.hpp
    subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RevisionRangeList.cpp
      - copied unchanged from r1509265, subversion/trunk/subversion/bindings/javahl/native/RevisionRangeList.cpp
    subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RevisionRangeList.h
      - copied unchanged from r1509265, subversion/trunk/subversion/bindings/javahl/native/RevisionRangeList.h
    subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_types_RevisionRangeList.cpp
      - copied unchanged from r1509265, subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_types_RevisionRangeList.cpp
    subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/RevisionRangeList.java
      - copied unchanged from r1509265, subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/RevisionRangeList.java
Modified:
    subversion/branches/fsfs-improvements/   (props changed)
    subversion/branches/fsfs-improvements/COMMITTERS
    subversion/branches/fsfs-improvements/Makefile.in
    subversion/branches/fsfs-improvements/autogen.sh
    subversion/branches/fsfs-improvements/build.conf
    subversion/branches/fsfs-improvements/configure.ac
    subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/include/svncxxhl/_compat.hpp
    subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/include/svncxxhl/exception.hpp
    subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/aprwrap/array.hpp
    subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/aprwrap/hash.hpp
    subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/aprwrap/pool.hpp
    subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/exception.cpp
    subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/tests/test_aprwrap.cpp
    subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/tests/test_exception.cpp
    subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/CreateJ.cpp
    subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/CreateJ.h
    subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RemoteSession.cpp
    subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RemoteSession.h
    subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RevisionRange.cpp
    subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RevisionRange.h
    subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_ConfigImpl_Category.cpp
    subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteSession.cpp
    subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRemote.java
    subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/RemoteSession.java
    subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Mergeinfo.java
    subversion/branches/fsfs-improvements/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
    subversion/branches/fsfs-improvements/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java
    subversion/branches/fsfs-improvements/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c
    subversion/branches/fsfs-improvements/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
    subversion/branches/fsfs-improvements/subversion/bindings/swig/python/svn/core.py
    subversion/branches/fsfs-improvements/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
    subversion/branches/fsfs-improvements/subversion/include/private/svn_subr_private.h
    subversion/branches/fsfs-improvements/subversion/include/svn_config.h
    subversion/branches/fsfs-improvements/subversion/include/svn_hash.h
    subversion/branches/fsfs-improvements/subversion/include/svn_sorts.h
    subversion/branches/fsfs-improvements/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/add.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/cat.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/changelist.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/cleanup.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/commit.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/commit_util.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/copy.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/copy_foreign.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/ctx.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/delete.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/deprecated.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/diff.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/diff_local.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/diff_summarize.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/export.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/externals.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/import.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/info.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/iprops.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/list.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/locking_commands.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/log.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/merge.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/mergeinfo.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/patch.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/prop_commands.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/ra.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/repos_diff.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/resolved.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/revert.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/status.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/switch.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/update.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/util.c
    subversion/branches/fsfs-improvements/subversion/libsvn_delta/compat.c
    subversion/branches/fsfs-improvements/subversion/libsvn_delta/xdelta.c
    subversion/branches/fsfs-improvements/subversion/libsvn_diff/parse-diff.c
    subversion/branches/fsfs-improvements/subversion/libsvn_diff/util.c
    subversion/branches/fsfs-improvements/subversion/libsvn_fs/access.c
    subversion/branches/fsfs-improvements/subversion/libsvn_fs/fs-loader.c
    subversion/branches/fsfs-improvements/subversion/libsvn_fs_base/bdb/changes-table.c
    subversion/branches/fsfs-improvements/subversion/libsvn_fs_base/bdb/env.c
    subversion/branches/fsfs-improvements/subversion/libsvn_fs_base/dag.c
    subversion/branches/fsfs-improvements/subversion/libsvn_fs_base/fs.c
    subversion/branches/fsfs-improvements/subversion/libsvn_fs_base/lock.c
    subversion/branches/fsfs-improvements/subversion/libsvn_fs_base/revs-txns.c
    subversion/branches/fsfs-improvements/subversion/libsvn_fs_base/tree.c
    subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/caching.c
    subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/fs_fs.c
    subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/lock.c
    subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/temp_serializer.c
    subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/tree.c
    subversion/branches/fsfs-improvements/subversion/libsvn_fs_util/fs-util.c
    subversion/branches/fsfs-improvements/subversion/libsvn_ra/compat.c
    subversion/branches/fsfs-improvements/subversion/libsvn_ra/deprecated.c
    subversion/branches/fsfs-improvements/subversion/libsvn_ra/ra_loader.c
    subversion/branches/fsfs-improvements/subversion/libsvn_ra_local/ra_plugin.c
    subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/blame.c
    subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/blncache.c
    subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/commit.c
    subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/getlocations.c
    subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/getlocationsegments.c
    subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/getlocks.c
    subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/inherited_props.c
    subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/log.c
    subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/merge.c
    subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/mergeinfo.c
    subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/options.c
    subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/property.c
    subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/replay.c
    subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/serf.c
    subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/update.c
    subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/util.c
    subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/xml.c
    subversion/branches/fsfs-improvements/subversion/libsvn_ra_svn/client.c
    subversion/branches/fsfs-improvements/subversion/libsvn_ra_svn/editorp.c
    subversion/branches/fsfs-improvements/subversion/libsvn_ra_svn/marshal.c
    subversion/branches/fsfs-improvements/subversion/libsvn_repos/authz.c
    subversion/branches/fsfs-improvements/subversion/libsvn_repos/commit.c
    subversion/branches/fsfs-improvements/subversion/libsvn_repos/delta.c
    subversion/branches/fsfs-improvements/subversion/libsvn_repos/deprecated.c
    subversion/branches/fsfs-improvements/subversion/libsvn_repos/fs-wrap.c
    subversion/branches/fsfs-improvements/subversion/libsvn_repos/hooks.c
    subversion/branches/fsfs-improvements/subversion/libsvn_repos/log.c
    subversion/branches/fsfs-improvements/subversion/libsvn_repos/replay.c
    subversion/branches/fsfs-improvements/subversion/libsvn_repos/reporter.c
    subversion/branches/fsfs-improvements/subversion/libsvn_repos/repos.c
    subversion/branches/fsfs-improvements/subversion/libsvn_repos/rev_hunt.c
    subversion/branches/fsfs-improvements/subversion/libsvn_subr/auth.c
    subversion/branches/fsfs-improvements/subversion/libsvn_subr/cmdline.c
    subversion/branches/fsfs-improvements/subversion/libsvn_subr/compat.c
    subversion/branches/fsfs-improvements/subversion/libsvn_subr/config.c
    subversion/branches/fsfs-improvements/subversion/libsvn_subr/config_auth.c
    subversion/branches/fsfs-improvements/subversion/libsvn_subr/deprecated.c
    subversion/branches/fsfs-improvements/subversion/libsvn_subr/dso.c
    subversion/branches/fsfs-improvements/subversion/libsvn_subr/hash.c
    subversion/branches/fsfs-improvements/subversion/libsvn_subr/io.c
    subversion/branches/fsfs-improvements/subversion/libsvn_subr/mergeinfo.c
    subversion/branches/fsfs-improvements/subversion/libsvn_subr/opt.c
    subversion/branches/fsfs-improvements/subversion/libsvn_subr/properties.c
    subversion/branches/fsfs-improvements/subversion/libsvn_subr/simple_providers.c
    subversion/branches/fsfs-improvements/subversion/libsvn_subr/sorts.c
    subversion/branches/fsfs-improvements/subversion/libsvn_subr/spillbuf.c
    subversion/branches/fsfs-improvements/subversion/libsvn_subr/ssl_client_cert_providers.c
    subversion/branches/fsfs-improvements/subversion/libsvn_subr/ssl_client_cert_pw_providers.c
    subversion/branches/fsfs-improvements/subversion/libsvn_subr/ssl_server_trust_providers.c
    subversion/branches/fsfs-improvements/subversion/libsvn_subr/subst.c
    subversion/branches/fsfs-improvements/subversion/libsvn_subr/types.c
    subversion/branches/fsfs-improvements/subversion/libsvn_subr/username_providers.c
    subversion/branches/fsfs-improvements/subversion/libsvn_subr/utf.c
    subversion/branches/fsfs-improvements/subversion/libsvn_subr/win32_crypto.c
    subversion/branches/fsfs-improvements/subversion/libsvn_wc/adm_crawler.c
    subversion/branches/fsfs-improvements/subversion/libsvn_wc/adm_files.c
    subversion/branches/fsfs-improvements/subversion/libsvn_wc/adm_ops.c
    subversion/branches/fsfs-improvements/subversion/libsvn_wc/conflicts.c
    subversion/branches/fsfs-improvements/subversion/libsvn_wc/copy.c
    subversion/branches/fsfs-improvements/subversion/libsvn_wc/deprecated.c
    subversion/branches/fsfs-improvements/subversion/libsvn_wc/diff_editor.c
    subversion/branches/fsfs-improvements/subversion/libsvn_wc/diff_local.c
    subversion/branches/fsfs-improvements/subversion/libsvn_wc/entries.c
    subversion/branches/fsfs-improvements/subversion/libsvn_wc/externals.c
    subversion/branches/fsfs-improvements/subversion/libsvn_wc/info.c
    subversion/branches/fsfs-improvements/subversion/libsvn_wc/lock.c
    subversion/branches/fsfs-improvements/subversion/libsvn_wc/node.c
    subversion/branches/fsfs-improvements/subversion/libsvn_wc/old-and-busted.c
    subversion/branches/fsfs-improvements/subversion/libsvn_wc/props.c
    subversion/branches/fsfs-improvements/subversion/libsvn_wc/revert.c
    subversion/branches/fsfs-improvements/subversion/libsvn_wc/status.c
    subversion/branches/fsfs-improvements/subversion/libsvn_wc/translate.c
    subversion/branches/fsfs-improvements/subversion/libsvn_wc/update_editor.c
    subversion/branches/fsfs-improvements/subversion/libsvn_wc/upgrade.c
    subversion/branches/fsfs-improvements/subversion/libsvn_wc/wc_db.c
    subversion/branches/fsfs-improvements/subversion/libsvn_wc/wc_db_update_move.c
    subversion/branches/fsfs-improvements/subversion/libsvn_wc/wc_db_wcroot.c
    subversion/branches/fsfs-improvements/subversion/libsvn_wc/workqueue.c
    subversion/branches/fsfs-improvements/subversion/mod_dav_svn/repos.c
    subversion/branches/fsfs-improvements/subversion/mod_dav_svn/version.c
    subversion/branches/fsfs-improvements/subversion/svn/cl-conflicts.c
    subversion/branches/fsfs-improvements/subversion/svn/commit-cmd.c
    subversion/branches/fsfs-improvements/subversion/svn/conflict-callbacks.c
    subversion/branches/fsfs-improvements/subversion/svn/diff-cmd.c
    subversion/branches/fsfs-improvements/subversion/svn/help-cmd.c
    subversion/branches/fsfs-improvements/subversion/svn/notify.c
    subversion/branches/fsfs-improvements/subversion/svn/propedit-cmd.c
    subversion/branches/fsfs-improvements/subversion/svn/propget-cmd.c
    subversion/branches/fsfs-improvements/subversion/svn/props.c
    subversion/branches/fsfs-improvements/subversion/svn/status-cmd.c
    subversion/branches/fsfs-improvements/subversion/svn/status.c
    subversion/branches/fsfs-improvements/subversion/svn/svn.c
    subversion/branches/fsfs-improvements/subversion/svn/util.c
    subversion/branches/fsfs-improvements/subversion/svn_private_config.hw
    subversion/branches/fsfs-improvements/subversion/svnadmin/svnadmin.c
    subversion/branches/fsfs-improvements/subversion/svnauth/svnauth.c
    subversion/branches/fsfs-improvements/subversion/svnlook/svnlook.c
    subversion/branches/fsfs-improvements/subversion/svnmucc/svnmucc.c
    subversion/branches/fsfs-improvements/subversion/svnrdump/dump_editor.c
    subversion/branches/fsfs-improvements/subversion/svnrdump/svnrdump.c
    subversion/branches/fsfs-improvements/subversion/svnrdump/util.c
    subversion/branches/fsfs-improvements/subversion/svnserve/serve.c
    subversion/branches/fsfs-improvements/subversion/svnsync/svnsync.c
    subversion/branches/fsfs-improvements/subversion/svnsync/sync.c
    subversion/branches/fsfs-improvements/subversion/tests/cmdline/   (props changed)
    subversion/branches/fsfs-improvements/subversion/tests/cmdline/commit_tests.py
    subversion/branches/fsfs-improvements/subversion/tests/cmdline/davautocheck.sh
    subversion/branches/fsfs-improvements/subversion/tests/libsvn_fs/fs-test.c
    subversion/branches/fsfs-improvements/subversion/tests/libsvn_repos/repos-test.c
    subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/hashdump-test.c
    subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/mergeinfo-test.c
    subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/spillbuf-test.c
    subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/string-test.c
    subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/subst_translate-test.c
    subversion/branches/fsfs-improvements/subversion/tests/libsvn_wc/conflict-data-test.c
    subversion/branches/fsfs-improvements/subversion/tests/libsvn_wc/op-depth-test.c
    subversion/branches/fsfs-improvements/subversion/tests/libsvn_wc/wc-test.c
    subversion/branches/fsfs-improvements/subversion/tests/svn_test_fs.c
    subversion/branches/fsfs-improvements/tools/dev/fsfs-reorg.c
    subversion/branches/fsfs-improvements/tools/dist/backport.pl
    subversion/branches/fsfs-improvements/tools/server-side/fsfs-stats.c
    subversion/branches/fsfs-improvements/win-tests.py

Propchange: subversion/branches/fsfs-improvements/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1506995-1509265
  Merged /subversion/branches/fsfs-format7:r1471208

Modified: subversion/branches/fsfs-improvements/COMMITTERS
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/COMMITTERS?rev=1509270&r1=1509269&r2=1509270&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/COMMITTERS [UTF-8] (original)
+++ subversion/branches/fsfs-improvements/COMMITTERS [UTF-8] Thu Aug  1 14:55:32 2013
@@ -158,6 +158,7 @@ Commit access for specific areas:
       artagnon   Ramkumar Ramachandra <artagnon@gmail.com>   (svnrdump, svntest)
          arwin   Arwin Arni <arwin@collab.net>               (svn-bisect)
           joes   Joe Schaefer <joe_schaefer@yahoo.com>       (svnpubsub)
+     humbedooh   Daniel Gruno <humbedooh@apache.org>         (svnpubsub)
       prabhugs   Prabhu Gnana Sundar <prabhugs@collab.net>   (verify-keep-going)
         schabi   Markus Schaber <schabi@apache.org>          (testsuite)
 

Modified: subversion/branches/fsfs-improvements/Makefile.in
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/Makefile.in?rev=1509270&r1=1509269&r2=1509270&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/Makefile.in (original)
+++ subversion/branches/fsfs-improvements/Makefile.in Thu Aug  1 14:55:32 2013
@@ -349,8 +349,8 @@ TEST_SHLIB_VAR_SWIG_RB=\
     done; \
     export @SVN_APR_SHLIB_PATH_VAR@; \
   fi;
- 
-APXS = @APXS@ 
+
+APXS = @APXS@
 
 PYTHON = @PYTHON@
 PERL = @PERL@

Modified: subversion/branches/fsfs-improvements/autogen.sh
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/autogen.sh?rev=1509270&r1=1509269&r2=1509270&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/autogen.sh (original)
+++ subversion/branches/fsfs-improvements/autogen.sh Thu Aug  1 14:55:32 2013
@@ -203,7 +203,7 @@ echo "./configure --enable-maintainer-mo
 echo "./configure --disable-shared"
 echo "./configure --enable-maintainer-mode --disable-shared"
 echo "./configure --disable-optimize --enable-debug"
-echo "./configure CUSERFLAGS='--flags-for-C' CXXUSERFLAGS='--flags-for-C++'"
+echo "./configure CFLAGS='--flags-for-C' CXXFLAGS='--flags-for-C++'"
 echo ""
 echo "Note:  If you wish to run a Subversion HTTP server, you will need"
 echo "Apache 2.x.  See the INSTALL file for details."

Modified: subversion/branches/fsfs-improvements/build.conf
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/build.conf?rev=1509270&r1=1509269&r2=1509270&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/build.conf (original)
+++ subversion/branches/fsfs-improvements/build.conf Thu Aug  1 14:55:32 2013
@@ -42,6 +42,7 @@ private-includes =
         subversion/bindings/cxxhl/include/svncxxhl/*.hpp
         subversion/bindings/cxxhl/src/*.hpp
         subversion/bindings/cxxhl/src/aprwrap/*.hpp
+        subversion/bindings/cxxhl/src/private/*.hpp
         subversion/libsvn_subr/utf8proc/utf8proc.h
         subversion/libsvn_subr/utf8proc/utf8proc.c
         subversion/libsvn_subr/utf8proc/utf8proc_data.c
@@ -68,6 +69,7 @@ private-built-includes =
         subversion/bindings/javahl/include/org_apache_subversion_javahl_types_VersionExtended_LoadedLib.h
         subversion/bindings/javahl/include/org_apache_subversion_javahl_types_VersionExtended_LoadedLibIterator.h
         subversion/bindings/javahl/include/org_apache_subversion_javahl_types_Revision.h
+        subversion/bindings/javahl/include/org_apache_subversion_javahl_types_RevisionRangeList.h
         subversion/bindings/javahl/include/org_apache_subversion_javahl_callback_UserPasswordCallback.h
         subversion/bindings/javahl/include/org_apache_subversion_javahl_remote_RemoteSession.h
         subversion/bindings/javahl/include/org_apache_subversion_javahl_remote_RemoteFactory.h

Modified: subversion/branches/fsfs-improvements/configure.ac
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/configure.ac?rev=1509270&r1=1509269&r2=1509270&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/configure.ac (original)
+++ subversion/branches/fsfs-improvements/configure.ac Thu Aug  1 14:55:32 2013
@@ -167,7 +167,6 @@ if test -n "$sqlite_compat_ver" && test 
 fi
 
 SVN_CHECK_FOR_ATOMIC_BUILTINS
-
 if test "$svn_cv_atomic_builtins" = "yes"; then
     AC_DEFINE(SVN_HAS_ATOMIC_BUILTINS, 1, [Define if compiler provides atomic builtins])
 fi

Modified: subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/include/svncxxhl/_compat.hpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/include/svncxxhl/_compat.hpp?rev=1509270&r1=1509269&r2=1509270&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/include/svncxxhl/_compat.hpp (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/include/svncxxhl/_compat.hpp Thu Aug  1 14:55:32 2013
@@ -85,6 +85,7 @@ using std::tr1::enable_shared_from_this;
 // ::std given known compiler characteristics, then try Boost as a
 // last resort.
 
+#define SVN_CXXHL_USING_BOOST
 #include <boost/shared_ptr.hpp>
 namespace apache {
 namespace subversion {
@@ -100,4 +101,44 @@ using boost::enable_shared_from_this;
 
 #endif  // SVN_CXXHL_HAVE_STD_SMART_PTRS
 
+// Configuration test: noncopyable mixin.
+#ifdef SVN_CXXHL_USING_BOOST
+
+#include <boost/noncopyable.hpp>
+namespace apache {
+namespace subversion {
+namespace cxxhl {
+namespace compat {
+using boost::noncopyable;
+} // namespace compat
+} // namespace cxxhl
+} // namespace subversion
+} // namespace apache
+
+#else  // !SVN_CXXHL_USING_BOOST
+
+namespace apache {
+namespace subversion {
+namespace cxxhl {
+namespace compat {
+namespace noncopyable_
+{
+class noncopyable
+{
+protected:
+  noncopyable() {}
+  ~noncopyable() {}
+private:
+  noncopyable(const noncopyable&);
+  noncopyable& operator=(const noncopyable&);
+};
+} // namespace noncopyable_
+typedef noncopyable_::noncopyable noncopyable;
+} // namespace compat
+} // namespace cxxhl
+} // namespace subversion
+} // namespace apache
+
+#endif // SVN_CXXHL_USING_BOOST
+
 #endif  // SVN_CXXHL_COMPAT_HPP

Modified: subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/include/svncxxhl/exception.hpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/include/svncxxhl/exception.hpp?rev=1509270&r1=1509269&r2=1509270&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/include/svncxxhl/exception.hpp (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/include/svncxxhl/exception.hpp Thu Aug  1 14:55:32 2013
@@ -35,9 +35,6 @@
 
 #include "svncxxhl/_compat.hpp"
 
-// Forward declaration of implementation-specific structure
-struct svn_error_t;
-
 namespace apache {
 namespace subversion {
 namespace cxxhl {
@@ -55,7 +52,7 @@ class ErrorDescription;
 class InternalError : public std::exception
 {
 public:
-  InternalError(const char* description);
+  explicit InternalError(const char* description);
 
   InternalError(const InternalError& that) throw();
   InternalError& operator= (const InternalError& that) throw();
@@ -67,10 +64,9 @@ public:
   virtual const char* what() const throw();
 
 protected:
-  InternalError(detail::ErrorDescription* description) throw();
-
-  /** Error description and trace location information. */
-  detail::ErrorDescription* m_description;
+  typedef compat::shared_ptr<detail::ErrorDescription> description_ptr;
+  explicit InternalError(description_ptr description) throw();
+  description_ptr m_description;
 };
 
 /**
@@ -79,34 +75,66 @@ protected:
 class Error : public InternalError
 {
 public:
-  typedef compat::shared_ptr<Error> shared_ptr;
-
-  Error(const char* description, int error_code);
-  Error(const char* description, int error_code, shared_ptr nested_error);
-
   Error(const Error& that) throw();
   Error& operator=(const Error& that) throw();
   virtual ~Error() throw();
 
   /**
-   * Returns the error code associated with the exception.
-   */
-  virtual int code() const throw() { return m_errno; }
-
-  /**
-   * Returns a shared pointer to the nested exception object, if any.
+   * Returns the error code associated with the top-level error that
+   * caused the exception.
    */
-  virtual shared_ptr nested() const throw() { return m_nested; }
+  virtual int code() const throw();
 
   /**
    * Error message description.
-   *
-   * The first element of this pair is the error code, the second the
-   * associated error message. If the error code is 0, the message
-   * describes the location in the source code where the error was
-   * generated from.
    */
-  typedef std::pair<int, std::string> Message;
+  class Message
+  {
+  public:
+    /**
+     * Create a message object given an error code and error message.
+     */
+    Message(int errno, const std::string& message)
+      : m_errno(errno),
+        m_message(message),
+        m_trace(false)
+      {}
+
+    /**
+     * Create a message object given an error code and error message,
+     * and set the flag that tells if this is a debugging traceback entry.
+     */
+    Message(int errno, const std::string& message, bool trace)
+      : m_errno(errno),
+        m_message(message),
+        m_trace(trace)
+      {}
+
+    /**
+     * Return the error code.
+     */
+    int code() const throw() { return m_errno; }
+
+    /**
+     * Return the error message.
+     */
+    const std::string& message() const throw() { return m_message; }
+
+    /**
+     * Return the generic error message associated with the error code.
+     */
+    const char* generic_message() const;
+
+    /**
+     * Check if this message is in fact a debugging traceback entry.
+     */
+    bool trace() const throw() { return m_trace; }
+
+  private:
+    int m_errno;
+    std::string m_message;
+    bool m_trace;
+  };
 
   /**
    * The list of messages associated with an error.
@@ -115,7 +143,7 @@ public:
 
   /**
    * Returns the complete list of error messages, including those from
-   * nested exceptions.
+   * nested errors.
    */
   virtual MessageList messages() const
     {
@@ -134,18 +162,11 @@ public:
       return compile_messages(true);
     }
 
-public:
-  /** Used internally by the implementation. */
-  static void throw_svn_error(svn_error_t*);
-
 protected:
-  Error(int error_code, detail::ErrorDescription* description) throw();
-
-private:
+  explicit Error(description_ptr description) throw()
+    : InternalError(description)
+    {}
   MessageList compile_messages(bool show_traces) const;
-
-  int m_errno;                /**< The (SVN or APR) error code. */
-  shared_ptr m_nested;        /**< Optional pointer to nessted error. */
 };
 
 /**
@@ -155,9 +176,8 @@ private:
 class Cancelled : public Error
 {
 protected:
-  friend void Error::throw_svn_error(svn_error_t*);
-  Cancelled(int error_code, detail::ErrorDescription* description) throw()
-    : Error(error_code, description)
+  explicit Cancelled(description_ptr description) throw()
+    : Error(description)
     {}
 };
 

Modified: subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/aprwrap/array.hpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/aprwrap/array.hpp?rev=1509270&r1=1509269&r2=1509270&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/aprwrap/array.hpp (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/aprwrap/array.hpp Thu Aug  1 14:55:32 2013
@@ -58,13 +58,6 @@ public:
     {}
 
   /**
-   * Create a new proxy for the APR array wrapped by @a that.
-   */
-  Array(const Array& that) throw()
-    : m_array(that.m_array)
-    {}
-
-  /**
    * Create a new proxy for the APR array @a array.
    */
   explicit Array(apr_array_header_t* array)

Modified: subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/aprwrap/hash.hpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/aprwrap/hash.hpp?rev=1509270&r1=1509269&r2=1509270&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/aprwrap/hash.hpp (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/aprwrap/hash.hpp Thu Aug  1 14:55:32 2013
@@ -103,6 +103,7 @@ public:
 public:
   typedef Key::key_type key_type;
   typedef void* value_type;
+  typedef unsigned int size_type;
 
   /**
    * Create and proxy a new APR hash table in @a pool.
@@ -120,13 +121,6 @@ public:
     {}
 
   /**
-   * Create a new proxy for the APR hash table wrapped by @a that.
-   */
-  explicit Hash(const Hash& that) throw()
-    : m_hash(that.m_hash)
-    {}
-
-  /**
    * Create a proxy for the APR hash table @a hash.
    */
   explicit Hash(apr_hash_t* hash)
@@ -136,7 +130,18 @@ public:
   /**
    * Return the wrapped APR hash table.
    */
-  apr_hash_t* hash() const throw() { return m_hash; }
+  apr_hash_t* hash() const throw()
+    {
+      return m_hash;
+    }
+
+  /**
+   * Return the number of key-value pairs in the wrapped hash table.
+   */
+  size_type size() const throw()
+    {
+      return apr_hash_count(m_hash);
+    }
 
   /**
    * Set @a key = @a value in the wrapped hash table.
@@ -275,13 +280,6 @@ public:
     {}
 
   /**
-   * Create a new proxy for the APR hash table wrapped by @a that.
-   */
-  explicit Hash(const Hash& that) throw()
-    : inherited(that)
-    {}
-
-  /**
    * Create a proxy for the APR hash table @a hash.
    */
   explicit Hash(apr_hash_t* hash)
@@ -291,7 +289,18 @@ public:
   /**
    * @return The wrapped APR hash table.
    */
-  apr_hash_t* hash() const throw() { return inherited::hash(); }
+  apr_hash_t* hash() const throw()
+    {
+      return inherited::hash();
+    }
+
+  /**
+   * Return the number of key-value pairs in the wrapped hash table.
+   */
+  size_type size() const throw()
+    {
+      return inherited::size();
+    }
 
   /**
    * Set @a key = @a value in the wrapped hash table.

Modified: subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/aprwrap/pool.hpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/aprwrap/pool.hpp?rev=1509270&r1=1509269&r2=1509270&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/aprwrap/pool.hpp (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/aprwrap/pool.hpp Thu Aug  1 14:55:32 2013
@@ -27,6 +27,7 @@
 #include <cstdlib>
 
 #include "svncxxhl/exception.hpp"
+#include "svncxxhl/_compat.hpp"
 
 #include "svn_pools.h"
 #undef TRUE
@@ -37,10 +38,13 @@ namespace subversion {
 namespace cxxhl {
 namespace apr {
 
+// Forward declaration
+class IterationPool;
+
 /**
  * Encapsulates an APR pool.
  */
-class Pool
+class Pool : compat::noncopyable
 {
 public:
   /**
@@ -53,24 +57,33 @@ public:
   /**
    * Create a pool as a child of @a parent.
    */
-  Pool(const Pool* parent) throw()
+  explicit Pool(Pool* parent) throw()
     : m_pool(svn_pool_create(parent->m_pool))
     {}
 
   /**
    * Destroy the pool.
    */
-  ~Pool() throw() { svn_pool_destroy(m_pool); }
+  ~Pool() throw()
+    {
+      svn_pool_destroy(m_pool);
+    }
 
   /**
    * Clear the pool.
    */
-  void clear() throw() { apr_pool_clear(m_pool); }
+  void clear() throw()
+    {
+      apr_pool_clear(m_pool);
+    }
 
   /**
    * Retuurn a pool pointer that can be used by the C APIs.
    */
-  apr_pool_t* get() const throw() { return m_pool; }
+  apr_pool_t* get() const throw()
+    {
+      return m_pool;
+    }
 
   /**
    * Allocate space for @a count elements of type @a T from the pool.
@@ -95,8 +108,88 @@ public:
 private:
   static apr_pool_t* get_root_pool();
   apr_pool_t* const m_pool;
+
+public:
+  /**
+   * Pool proxy used for iteration scratch pools.
+   *
+   * Construct this object inside a loop body in order to clear the
+   * proxied pool on every iteration.
+   */
+  class Iteration : compat::noncopyable
+  {
+  public:
+    /**
+     * The constructor clears the proxied pool.
+     */
+    explicit Iteration(IterationPool& iterbase) throw();
+
+    /**
+     * Returns a reference to the proxied pool.
+     */
+    Pool& pool() const throw()
+      {
+        return m_pool;
+      }
+
+    /**
+     * Proxy method for Pool::get
+     */
+    apr_pool_t* get() const throw()
+      {
+        return m_pool.get();
+      }
+
+    /**
+     * Proxy method for Pool::alloc
+     */
+    template<typename T>
+    T* alloc(std::size_t count) throw()
+      {
+        return m_pool.alloc<T>(count);
+      }
+
+    /**
+     * Proxy method for Pool::allocz
+     */
+    template<typename T>
+    T* allocz(std::size_t count) throw()
+      {
+        return m_pool.allocz<T>(count);
+      }
+
+  private:
+    Pool& m_pool;
+  };
+};
+
+/**
+ * Pool wrapper that hides the pool implementation, except for construction.
+ *
+ * Construct this object outside a loop body, then within the body,
+ * use Pool::Iteration to access the wrapped pool.
+ */
+class IterationPool : compat::noncopyable
+{
+public:
+  IterationPool() {}
+
+  explicit IterationPool(Pool* parent) throw()
+    : m_pool(parent)
+    {}
+
+private:
+  friend class Pool::Iteration;
+  Pool m_pool;
 };
 
+// Pool::Iteration constructor implementation
+inline Pool::Iteration::Iteration(IterationPool& iterbase) throw()
+  : m_pool(iterbase.m_pool)
+{
+  m_pool.clear();
+}
+
 } // namespace apr
 } // namespace cxxhl
 } // namespace subversion

Modified: subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/exception.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/exception.cpp?rev=1509270&r1=1509269&r2=1509270&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/exception.cpp (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/exception.cpp Thu Aug  1 14:55:32 2013
@@ -28,6 +28,7 @@
 #include <sstream>
 
 #include "svncxxhl/exception.hpp"
+#include "private.hpp"
 #include "aprwrap.hpp"
 
 #include "svn_error.h"
@@ -47,69 +48,59 @@ namespace detail {
 class ErrorDescription
 {
 public:
-  static ErrorDescription* create(const char* message,
-                                  const char *loc_file, long loc_line,
-                                  bool trace_link)
+  typedef compat::shared_ptr<ErrorDescription> shared_ptr;
+
+  static shared_ptr create(const char* message, int error_code,
+                           const char *loc_file, long loc_line,
+                           bool trace_link)
     {
-      bool empty_message = (message == NULL);
+      const bool empty_message = (message == NULL);
       const std::size_t length = (empty_message ? 0 : std::strlen(message));
-      void *memblock = ::operator new(length + sizeof(ErrorDescription));
+      void* memblock = ::operator new(length + sizeof(ErrorDescription));
 
       ErrorDescription* description = new(memblock) ErrorDescription(
-          loc_file, loc_line, trace_link, empty_message);
+          error_code, loc_file, loc_line, trace_link, empty_message);
       if (length)
         std::memcpy(description->m_message, message, length);
       description->m_message[length] = 0;
-      return description;
-    }
-
-  static ErrorDescription* create(const char* message)
-    {
-      return create(message, NULL, 0, false);
+      return shared_ptr(description);
     }
 
-  ErrorDescription* reference() throw()
+  static shared_ptr create(const char* message, int error_code)
     {
-      if (this)
-        svn_atomic_inc(&m_refcount);
-      return this;
+      return create(message, error_code, NULL, 0, false);
     }
 
-  ErrorDescription* dereference() throw()
-    {
-      if (this && 0 == svn_atomic_dec(&m_refcount))
-        {
-          this->~ErrorDescription();
-          ::operator delete(this, std::nothrow);
-          return NULL;
-        }
-      return this;
-    }
+  ~ErrorDescription() throw() {}
 
   const char* what() const throw() { return (m_empty ? NULL : m_message); }
+  int code() const throw() { return m_errno; }
   const char* file() const throw() { return m_loc_file; }
   long line() const throw() { return m_loc_line; }
   bool trace() const throw() { return m_trace; }
+  shared_ptr& nested() throw() { return m_nested; }
+  const shared_ptr& nested() const throw() { return m_nested; }
 
 private:
-  ErrorDescription(const char *loc_file, long loc_line,
+  ErrorDescription(int error_code,
+                   const char *loc_file, long loc_line,
                    bool trace_link, bool empty_message) throw()
     : m_loc_file(loc_file),
       m_loc_line(loc_line),
       m_trace(trace_link),
       m_empty(empty_message),
-      m_refcount(0)
+      m_errno(error_code)
     {}
 
-  ~ErrorDescription() throw() {}
-
   const char* m_loc_file;
   long m_loc_line;
   bool m_trace;
   bool m_empty;
 
-  volatile svn_atomic_t m_refcount;
-  char m_message[1];
+  shared_ptr m_nested;
+
+  int m_errno;                  ///< The (SVN or APR) error code.
+  char m_message[1];            ///< The error message
 };
 
 } // namespace detail
@@ -119,11 +110,11 @@ private:
 //
 
 InternalError::InternalError(const char* description)
-  : m_description(detail::ErrorDescription::create(description)->reference())
+  : m_description(detail::ErrorDescription::create(description, 0))
 {}
 
 InternalError::InternalError(const InternalError& that) throw()
-  : m_description(that.m_description->reference())
+  : m_description(that.m_description)
 {}
 
 InternalError& InternalError::operator=(const InternalError& that) throw()
@@ -138,17 +129,14 @@ InternalError& InternalError::operator=(
   return *new(this) InternalError(that);
 }
 
-InternalError::~InternalError() throw()
-{
-  m_description->dereference();
-}
+InternalError::~InternalError() throw() {}
 
 const char* InternalError::what() const throw()
 {
   return m_description->what();
 }
 
-InternalError::InternalError(detail::ErrorDescription* description) throw()
+InternalError::InternalError(description_ptr description) throw()
   : m_description(description)
 {}
 
@@ -156,22 +144,8 @@ InternalError::InternalError(detail::Err
 // Class Error
 //
 
-Error::Error(const char* description, int error_code)
-  : InternalError(description),
-    m_errno(error_code)
-{}
-
-Error::Error(const char* description, int error_code,
-             Error::shared_ptr nested_error)
-  : InternalError(description),
-    m_errno(error_code),
-    m_nested(nested_error)
-{}
-
 Error::Error(const Error& that) throw()
-  : InternalError(that.m_description->reference()),
-    m_errno(that.m_errno),
-    m_nested(that.m_nested)
+  : InternalError(that.m_description)
 {}
 
 Error& Error::operator=(const Error& that) throw()
@@ -188,72 +162,43 @@ Error& Error::operator=(const Error& tha
 
 Error::~Error() throw() {}
 
-Error::Error(int error_code, detail::ErrorDescription* description) throw()
-  : InternalError(description),
-    m_errno(error_code)
-{}
-
-void Error::throw_svn_error(svn_error_t* err)
+int Error::code() const throw()
 {
-  detail::ErrorDescription* description = NULL;
-  try
-    {
-      // Be very careful when creating the error descriptions, so that
-      // the exception unwinder can free them if an allocation fails.
-      // The private constructor does not increment the refcount
-      // precisely for this reason.
+  return m_description->code();
+}
 
-      shared_ptr nested;
-      shared_ptr* current = &nested;
+namespace {
+const char* get_generic_message(apr_status_t error_code,
+                                const APR::Pool& scratch_pool)
+{
+  char errorbuf[512];
 
-      bool cancelled = (err->apr_err == SVN_ERR_CANCELLED);
-      for (svn_error_t* next = err->child; next; next = next->child)
-        {
-          description = detail::ErrorDescription::create(
-              next->message, next->file, next->line,
-              svn_error__is_tracing_link(next));
-          description->reference();
-          current->reset(new Error(next->apr_err, description));
-          description = NULL;
-          current = &(*current)->m_nested;
-          if (next->apr_err == SVN_ERR_CANCELLED)
-            cancelled = true;
-        }
+  // Is this a Subversion-specific error code?
+  if (error_code > APR_OS_START_USEERR && error_code <= APR_OS_START_CANONERR)
+    return svn_strerror(error_code, errorbuf, sizeof(errorbuf));
+  // Otherwise, this must be an APR error code.
+  else
+    {
+      const char* generic;
+      svn_error_t* err = svn_utf_cstring_to_utf8(
+          &generic,
+          apr_strerror(error_code, errorbuf, sizeof(errorbuf)),
+          scratch_pool.get());
+      if (!err)
+        return generic;
 
-      const int apr_err = err->apr_err;
-      description = detail::ErrorDescription::create(
-          err->message, err->file, err->line,
-          svn_error__is_tracing_link(err));
-      description->reference();
+      // Use fuzzy transliteration instead.
       svn_error_clear(err);
-      if (cancelled)
-        {
-          Cancelled converted = Cancelled(apr_err, description);
-          description = NULL;
-          converted.m_nested = nested;
-          throw converted;
-        }
-      else
-        {
-          Error converted = Error(apr_err, description);
-          description = NULL;
-          converted.m_nested = nested;
-          throw converted;
-        }
-    }
-  catch (...)
-    {
-      description->dereference();
-      throw;
+      return svn_utf_cstring_from_utf8_fuzzy(errorbuf, scratch_pool.get());
     }
 }
 
-
-namespace {
 void handle_one_error(Error::MessageList& ml, bool show_traces,
-                      int error_code, detail::ErrorDescription* descr,
+                      const detail::ErrorDescription* descr,
                       const APR::Pool& pool)
 {
+  const int error_code = descr->code();
+
   if (show_traces && descr->file())
     {
       const char* file_utf8 = NULL;
@@ -274,15 +219,13 @@ void handle_one_error(Error::MessageList
       else
         {
 #ifdef SVN_DEBUG
-          if (const char *const symbolic_name =
-              svn_error_symbolic_name(error_code))
-            //if (symbolic_name)
+          if (const char* symbolic_name = svn_error_symbolic_name(error_code))
             buffer << ": (apr_err=" << symbolic_name << ')';
           else
 #endif
             buffer << ": (apr_err=" << error_code << ')';
         }
-      ml.push_back(Error::Message(0, buffer.str()));
+      ml.push_back(Error::Message(error_code, buffer.str(), true));
     }
 
   if (descr->trace())
@@ -290,28 +233,8 @@ void handle_one_error(Error::MessageList
 
   const char *description = descr->what();
   if (!description)
-    {
-      char errorbuf[512];
-
-      // Is this a Subversion-specific error code?
-      if (error_code > APR_OS_START_USEERR
-          && error_code <= APR_OS_START_CANONERR)
-        description = svn_strerror(error_code, errorbuf, sizeof(errorbuf));
-      // Otherwise, this must be an APR error code.
-      else
-        {
-          svn_error_t* err = svn_utf_cstring_to_utf8(
-              &description,
-              apr_strerror(error_code, errorbuf, sizeof(errorbuf)),
-              pool.get());
-          if (err)
-            {
-              svn_error_clear(err);
-              description = _("Can't recode error string from APR");
-            }
-        }
-    }
-  ml.push_back(Error::Message(error_code, std::string(description)));
+    description = get_generic_message(error_code, pool);
+  ml.push_back(Error::Message(error_code, std::string(description), false));
 }
 } // anonymous namespace
 
@@ -319,11 +242,12 @@ Error::MessageList Error::compile_messag
 {
   // Determine the maximum size of the returned list
   MessageList::size_type max_length = 0;
-  for (const Error* err = this; err; err = err->m_nested.get())
+  for (const detail::ErrorDescription* description = m_description.get();
+       description; description = description->nested().get())
     {
-      if (show_traces && m_description->file())
+      if (show_traces && description->file())
         ++max_length;                   // We will display an error location
-      if (!m_description->trace())
+      if (!description->trace())
         ++max_length;                   // Traces do not emit a message line
     }
   MessageList ml;
@@ -334,26 +258,74 @@ Error::MessageList Error::compile_messag
   std::vector<int> empties;
   empties.reserve(max_length);
 
-  APR::Pool iterpool;
-  for (const Error* err = this; err; err = err->m_nested.get())
+  APR::IterationPool iterbase;
+  for (const detail::ErrorDescription* description = m_description.get();
+       description; description = description->nested().get())
     {
-      if (!err->m_description->what())
+      APR::Pool::Iteration iterpool(iterbase);
+
+      if (!description->what())
         {
           // Non-specific messages are printed only once.
           std::vector<int>::iterator it = std::find(
-              empties.begin(), empties.end(), err->m_errno);
+              empties.begin(), empties.end(), description->code());
           if (it != empties.end())
             continue;
-          empties.push_back(err->m_errno);
+          empties.push_back(description->code());
         }
-      handle_one_error(ml, show_traces,
-                       err->m_errno, err->m_description,
-                       iterpool);
-      iterpool.clear();
+      handle_one_error(ml, show_traces, description, iterpool.pool());
     }
   return ml;
 }
 
+const char* Error::Message::generic_message() const
+{
+  APR::Pool pool;
+  return get_generic_message(m_errno, pool);
+}
+
+namespace detail {
+void checked_call(svn_error_t* err)
+{
+  if (!err)
+    return;
+
+  struct ErrorBuilder : public Error
+  {
+    explicit ErrorBuilder (ErrorDescription::shared_ptr description)
+      : Error(description)
+      {}
+  };
+
+  struct CancelledBuilder : public Cancelled
+  {
+    explicit CancelledBuilder (ErrorDescription::shared_ptr description)
+      : Cancelled(description)
+      {}
+  };
+
+  ErrorDescription::shared_ptr description;
+  ErrorDescription::shared_ptr* current = &description;
+
+  bool cancelled = false;
+  for (svn_error_t* next = err; next; next = next->child)
+    {
+      *current = ErrorDescription::create(next->message, next->apr_err,
+                                          next->file, next->line,
+                                          svn_error__is_tracing_link(next));
+      current = &(*current)->nested();
+      if (next->apr_err == SVN_ERR_CANCELLED)
+        cancelled = true;
+    }
+  svn_error_clear(err);
+
+  if (cancelled)
+    throw CancelledBuilder(description);
+  else
+    throw ErrorBuilder(description);
+}
+} // namespace detail
+
 } // namespace cxxhl
 } // namespace subversion
 } // namespace apache

Modified: subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/tests/test_aprwrap.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/tests/test_aprwrap.cpp?rev=1509270&r1=1509269&r2=1509270&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/tests/test_aprwrap.cpp (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/tests/test_aprwrap.cpp Thu Aug  1 14:55:32 2013
@@ -144,10 +144,10 @@ TEST(Arrays, Indexing)
   APR::Pool pool;
   Array array(fill_array(pool));
 
-  EXPECT_EQ(array[0], APR_ARRAY_IDX(array.array(), 0, Array::value_type));
-  EXPECT_EQ(array[array.size() - 1], APR_ARRAY_IDX(array.array(),
-                                                   array.array()->nelts - 1,
-                                                   Array::value_type));
+  EXPECT_STREQ(array[0], APR_ARRAY_IDX(array.array(), 0, Array::value_type));
+  EXPECT_STREQ(array[array.size() - 1], APR_ARRAY_IDX(array.array(),
+                                                      array.array()->nelts - 1,
+                                                      Array::value_type));
 }
 
 TEST(Arrays, CheckedIndexing)
@@ -157,10 +157,10 @@ TEST(Arrays, CheckedIndexing)
   APR::Pool pool;
   Array array(fill_array(pool));
 
-  EXPECT_EQ(array.at(0), APR_ARRAY_IDX(array.array(), 0, Array::value_type));
-  EXPECT_EQ(array.at(array.size() - 1), APR_ARRAY_IDX(array.array(),
-                                                      array.array()->nelts - 1,
-                                                      Array::value_type));
+  EXPECT_STREQ(array.at(0), APR_ARRAY_IDX(array.array(), 0, Array::value_type));
+  EXPECT_STREQ(array.at(array.size() - 1),
+               APR_ARRAY_IDX(array.array(), array.array()->nelts - 1,
+                             Array::value_type));
 }
 
 TEST(Arrays, Iteration)
@@ -178,8 +178,8 @@ TEST(Arrays, Iteration)
 
     bool operator()(Array::value_type& value)
       {
-        EXPECT_EQ(value, APR_ARRAY_IDX(m_raw_array, m_index,
-                                       Array::value_type));
+        EXPECT_STREQ(value, APR_ARRAY_IDX(m_raw_array, m_index,
+                                          Array::value_type));
         ++m_index;
         return true;
       }
@@ -207,8 +207,8 @@ TEST(Arrays, ConstIteration)
 
     bool operator()(const Array::value_type& value)
       {
-        EXPECT_EQ(value, APR_ARRAY_IDX(m_raw_array, m_index,
-                                       Array::value_type));
+        EXPECT_STREQ(value, APR_ARRAY_IDX(m_raw_array, m_index,
+                                          Array::value_type));
         ++m_index;
         return true;
       }
@@ -237,10 +237,10 @@ TEST(Arrays, Push)
   array.push("decimus");
 
   EXPECT_EQ(point + 3, array.size());
-  EXPECT_EQ(first, array[0]);
-  EXPECT_EQ(last, array[point - 1]);
-  EXPECT_EQ("octavius", array[point]);
-  EXPECT_EQ("decimus", array[array.size() - 1]);
+  EXPECT_STREQ(first, array[0]);
+  EXPECT_STREQ(last, array[point - 1]);
+  EXPECT_STREQ("octavius", array[point]);
+  EXPECT_STREQ("decimus", array[array.size() - 1]);
 }
 
 TEST(Arrays, Pop)
@@ -306,10 +306,10 @@ TEST(ConstArrays, Indexing)
   APR::Pool pool;
   Array array(fill_array(pool));
 
-  EXPECT_EQ(array[0], APR_ARRAY_IDX(array.array(), 0, Array::value_type));
-  EXPECT_EQ(array[array.size() - 1], APR_ARRAY_IDX(array.array(),
-                                                   array.array()->nelts - 1,
-                                                   Array::value_type));
+  EXPECT_STREQ(array[0], APR_ARRAY_IDX(array.array(), 0, Array::value_type));
+  EXPECT_STREQ(array[array.size() - 1], APR_ARRAY_IDX(array.array(),
+                                                      array.array()->nelts - 1,
+                                                      Array::value_type));
 }
 
 TEST(ConstArrays, CheckedIndexing)
@@ -319,10 +319,10 @@ TEST(ConstArrays, CheckedIndexing)
   APR::Pool pool;
   Array array(fill_array(pool));
 
-  EXPECT_EQ(array.at(0), APR_ARRAY_IDX(array.array(), 0, Array::value_type));
-  EXPECT_EQ(array.at(array.size() - 1), APR_ARRAY_IDX(array.array(),
-                                                      array.array()->nelts - 1,
-                                                      Array::value_type));
+  EXPECT_STREQ(array.at(0), APR_ARRAY_IDX(array.array(), 0, Array::value_type));
+  EXPECT_STREQ(array.at(array.size() - 1),
+               APR_ARRAY_IDX(array.array(), array.array()->nelts - 1,
+                             Array::value_type));
 }
 
 TEST(ConstArrays, Iteration)
@@ -340,8 +340,8 @@ TEST(ConstArrays, Iteration)
 
     bool operator()(const Array::value_type& value)
       {
-        EXPECT_EQ(value, APR_ARRAY_IDX(m_raw_array, m_index,
-                                       Array::value_type));
+        EXPECT_STREQ(value, APR_ARRAY_IDX(m_raw_array, m_index,
+                                          Array::value_type));
         ++m_index;
         return true;
       }
@@ -358,58 +358,78 @@ TEST(ConstArrays, Iteration)
 // Hash tables
 //
 
-// TODO: Convert to gmock
+TEST(Hashes, StringHash)
+{
+  typedef APR::Hash<char, const char> H;
+
+  APR::Pool pool;
+  H hash(pool);
+  hash.set("aa", "a");
+  hash.set("bbb", "b");
+  hash.set("cccc", "c");
 
-#include "../src/aprwrap.hpp"
-static void hashtest()
+  EXPECT_EQ(3, hash.size());
+  EXPECT_STREQ("a", hash.get("aa"));
+  EXPECT_STREQ("b", hash.get("bbb"));
+  EXPECT_STREQ("c", hash.get("cccc"));
+}
+
+TEST(Hashes, FixedStringHash)
 {
+  // The point of this test is to verify that the key-length parameter
+  // of the template actually limits the lenght of the keys.
   typedef APR::Hash<char, const char, 2> H;
-  typedef APR::Array<H::key_type> A;
-  typedef APR::ConstArray<A::value_type> CA;
 
   APR::Pool pool;
-  struct CB : public H::Iteration
-  {
-    A m_keys;
+  H hash(pool);
+  hash.set("aa&qux", "a");
+  hash.set("bb#foo", "b");
+  hash.set("cc@bar", "c");
 
-    CB(const APR::Pool& array_pool)
-      : m_keys(array_pool)
-      {}
+  EXPECT_EQ(3, hash.size());
+  EXPECT_STREQ("a", hash.get("aa%foo"));
+  EXPECT_STREQ("b", hash.get("bb*bar"));
+  EXPECT_STREQ("c", hash.get("cc$qux"));
+}
 
-    bool operator() (const H::Key& key, H::value_type value)
-      {
-        m_keys.push(key.get());
-        return true;
-      }
-  } hash_callback(pool);
+TEST(Hashes, Delete)
+{
+  typedef APR::Hash<char, const char> H;
 
+  APR::Pool pool;
   H hash(pool);
+  hash.set("aa", "a");
+  hash.set("bbb", "b");
+  hash.set("cccc", "c");
+
+  hash.del("bbb");
 
-  hash.set("a", "aaa");
-  hash.set("c", "ccc");
-  hash.set("x", "bbb");
+  EXPECT_EQ(2, hash.size());
+  EXPECT_STREQ("a", hash.get("aa"));
+  EXPECT_STREQ("c", hash.get("cccc"));
+}
 
-  hash.iterate(hash_callback, pool);
+TEST(Hashes, Iterate)
+{
+  typedef APR::Hash<char, const char> H;
 
-  struct AB : public A::ConstIteration
-  {
-    const H& m_hash;
+  APR::Pool pool;
+  H hash(pool);
+  hash.set("aa", "a");
+  hash.set("bbb", "b");
+  hash.set("cccc", "c");
 
-    AB(const H& hash_reference)
-      : m_hash(hash_reference)
-      {}
+  struct C : public H::Iteration
+  {
+    H& m_hash;
+    explicit C(H& hashref) : m_hash(hashref) {}
 
-    bool operator() (const A::value_type& value)
+    bool operator()(const H::Key& key, H::value_type value)
       {
-        std::cerr << value << " = " << m_hash.get(value) <<  std::endl;
+        EXPECT_STREQ(value, m_hash.get(key));
         return true;
       }
-  } array_callback(hash);
-
-  CA keys(hash_callback.m_keys);
-  keys.iterate(array_callback);
+  } callback(hash);
 
-  std::cerr << keys[0] << " maps to " << hash_callback.m_keys[0] << std::endl;
-  std::cerr << keys.at(1) << " maps to " << hash_callback.m_keys.at(1) << std::endl;
-  std::cerr << keys[2] << " maps to " << hash_callback.m_keys[2] << std::endl;
+  hash.iterate(callback, pool);
 }

Modified: subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/tests/test_exception.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/tests/test_exception.cpp?rev=1509270&r1=1509269&r2=1509270&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/tests/test_exception.cpp (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/tests/test_exception.cpp Thu Aug  1 14:55:32 2013
@@ -19,8 +19,6 @@
  * ====================================================================
  */
 
-// ### TODO: Convert to Googlemock/Googletest
-
 #include <algorithm>
 #include <cstdio>
 #include <iomanip>
@@ -28,52 +26,16 @@
 #include <iostream>
 
 #include "svncxxhl.hpp"
+#include "../src/private.hpp"
 
 #include <apr.h>
 #include "svn_error.h"
+#undef TRUE
+#undef FALSE
 
-namespace {
-void trace(const SVN::Error::Message& msg)
-{
-  std::cout << "    ";
-  if (msg.first)
-    std::cout << "test_exception: E"
-              << std::setw(6) << std::setfill('0') << std::right
-              << msg.first << ':' << ' ';
-  std::cout << msg.second << std::endl;
-}
-
-void traceall(const char *message, const SVN::Error& err)
-{
-  typedef SVN::Error::MessageList MessageList;
-  std::cout << message << std::endl;
-  std::cout << "Traced Messages:" << std::endl;
-  MessageList ml = err.traced_messages();
-  std::for_each(ml.begin(), ml.end(), trace);
-  std::cout << "Just Messages:" << std::endl;
-  ml = err.messages();
-  std::for_each(ml.begin(), ml.end(), trace);
-}
-
-void tracecheck(svn_error_t* err)
-{
-  std::cout << "C-API handler:" << std::endl;
-  svn_handle_error2(err, stdout, false, "    test_exception: ");
-  svn_error_clear(err);
-}
-
-svn_error_t* make_cancel_test_error()
-{
-  svn_error_t* err;
-  err = svn_error_create(SVN_ERR_CANCELLED, NULL, NULL);
-  err = svn_error_create(SVN_ERR_CANCELLED, err, NULL);
-  err = svn_error_trace(err);
-  err = svn_error_create(SVN_ERR_TEST_FAILED, err, "original message");
-  err = svn_error_create(SVN_ERR_BASE, err, "wrapper message");
-  err = svn_error_trace(err);
-  return err;
-}
+#include <gmock/gmock.h>
 
+namespace {
 svn_error_t* make_error_test_error()
 {
   svn_error_t* err;
@@ -87,64 +49,85 @@ svn_error_t* make_error_test_error()
 }
 } // anonymous namespace
 
-
-bool test_cancel()
+TEST(Exceptions, CatchError)
 {
   try
     {
-      SVN::Error::throw_svn_error(make_cancel_test_error());
-    }
-  catch (const SVN::Cancelled& err)
-    {
-      traceall("Caught: CANCELLED", err);
-      tracecheck(make_cancel_test_error());
-      return true;
+      SVN::detail::checked_call(make_error_test_error());
     }
   catch (const SVN::Error& err)
     {
-      traceall("Caught: ERROR", err);
-      tracecheck(make_cancel_test_error());
-      return false;
+      SVN::Error::MessageList ml = err.messages();
+      EXPECT_EQ(3, ml.size());
+      EXPECT_EQ(SVN_ERR_UNSUPPORTED_FEATURE, ml[0].code());
+      EXPECT_EQ(SVN_ERR_BASE, ml[1].code());
+      EXPECT_EQ(SVN_ERR_TEST_FAILED, ml[2].code());
+
+      SVN::Error::MessageList tml = err.traced_messages();
+#ifdef SVN_DEBUG
+      EXPECT_EQ(8, tml.size());
+      EXPECT_EQ(SVN_ERR_UNSUPPORTED_FEATURE, tml[0].code());
+      EXPECT_EQ(SVN_ERR_UNSUPPORTED_FEATURE, tml[1].code());
+      EXPECT_EQ(SVN_ERR_UNSUPPORTED_FEATURE, tml[2].code());
+      EXPECT_EQ(SVN_ERR_BASE, tml[3].code());
+      EXPECT_EQ(SVN_ERR_BASE, tml[4].code());
+      EXPECT_EQ(SVN_ERR_BASE, tml[5].code());
+      EXPECT_EQ(SVN_ERR_TEST_FAILED, tml[6].code());
+      EXPECT_EQ(SVN_ERR_TEST_FAILED, tml[7].code());
+#else  // !SVN_DEBUG
+      EXPECT_EQ(3, tml.size());
+      EXPECT_EQ(SVN_ERR_UNSUPPORTED_FEATURE, tml[0].code());
+      EXPECT_EQ(SVN_ERR_BASE, tml[1].code());
+      EXPECT_EQ(SVN_ERR_TEST_FAILED, tml[2].code());
+#endif // SVN_DEBUG
     }
-  catch (...)
-    {
-      return false;
-    }
-  return false;
 }
 
-int test_error()
+
+namespace {
+svn_error_t* make_cancel_test_error()
+{
+  svn_error_t* err;
+  err = svn_error_create(SVN_ERR_CANCELLED, NULL, NULL);
+  err = svn_error_create(SVN_ERR_CANCELLED, err, NULL);
+  err = svn_error_trace(err);
+  err = svn_error_create(SVN_ERR_TEST_FAILED, err, "original message");
+  err = svn_error_create(SVN_ERR_BASE, err, "wrapper message");
+  err = svn_error_trace(err);
+  return err;
+}
+} // anonymous namespace
+
+TEST(Exceptions, CatchCancelled)
 {
   try
     {
-      SVN::Error::throw_svn_error(make_error_test_error());
+      SVN::detail::checked_call(make_cancel_test_error());
     }
   catch (const SVN::Cancelled& err)
     {
-      traceall("Caught: CANCELLED", err);
-      tracecheck(make_error_test_error());
-      return false;
-    }
-  catch (const SVN::Error& err)
-    {
-      traceall("Caught: ERROR", err);
-      tracecheck(make_error_test_error());
-      return true;
-    }
-  catch (...)
-    {
-      return false;
+      SVN::Error::MessageList ml = err.messages();
+      EXPECT_EQ(3, ml.size());
+      EXPECT_EQ(SVN_ERR_BASE, ml[0].code());
+      EXPECT_EQ(SVN_ERR_TEST_FAILED, ml[1].code());
+      EXPECT_EQ(SVN_ERR_CANCELLED, ml[2].code());
+
+      SVN::Error::MessageList tml = err.traced_messages();
+#ifdef SVN_DEBUG
+      EXPECT_EQ(8, tml.size());
+      EXPECT_EQ(SVN_ERR_BASE, tml[0].code());
+      EXPECT_EQ(SVN_ERR_BASE, tml[1].code());
+      EXPECT_EQ(SVN_ERR_BASE, tml[2].code());
+      EXPECT_EQ(SVN_ERR_TEST_FAILED, tml[3].code());
+      EXPECT_EQ(SVN_ERR_TEST_FAILED, tml[4].code());
+      EXPECT_EQ(SVN_ERR_CANCELLED, tml[5].code());
+      EXPECT_EQ(SVN_ERR_CANCELLED, tml[6].code());
+      EXPECT_EQ(SVN_ERR_CANCELLED, tml[7].code());
+#else  // !SVN_DEBUG
+      EXPECT_EQ(3, tml.size());
+      EXPECT_EQ(SVN_ERR_BASE, tml[0].code());
+      EXPECT_EQ(SVN_ERR_TEST_FAILED, tml[1].code());
+      EXPECT_EQ(SVN_ERR_CANCELLED, tml[2].code());
+#endif // SVN_DEBUG
     }
-  return false;
-}
-
-#include <gmock/gmock.h>
-
-TEST(Exceptions, DummyTest)
-{
-  const char *stat  = (test_cancel() ? "OK" : "ERROR");
-  std::cerr << "test_cancel .... " << stat << std::endl;
-
-  stat = (test_error() ? "OK" : "ERROR");
-  std::cerr << "test_error ..... " << stat << std::endl;
 }

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/CreateJ.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/CreateJ.cpp?rev=1509270&r1=1509269&r2=1509270&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/CreateJ.cpp (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/CreateJ.cpp Thu Aug  1 14:55:32 2013
@@ -30,6 +30,7 @@
 #include "JNIStringHolder.h"
 #include "EnumMapper.h"
 #include "RevisionRange.h"
+#include "RevisionRangeList.h"
 #include "CreateJ.h"
 #include "../include/org_apache_subversion_javahl_types_Revision.h"
 #include "../include/org_apache_subversion_javahl_CommitItemStateFlags.h"
@@ -1073,58 +1074,6 @@ CreateJ::CommitInfo(const svn_commit_inf
 }
 
 jobject
-CreateJ::RevisionRangeList(svn_rangelist_t *ranges)
-{
-  JNIEnv *env = JNIUtil::getEnv();
-
-  // Create a local frame for our references
-  env->PushLocalFrame(LOCAL_FRAME_SIZE);
-  if (JNIUtil::isJavaExceptionThrown())
-    return NULL;
-
-  jclass clazz = env->FindClass("java/util/ArrayList");
-  if (JNIUtil::isJavaExceptionThrown())
-    POP_AND_RETURN_NULL;
-
-  static jmethodID init_mid = 0;
-  if (init_mid == 0)
-    {
-      init_mid = env->GetMethodID(clazz, "<init>", "()V");
-      if (JNIUtil::isJavaExceptionThrown())
-        POP_AND_RETURN_NULL;
-    }
-
-  static jmethodID add_mid = 0;
-  if (add_mid == 0)
-    {
-      add_mid = env->GetMethodID(clazz, "add", "(Ljava/lang/Object;)Z");
-      if (JNIUtil::isJavaExceptionThrown())
-        POP_AND_RETURN_NULL;
-    }
-
-  jobject jranges = env->NewObject(clazz, init_mid);
-
-  for (int i = 0; i < ranges->nelts; ++i)
-    {
-      // Convert svn_merge_range_t *'s to Java RevisionRange objects.
-      svn_merge_range_t *range =
-          APR_ARRAY_IDX(ranges, i, svn_merge_range_t *);
-
-      jobject jrange = RevisionRange::makeJRevisionRange(range);
-      if (JNIUtil::isJavaExceptionThrown())
-        POP_AND_RETURN_NULL;
-
-      env->CallBooleanMethod(jranges, add_mid, jrange);
-      if (JNIUtil::isJavaExceptionThrown())
-        POP_AND_RETURN_NULL;
-
-      env->DeleteLocalRef(jrange);
-    }
-
-  return env->PopLocalFrame(jranges);
-}
-
-jobject
 CreateJ::StringSet(const apr_array_header_t *strings)
 {
   std::vector<jobject> jstrs;
@@ -1370,7 +1319,7 @@ jobject CreateJ::Mergeinfo(svn_mergeinfo
       jstring jpath =
         JNIUtil::makeJString(static_cast<const char*>(path));
       jobject jranges =
-        RevisionRangeList(static_cast<svn_rangelist_t*>(val));
+        RevisionRangeList(static_cast<svn_rangelist_t*>(val)).toList();
 
       env->CallVoidMethod(jmergeinfo, addRevisions, jpath, jranges);
 

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/CreateJ.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/CreateJ.h?rev=1509270&r1=1509269&r2=1509270&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/CreateJ.h (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/CreateJ.h Thu Aug  1 14:55:32 2013
@@ -82,9 +82,6 @@ class CreateJ
   CommitInfo(const svn_commit_info_t *info);
 
   static jobject
-  RevisionRangeList(svn_rangelist_t *ranges);
-
-  static jobject
   StringSet(const apr_array_header_t *strings);
 
   static jobject

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RemoteSession.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RemoteSession.cpp?rev=1509270&r1=1509269&r2=1509270&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RemoteSession.cpp (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RemoteSession.cpp Thu Aug  1 14:55:32 2013
@@ -924,9 +924,265 @@ RemoteSession::checkPath(jstring jpath, 
   return EnumMapper::mapNodeKind(kind);
 }
 
-// TODO: stat
-// TODO: getLocations
-// TODO: getLocationSegments
+jobject
+RemoteSession::stat(jstring jpath, jlong jrevision)
+{
+  SVN::Pool subPool(pool);
+  Relpath path(jpath, subPool);
+  if (JNIUtil::isExceptionThrown())
+    return NULL;
+  SVN_JNI_ERR(path.error_occurred(), NULL);
+
+  svn_dirent_t* dirent;
+  SVN_JNI_ERR(svn_ra_stat(m_session, path.c_str(),
+                          svn_revnum_t(jrevision),
+                          &dirent, subPool.getPool()),
+              NULL);
+
+  if (dirent)
+    return CreateJ::DirEntry(path.c_str(), path.c_str(), dirent);
+  return NULL;
+}
+
+namespace {
+apr_array_header_t*
+long_iterable_to_revnum_array(jobject jlong_iterable, apr_pool_t* pool)
+{
+
+  JNIEnv* env = JNIUtil::getEnv();
+
+  jclass cls = env->FindClass("java/lang/Long");
+  if (JNIUtil::isExceptionThrown())
+    return NULL;
+
+  static jmethodID mid = 0;
+  if (0 == mid)
+    {
+      mid = env->GetMethodID(cls, "longValue", "()J");
+      if (JNIUtil::isExceptionThrown())
+        return NULL;
+    }
+
+  apr_array_header_t* array = apr_array_make(pool, 0, sizeof(svn_revnum_t));
+  Iterator iter(jlong_iterable);
+  while (iter.hasNext())
+    {
+      const jlong entry = env->CallLongMethod(iter.next(), mid);
+      if (JNIUtil::isExceptionThrown())
+        return NULL;
+      APR_ARRAY_PUSH(array, svn_revnum_t) = svn_revnum_t(entry);
+    }
+  return array;
+}
+
+jobject
+location_hash_to_map(apr_hash_t* locations, apr_pool_t* scratch_pool)
+{
+  JNIEnv* env = JNIUtil::getEnv();
+
+  jclass long_cls = env->FindClass("java/lang/Long");
+  if (JNIUtil::isExceptionThrown())
+    return NULL;
+
+  static jmethodID long_ctor = 0;
+  if (0 == long_ctor)
+    {
+      long_ctor = env->GetMethodID(long_cls, "<init>", "(J)V");
+      if (JNIUtil::isExceptionThrown())
+        return NULL;
+    }
+
+  jclass hash_cls = env->FindClass("java/util/HashMap");
+  if (JNIUtil::isExceptionThrown())
+    return NULL;
+
+  static jmethodID hash_ctor = 0;
+  if (0 == hash_ctor)
+    {
+      hash_ctor = env->GetMethodID(hash_cls, "<init>", "()V");
+      if (JNIUtil::isExceptionThrown())
+        return NULL;
+    }
+
+  static jmethodID hash_put = 0;
+  if (0 == hash_put)
+    {
+      hash_put = env->GetMethodID(hash_cls, "put",
+                                  "(Ljava/lang/Object;Ljava/lang/Object;"
+                                  ")Ljava/lang/Object;");
+      if (JNIUtil::isExceptionThrown())
+        return NULL;
+    }
+
+  jobject result = env->NewObject(hash_cls, hash_ctor);
+  if (JNIUtil::isExceptionThrown())
+    return NULL;
+
+  if (!locations)
+    return result;
+
+  for (apr_hash_index_t* hi = apr_hash_first(scratch_pool, locations);
+       hi; hi = apr_hash_next(hi))
+    {
+      const void* key;
+      void* val;
+
+      apr_hash_this(hi, &key, NULL, &val);
+
+      jobject jkey = env->NewObject(
+          long_cls, long_ctor, jlong(*static_cast<const svn_revnum_t*>(key)));
+      if (JNIUtil::isExceptionThrown())
+        return NULL;
+      jstring jval = JNIUtil::makeJString(static_cast<const char*>(val));
+      if (JNIUtil::isExceptionThrown())
+        return NULL;
+
+      env->CallObjectMethod(result, hash_put, jkey, jval);
+      if (JNIUtil::isExceptionThrown())
+        return NULL;
+
+      env->DeleteLocalRef(jkey);
+      env->DeleteLocalRef(jval);
+    }
+
+  return result;
+}
+} // anonymous namespace
+
+jobject
+RemoteSession::getLocations(jstring jpath, jlong jpeg_revision,
+                            jobject jlocation_revisions)
+{
+  if (!jpath || !jlocation_revisions)
+    return NULL;
+
+  SVN::Pool subPool(pool);
+  Relpath path(jpath, subPool);
+  if (JNIUtil::isExceptionThrown())
+    return NULL;
+  SVN_JNI_ERR(path.error_occurred(), NULL);
+
+  apr_array_header_t* location_revisions =
+    long_iterable_to_revnum_array(jlocation_revisions, subPool.getPool());
+  if (!location_revisions)
+    return NULL;
+
+  apr_hash_t* locations;
+  SVN_JNI_ERR(svn_ra_get_locations(m_session, &locations,
+                                   path.c_str(), svn_revnum_t(jpeg_revision),
+                                   location_revisions, subPool.getPool()),
+              NULL);
+  return location_hash_to_map(locations, subPool.getPool());
+}
+
+namespace {
+class LocationSegmentHandler
+{
+public:
+  static svn_error_t* callback(svn_location_segment_t* segment,
+                               void* baton, apr_pool_t*)
+    {
+      LocationSegmentHandler* const self =
+        static_cast<LocationSegmentHandler*>(baton);
+      SVN_ERR_ASSERT(self->m_jresult_list != NULL);
+      self->add(segment);
+      SVN_ERR(JNIUtil::checkJavaException(SVN_ERR_BASE));
+      return SVN_NO_ERROR;
+    }
+
+  LocationSegmentHandler()
+    : m_jresult_list(NULL)
+    {
+      JNIEnv* env = JNIUtil::getEnv();
+      jclass cls = env->FindClass("java/util/ArrayList");
+      if (JNIUtil::isJavaExceptionThrown())
+        return;
+
+      static jmethodID mid = 0;
+      if (mid == 0)
+        {
+          mid = env->GetMethodID(cls, "<init>", "()V");
+          if (JNIUtil::isJavaExceptionThrown())
+            return;
+        }
+
+      jobject jresult_list = env->NewObject(cls, mid);
+      if (!JNIUtil::isJavaExceptionThrown() && jresult_list)
+        m_jresult_list = jresult_list;
+    }
+
+  jobject get() const { return m_jresult_list; }
+
+private:
+  void add(svn_location_segment_t* segment)
+    {
+      JNIEnv* env = JNIUtil::getEnv();
+      jclass cls = env->FindClass(JAVA_PACKAGE"/ISVNRemote$LocationSegment");
+      if (JNIUtil::isJavaExceptionThrown())
+        return;
+
+      static jmethodID mid = 0;
+      if (mid == 0)
+        {
+          mid = env->GetMethodID(cls, "<init>",
+                                 "(Ljava/lang/String;JJ)V");
+          if (JNIUtil::isJavaExceptionThrown())
+            return;
+        }
+
+      static jmethodID mid_add = 0;
+      if (mid_add == 0)
+        {
+          jclass list_cls = env->FindClass("java/util/ArrayList");
+          if (JNIUtil::isJavaExceptionThrown())
+            return;
+          mid_add = env->GetMethodID(list_cls, "add",
+                                     "(Ljava/lang/Object;)Z");
+          if (JNIUtil::isJavaExceptionThrown())
+            return;
+        }
+
+      jstring jpath = JNIUtil::makeJString(segment->path);
+      if (JNIUtil::isJavaExceptionThrown())
+        return;
+
+      env->CallBooleanMethod(m_jresult_list, mid_add,
+                             env->NewObject(cls, mid, jpath,
+                                            jlong(segment->range_start),
+                                            jlong(segment->range_end)));
+      if (JNIUtil::isJavaExceptionThrown())
+        return;
+      env->DeleteLocalRef(jpath);
+    }
+
+  jobject m_jresult_list;
+};
+} // anonymous namespace
+
+jobject
+RemoteSession::getLocationSegments(jstring jpath, jlong jpeg_revision,
+                                   jlong jstart_revision, jlong jend_revision)
+{
+  SVN::Pool subPool(pool);
+  Relpath path(jpath, subPool);
+  if (JNIUtil::isExceptionThrown())
+    return NULL;
+  SVN_JNI_ERR(path.error_occurred(), NULL);
+
+  LocationSegmentHandler handler;
+  if (JNIUtil::isExceptionThrown())
+    return NULL;
+
+  SVN_JNI_ERR(svn_ra_get_location_segments(m_session, path.c_str(),
+                                           svn_revnum_t(jpeg_revision),
+                                           svn_revnum_t(jstart_revision),
+                                           svn_revnum_t(jend_revision),
+                                           handler.callback, &handler,
+                                           subPool.getPool()),
+              NULL);
+  return handler.get();
+}
+
 // TODO: getFileRevisions
 // TODO: lock
 // TODO: unlock

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RemoteSession.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RemoteSession.h?rev=1509270&r1=1509269&r2=1509270&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RemoteSession.h (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RemoteSession.h Thu Aug  1 14:55:32 2013
@@ -92,9 +92,11 @@ class RemoteSession : public SVNBase
                 jboolean jinclude_merged_revisions,
                 jobject jrevprops, jobject jlog_callback);
     jobject checkPath(jstring jpath, jlong jrevision);
-    // TODO: stat
-    // TODO: getLocations
-    // TODO: getLocationSegments
+    jobject stat(jstring jpath, jlong jrevision);
+    jobject getLocations(jstring jpath, jlong jpeg_revision,
+                         jobject jlocation_revisions);
+    jobject getLocationSegments(jstring jpath, jlong jpeg_revision,
+                                jlong jstart_revision, jlong jend_revision);
     // TODO: getFileRevisions
     // TODO: lock
     // TODO: unlock

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RevisionRange.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RevisionRange.cpp?rev=1509270&r1=1509269&r2=1509270&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RevisionRange.cpp (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RevisionRange.cpp Thu Aug  1 14:55:32 2013
@@ -44,60 +44,117 @@ RevisionRange::~RevisionRange()
     // explicitly destroyed.
 }
 
-const svn_opt_revision_range_t *RevisionRange::toRange(SVN::Pool &pool) const
+namespace {
+void get_range_info(jobject jrange,
+                    svn_opt_revision_t* range_start,
+                    svn_opt_revision_t* range_end,
+                    svn_boolean_t* range_inheritable)
 {
   JNIEnv *env = JNIUtil::getEnv();
 
   jclass clazz = env->FindClass(JAVA_PACKAGE"/types/RevisionRange");
   if (JNIUtil::isExceptionThrown())
-    return NULL;
+    return;
 
-  static jmethodID fmid = 0;
-  if (fmid == 0)
+  if (range_start)
     {
-      fmid = env->GetMethodID(clazz, "getFromRevision",
-                              "()L"JAVA_PACKAGE"/types/Revision;");
-      if (JNIUtil::isJavaExceptionThrown())
-        return NULL;
+
+      static jmethodID fmid = 0;
+      if (fmid == 0)
+        {
+          fmid = env->GetMethodID(clazz, "getFromRevision",
+                                  "()L"JAVA_PACKAGE"/types/Revision;");
+          if (JNIUtil::isJavaExceptionThrown())
+            return;
+        }
+
+      jobject jstartRevision = env->CallObjectMethod(jrange, fmid);
+      if (JNIUtil::isExceptionThrown())
+        return;
+
+      Revision startRevision(jstartRevision);
+      if (JNIUtil::isExceptionThrown())
+        return;
+
+      *range_start = *startRevision.revision();
+      if (JNIUtil::isExceptionThrown())
+        return;
     }
 
-  static jmethodID tmid = 0;
-  if (tmid == 0)
+  if (range_end)
     {
-      tmid = env->GetMethodID(clazz, "getToRevision",
-                              "()L"JAVA_PACKAGE"/types/Revision;");
-      if (JNIUtil::isJavaExceptionThrown())
-        return NULL;
+      static jmethodID tmid = 0;
+      if (tmid == 0)
+        {
+          tmid = env->GetMethodID(clazz, "getToRevision",
+                                  "()L"JAVA_PACKAGE"/types/Revision;");
+          if (JNIUtil::isJavaExceptionThrown())
+            return;
+        }
+
+      jobject jendRevision = env->CallObjectMethod(jrange, tmid);
+      if (JNIUtil::isExceptionThrown())
+        return;
+
+      Revision endRevision(jendRevision);
+      if (JNIUtil::isExceptionThrown())
+        return;
+
+      *range_end = *endRevision.revision();
+      if (JNIUtil::isExceptionThrown())
+        return;
     }
 
-  jobject jstartRevision = env->CallObjectMethod(m_range, fmid);
-  if (JNIUtil::isExceptionThrown())
-    return NULL;
+  if (range_inheritable)
+    {
+      static jmethodID imid = 0;
+      if (imid == 0 && range_inheritable)
+        {
+          imid = env->GetMethodID(clazz, "isInheritable", "()Z");
+          if (JNIUtil::isJavaExceptionThrown())
+            return;
+        }
+
+      jboolean inheritable = env->CallBooleanMethod(jrange, imid);
+      if (JNIUtil::isExceptionThrown())
+        return;
+      *range_inheritable = inheritable;
+    }
+}
+} // anonymous namespace
 
-  Revision startRevision(jstartRevision);
+svn_merge_range_t* RevisionRange::toMergeRange(SVN::Pool &pool) const
+{
+  svn_opt_revision_t range_start, range_end;
+  svn_boolean_t range_inheritable;
+  get_range_info(m_range, &range_start, &range_end, &range_inheritable);
   if (JNIUtil::isExceptionThrown())
     return NULL;
 
-  jobject jendRevision = env->CallObjectMethod(m_range, tmid);
-  if (JNIUtil::isExceptionThrown())
-    return NULL;
+  if (range_start.kind != svn_opt_revision_number
+      || range_end.kind != svn_opt_revision_number)
+    JNIUtil::raiseThrowable("java.lang.InvalidStateException",
+                            "Revsision ranges must contain revision numbers");
 
-  Revision endRevision(jendRevision);
-  if (JNIUtil::isExceptionThrown())
-    return NULL;
+  svn_merge_range_t* range =
+    static_cast<svn_merge_range_t*>
+      (apr_palloc(pool.getPool(), sizeof(*range)));
+
+  range->start = range_start.value.number;
+  range->end = range_end.value.number;
+  range->inheritable = range_inheritable;
+  return range;
+}
 
+svn_opt_revision_range_t *RevisionRange::toRange(SVN::Pool &pool) const
+{
   svn_opt_revision_range_t *range =
-    reinterpret_cast<svn_opt_revision_range_t *>
+    static_cast<svn_opt_revision_range_t *>
       (apr_palloc(pool.getPool(), sizeof(*range)));
 
-  range->start = *startRevision.revision();
-  if (JNIUtil::isExceptionThrown())
-    return NULL;
-
-  range->end = *endRevision.revision();
+  get_range_info(m_range, &range->start, &range->end, NULL);
   if (JNIUtil::isExceptionThrown())
-    return NULL;
-
+    range = NULL;
   return range;
 }
 

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RevisionRange.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RevisionRange.h?rev=1509270&r1=1509269&r2=1509270&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RevisionRange.h (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RevisionRange.h Thu Aug  1 14:55:32 2013
@@ -29,6 +29,7 @@
 
 #include <jni.h>
 #include "svn_types.h"
+#include "svn_opt.h"
 
 #include "Pool.h"
 
@@ -53,7 +54,12 @@ class RevisionRange
   /**
    * Return an svn_opt_revision_range_t.
    */
-  const svn_opt_revision_range_t *toRange(SVN::Pool &pool) const;
+  svn_opt_revision_range_t *toRange(SVN::Pool &pool) const;
+
+  /**
+   * Return an svn_merge_range_t.
+   */
+  svn_merge_range_t* toMergeRange(SVN::Pool &pool) const;
 
   /**
    * Make a (single) RevisionRange Java object.

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_ConfigImpl_Category.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_ConfigImpl_Category.cpp?rev=1509270&r1=1509269&r2=1509270&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_ConfigImpl_Category.cpp (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_ConfigImpl_Category.cpp Thu Aug  1 14:55:32 2013
@@ -33,9 +33,9 @@
 #include "CreateJ.h"
 #include "EnumMapper.h"
 
+#include "svn_private_config.h"
 #include "svn_config.h"
 #include "svn_hash.h"
-#include "svn_private_config.h"
 
 #include <string>
 #include <vector>

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteSession.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteSession.cpp?rev=1509270&r1=1509269&r2=1509270&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteSession.cpp (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteSession.cpp Thu Aug  1 14:55:32 2013
@@ -272,9 +272,42 @@ Java_org_apache_subversion_javahl_remote
   return ras->checkPath(jpath, jrevision);
 }
 
-// TODO: stat
-// TODO: getLocations
-// TODO: getLocationSegments
+JNIEXPORT jobject JNICALL
+Java_org_apache_subversion_javahl_remote_RemoteSession_stat(
+    JNIEnv *env, jobject jthis, jstring jpath, jlong jrevision)
+{
+  JNIEntry(SVNReposAccess, stat);
+  RemoteSession *ras = RemoteSession::getCppObject(jthis);
+  CPPADDR_NULL_PTR(ras, NULL);
+
+  return ras->stat(jpath, jrevision);
+}
+
+JNIEXPORT jobject JNICALL
+Java_org_apache_subversion_javahl_remote_RemoteSession_getLocations(
+    JNIEnv *env, jobject jthis, jstring jpath, jlong jpeg_revision,
+    jobject jlocation_revisions)
+{
+  JNIEntry(SVNReposAccess, getLocations);
+  RemoteSession *ras = RemoteSession::getCppObject(jthis);
+  CPPADDR_NULL_PTR(ras, NULL);
+
+  return ras->getLocations(jpath, jpeg_revision, jlocation_revisions);
+}
+
+JNIEXPORT jobject JNICALL
+Java_org_apache_subversion_javahl_remote_RemoteSession_getLocationSegments(
+    JNIEnv *env, jobject jthis, jstring jpath, jlong jpeg_revision,
+    jlong jstart_revision, jlong jend_revision)
+{
+  JNIEntry(SVNReposAccess, getLocationSegments);
+  RemoteSession *ras = RemoteSession::getCppObject(jthis);
+  CPPADDR_NULL_PTR(ras, NULL);
+
+  return ras->getLocationSegments(jpath, jpeg_revision,
+                                  jstart_revision, jend_revision);
+}
+
 // TODO: getFileRevisions
 // TODO: lock
 // TODO: unlock



Mime
View raw message