subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwri...@apache.org
Subject svn commit: r1161147 [1/9] - in /subversion/branches/revprop-packing: ./ build/ build/ac-macros/ notes/ subversion/bindings/ctypes-python/csvn/ subversion/bindings/ctypes-python/test/ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/or...
Date Wed, 24 Aug 2011 15:16:55 GMT
Author: hwright
Date: Wed Aug 24 15:16:50 2011
New Revision: 1161147

URL: http://svn.apache.org/viewvc?rev=1161147&view=rev
Log:
On the revprop-packing branch:
Bring up-to-date with trunk.

Added:
    subversion/branches/revprop-packing/notes/diff-data-flows.txt
      - copied unchanged from r1161142, subversion/trunk/notes/diff-data-flows.txt
    subversion/branches/revprop-packing/notes/hold
      - copied unchanged from r1161142, subversion/trunk/notes/hold
    subversion/branches/revprop-packing/subversion/bindings/javahl/src/org/apache/subversion/javahl/JNIError.java
      - copied unchanged from r1161142, subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/JNIError.java
    subversion/branches/revprop-packing/subversion/tests/cmdline/upgrade_tests_data/upgrade_locked.tar.bz2
      - copied unchanged from r1161142, subversion/trunk/subversion/tests/cmdline/upgrade_tests_data/upgrade_locked.tar.bz2
Removed:
    subversion/branches/revprop-packing/subversion/bindings/javahl/src/org/tigris/subversion/javahl/JNIError.java
Modified:
    subversion/branches/revprop-packing/   (props changed)
    subversion/branches/revprop-packing/CHANGES
    subversion/branches/revprop-packing/build/ac-macros/neon.m4
    subversion/branches/revprop-packing/build/run_tests.py
    subversion/branches/revprop-packing/build/transform_sql.py
    subversion/branches/revprop-packing/configure.ac
    subversion/branches/revprop-packing/notes/moves
    subversion/branches/revprop-packing/subversion/bindings/ctypes-python/csvn/repos.py
    subversion/branches/revprop-packing/subversion/bindings/ctypes-python/csvn/wc.py
    subversion/branches/revprop-packing/subversion/bindings/ctypes-python/test/localrepos.py
    subversion/branches/revprop-packing/subversion/bindings/ctypes-python/test/remoterepos.py
    subversion/branches/revprop-packing/subversion/bindings/ctypes-python/test/setup_path.py
    subversion/branches/revprop-packing/subversion/bindings/ctypes-python/test/svntypes.py
    subversion/branches/revprop-packing/subversion/bindings/ctypes-python/test/wc.py
    subversion/branches/revprop-packing/subversion/bindings/javahl/native/ClientContext.cpp
    subversion/branches/revprop-packing/subversion/bindings/javahl/native/ClientContext.h
    subversion/branches/revprop-packing/subversion/bindings/javahl/native/CopySources.cpp
    subversion/branches/revprop-packing/subversion/bindings/javahl/native/CopySources.h
    subversion/branches/revprop-packing/subversion/bindings/javahl/native/CreateJ.cpp
    subversion/branches/revprop-packing/subversion/bindings/javahl/native/File.cpp
    subversion/branches/revprop-packing/subversion/bindings/javahl/native/InputStream.cpp
    subversion/branches/revprop-packing/subversion/bindings/javahl/native/JNIThreadData.cpp
    subversion/branches/revprop-packing/subversion/bindings/javahl/native/JNIThreadData.h
    subversion/branches/revprop-packing/subversion/bindings/javahl/native/JNIUtil.cpp
    subversion/branches/revprop-packing/subversion/bindings/javahl/native/JNIUtil.h
    subversion/branches/revprop-packing/subversion/bindings/javahl/native/OutputStream.cpp
    subversion/branches/revprop-packing/subversion/bindings/javahl/native/Path.cpp
    subversion/branches/revprop-packing/subversion/bindings/javahl/native/Path.h
    subversion/branches/revprop-packing/subversion/bindings/javahl/native/Pool.cpp
    subversion/branches/revprop-packing/subversion/bindings/javahl/native/Pool.h
    subversion/branches/revprop-packing/subversion/bindings/javahl/native/Prompter.cpp
    subversion/branches/revprop-packing/subversion/bindings/javahl/native/Prompter.h
    subversion/branches/revprop-packing/subversion/bindings/javahl/native/RevisionRange.cpp
    subversion/branches/revprop-packing/subversion/bindings/javahl/native/RevpropTable.cpp
    subversion/branches/revprop-packing/subversion/bindings/javahl/native/SVNBase.cpp
    subversion/branches/revprop-packing/subversion/bindings/javahl/native/SVNBase.h
    subversion/branches/revprop-packing/subversion/bindings/javahl/native/SVNClient.cpp
    subversion/branches/revprop-packing/subversion/bindings/javahl/native/SVNClient.h
    subversion/branches/revprop-packing/subversion/bindings/javahl/native/SVNRepos.cpp
    subversion/branches/revprop-packing/subversion/bindings/javahl/native/StringArray.cpp
    subversion/branches/revprop-packing/subversion/bindings/javahl/native/Targets.cpp
    subversion/branches/revprop-packing/subversion/bindings/javahl/native/Targets.h
    subversion/branches/revprop-packing/subversion/bindings/javahl/native/libsvnjavahl.la.c
    subversion/branches/revprop-packing/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
    subversion/branches/revprop-packing/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitInfo.java
    subversion/branches/revprop-packing/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
    subversion/branches/revprop-packing/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java
    subversion/branches/revprop-packing/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
    subversion/branches/revprop-packing/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java
    subversion/branches/revprop-packing/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
    subversion/branches/revprop-packing/subversion/bindings/swig/python/svn/repos.py
    subversion/branches/revprop-packing/subversion/bindings/swig/python/tests/trac/versioncontrol/svn_fs.py
    subversion/branches/revprop-packing/subversion/bindings/swig/ruby/test/test_client.rb
    subversion/branches/revprop-packing/subversion/bindings/swig/ruby/test/util.rb
    subversion/branches/revprop-packing/subversion/include/private/svn_client_private.h
    subversion/branches/revprop-packing/subversion/include/private/svn_sqlite.h
    subversion/branches/revprop-packing/subversion/include/private/svn_wc_private.h
    subversion/branches/revprop-packing/subversion/include/svn_client.h
    subversion/branches/revprop-packing/subversion/include/svn_ra.h
    subversion/branches/revprop-packing/subversion/include/svn_wc.h
    subversion/branches/revprop-packing/subversion/libsvn_client/blame.c
    subversion/branches/revprop-packing/subversion/libsvn_client/cat.c
    subversion/branches/revprop-packing/subversion/libsvn_client/client.h
    subversion/branches/revprop-packing/subversion/libsvn_client/cmdline.c
    subversion/branches/revprop-packing/subversion/libsvn_client/commit.c
    subversion/branches/revprop-packing/subversion/libsvn_client/diff.c
    subversion/branches/revprop-packing/subversion/libsvn_client/externals.c
    subversion/branches/revprop-packing/subversion/libsvn_client/merge.c
    subversion/branches/revprop-packing/subversion/libsvn_client/mergeinfo.c
    subversion/branches/revprop-packing/subversion/libsvn_client/mergeinfo.h
    subversion/branches/revprop-packing/subversion/libsvn_client/patch.c
    subversion/branches/revprop-packing/subversion/libsvn_client/repos_diff.c
    subversion/branches/revprop-packing/subversion/libsvn_client/repos_diff_summarize.c
    subversion/branches/revprop-packing/subversion/libsvn_client/status.c
    subversion/branches/revprop-packing/subversion/libsvn_fs_fs/tree.c
    subversion/branches/revprop-packing/subversion/libsvn_ra_neon/fetch.c
    subversion/branches/revprop-packing/subversion/libsvn_ra_neon/util.c
    subversion/branches/revprop-packing/subversion/libsvn_ra_serf/blame.c
    subversion/branches/revprop-packing/subversion/libsvn_ra_serf/commit.c
    subversion/branches/revprop-packing/subversion/libsvn_ra_serf/locks.c
    subversion/branches/revprop-packing/subversion/libsvn_ra_serf/merge.c
    subversion/branches/revprop-packing/subversion/libsvn_ra_serf/ra_serf.h
    subversion/branches/revprop-packing/subversion/libsvn_ra_serf/serf.c
    subversion/branches/revprop-packing/subversion/libsvn_ra_serf/update.c
    subversion/branches/revprop-packing/subversion/libsvn_ra_serf/util.c
    subversion/branches/revprop-packing/subversion/libsvn_ra_svn/cyrus_auth.c
    subversion/branches/revprop-packing/subversion/libsvn_repos/log.c
    subversion/branches/revprop-packing/subversion/libsvn_repos/repos.c
    subversion/branches/revprop-packing/subversion/libsvn_subr/cmdline.c
    subversion/branches/revprop-packing/subversion/libsvn_subr/io.c
    subversion/branches/revprop-packing/subversion/libsvn_subr/magic.c
    subversion/branches/revprop-packing/subversion/libsvn_subr/svn_cache_config.c
    subversion/branches/revprop-packing/subversion/libsvn_subr/utf.c
    subversion/branches/revprop-packing/subversion/libsvn_subr/validate.c
    subversion/branches/revprop-packing/subversion/libsvn_wc/adm_ops.c
    subversion/branches/revprop-packing/subversion/libsvn_wc/ambient_depth_filter_editor.c
    subversion/branches/revprop-packing/subversion/libsvn_wc/copy.c
    subversion/branches/revprop-packing/subversion/libsvn_wc/diff_editor.c
    subversion/branches/revprop-packing/subversion/libsvn_wc/diff_local.c
    subversion/branches/revprop-packing/subversion/libsvn_wc/entries.c
    subversion/branches/revprop-packing/subversion/libsvn_wc/info.c
    subversion/branches/revprop-packing/subversion/libsvn_wc/merge.c
    subversion/branches/revprop-packing/subversion/libsvn_wc/node.c
    subversion/branches/revprop-packing/subversion/libsvn_wc/status.c
    subversion/branches/revprop-packing/subversion/libsvn_wc/tree_conflicts.c
    subversion/branches/revprop-packing/subversion/libsvn_wc/update_editor.c
    subversion/branches/revprop-packing/subversion/libsvn_wc/upgrade.c
    subversion/branches/revprop-packing/subversion/libsvn_wc/wc-metadata.sql
    subversion/branches/revprop-packing/subversion/libsvn_wc/wc-queries.sql
    subversion/branches/revprop-packing/subversion/libsvn_wc/wc.h
    subversion/branches/revprop-packing/subversion/libsvn_wc/wc_db.c
    subversion/branches/revprop-packing/subversion/libsvn_wc/wc_db.h
    subversion/branches/revprop-packing/subversion/libsvn_wc/wc_db_wcroot.c
    subversion/branches/revprop-packing/subversion/libsvn_wc/workqueue.c
    subversion/branches/revprop-packing/subversion/mod_dav_svn/liveprops.c
    subversion/branches/revprop-packing/subversion/mod_dav_svn/mod_dav_svn.c
    subversion/branches/revprop-packing/subversion/svn/info-cmd.c
    subversion/branches/revprop-packing/subversion/svn/main.c
    subversion/branches/revprop-packing/subversion/svn/schema/info.rnc
    subversion/branches/revprop-packing/subversion/svn/status.c
    subversion/branches/revprop-packing/subversion/svn/tree-conflicts.c
    subversion/branches/revprop-packing/subversion/svndumpfilter/main.c
    subversion/branches/revprop-packing/subversion/svnrdump/svnrdump.c
    subversion/branches/revprop-packing/subversion/svnversion/main.c
    subversion/branches/revprop-packing/subversion/tests/cmdline/changelist_tests.py
    subversion/branches/revprop-packing/subversion/tests/cmdline/copy_tests.py
    subversion/branches/revprop-packing/subversion/tests/cmdline/depth_tests.py
    subversion/branches/revprop-packing/subversion/tests/cmdline/diff_tests.py
    subversion/branches/revprop-packing/subversion/tests/cmdline/externals_tests.py
    subversion/branches/revprop-packing/subversion/tests/cmdline/import_tests.py
    subversion/branches/revprop-packing/subversion/tests/cmdline/input_validation_tests.py
    subversion/branches/revprop-packing/subversion/tests/cmdline/lock_tests.py
    subversion/branches/revprop-packing/subversion/tests/cmdline/merge_authz_tests.py
    subversion/branches/revprop-packing/subversion/tests/cmdline/merge_reintegrate_tests.py
    subversion/branches/revprop-packing/subversion/tests/cmdline/merge_tests.py
    subversion/branches/revprop-packing/subversion/tests/cmdline/mergeinfo_tests.py
    subversion/branches/revprop-packing/subversion/tests/cmdline/patch_tests.py
    subversion/branches/revprop-packing/subversion/tests/cmdline/revert_tests.py
    subversion/branches/revprop-packing/subversion/tests/cmdline/special_tests.py
    subversion/branches/revprop-packing/subversion/tests/cmdline/svndumpfilter_tests.py
    subversion/branches/revprop-packing/subversion/tests/cmdline/svntest/main.py
    subversion/branches/revprop-packing/subversion/tests/cmdline/svnversion_tests.py
    subversion/branches/revprop-packing/subversion/tests/cmdline/tree_conflict_tests.py
    subversion/branches/revprop-packing/subversion/tests/cmdline/upgrade_tests.py
    subversion/branches/revprop-packing/subversion/tests/libsvn_client/client-test.c
    subversion/branches/revprop-packing/subversion/tests/libsvn_diff/parse-diff-test.c
    subversion/branches/revprop-packing/subversion/tests/libsvn_fs_fs/fs-pack-test.c
    subversion/branches/revprop-packing/subversion/tests/libsvn_wc/create_wc_for_upgrade.sh
    subversion/branches/revprop-packing/subversion/tests/libsvn_wc/db-test.c
    subversion/branches/revprop-packing/subversion/tests/libsvn_wc/op-depth-test.c
    subversion/branches/revprop-packing/subversion/tests/svn_test.h
    subversion/branches/revprop-packing/subversion/tests/svn_test_fs.c
    subversion/branches/revprop-packing/subversion/tests/svn_test_fs.h
    subversion/branches/revprop-packing/tools/client-side/svnmucc/svnmucc.c
    subversion/branches/revprop-packing/tools/dev/benchmarks/suite1/benchmark.py
    subversion/branches/revprop-packing/tools/dev/benchmarks/suite1/run
    subversion/branches/revprop-packing/tools/dev/unix-build/Makefile.svn
    subversion/branches/revprop-packing/tools/dist/backport.pl
    subversion/branches/revprop-packing/tools/dist/collect_sigs.py
    subversion/branches/revprop-packing/tools/dist/dist.sh
    subversion/branches/revprop-packing/tools/dist/release.py
    subversion/branches/revprop-packing/tools/dist/templates/rc-news.ezt

Propchange: subversion/branches/revprop-packing/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Aug 24 15:16:50 2011
@@ -18,7 +18,7 @@ autogen-standalone.mk
 autom4te.cache
 gen-make.opts
 tests.log*
-fails.log
+fails.log*
 db4-win32
 db
 *.o

Propchange: subversion/branches/revprop-packing/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Aug 24 15:16:50 2011
@@ -32,6 +32,7 @@
 /subversion/branches/issue-3242-dev:879653-896436
 /subversion/branches/issue-3334-dirs:875156-875867
 /subversion/branches/issue-3668-3669:1031000-1035744
+/subversion/branches/issue-3975:1152931-1160746
 /subversion/branches/kwallet:870785-871314
 /subversion/branches/log-g-performance:870941-871032
 /subversion/branches/merge-skips-obstructions:874525-874615
@@ -53,4 +54,4 @@
 /subversion/branches/tree-conflicts:868291-873154
 /subversion/branches/tree-conflicts-notify:873926-874008
 /subversion/branches/uris-as-urls:1060426-1064427
-/subversion/trunk:1143817-1152007
+/subversion/trunk:1143817-1161142

Modified: subversion/branches/revprop-packing/CHANGES
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/CHANGES?rev=1161147&r1=1161146&r2=1161147&view=diff
==============================================================================
--- subversion/branches/revprop-packing/CHANGES (original)
+++ subversion/branches/revprop-packing/CHANGES Wed Aug 24 15:16:50 2011
@@ -2,6 +2,8 @@ Version 1.8.0
 (?? ??? 2011, from /branches/1.8.x)
 http://svn.apache.org/repos/asf/subversion/tags/1.8.0
 
+ User-visible changes:
+
  Developer-visible changes:
   - API changes:
     * fix inconsistent handling of log revs without changed paths (issue #3694)
@@ -26,7 +28,6 @@ the 1.6 release:  http://subversion.apac
 
   - Minor new features and improvements:
     * Better handling of HTTP redirects (issue #2779)
-    * make Serf the default DAV access method, if available (r875974)
     * Improved and much more consistent path handling (issue #2028, and others)
     * 'svnadmin load' rewrites changed revnums in mergeinfo (issue #3020)
     * Error message and help text improvements
@@ -51,6 +52,7 @@ the 1.6 release:  http://subversion.apac
     * make server-side network data compression rate configurable (r1072288)
     * added support for auto-detecting mime-types with libmagic (r1131120)
     * 'svn rm url1 url2 url3' uses single txn per repo (issue #1199)
+    * don't leave unversioned files when reverting copies (issue #3101)
 
   - Client-side bugfixes:
     * 'svn cp A B; svn mv B C' is equivalent to 'svn cp A C' (issue #756)
@@ -126,7 +128,7 @@ the 1.6 release:  http://subversion.apac
     * fixed: executable flag of binary file lost during merge (issue #3686)
     * fixed: merging a symlink-turned-regular-file breaks the wc (issue #2530)
     * fixed: can't remove file externals (issue #3351)
-    * fixed: 'svn unlock' attempts to unlock  wrong token on DAV (issue #3794)
+    * fixed: 'svn unlock' attempts to unlock wrong token on DAV (issue #3794)
     * fixed: forced DAV 'svn unlock' results in 403, not warning (issue #3801)
     * fixed: rm -> ci -> cp = missing directory (issue #2763)
     * fixed: 'svn info' returns parent info on missing dirs (issue #3178)
@@ -140,7 +142,7 @@ the 1.6 release:  http://subversion.apac
     * allow SVNListParentPath to be used with authz (issue #2753)
     * allow nav to repo list from repo top with SVNListParentPath (issue #3159)
     * allow repositories in the root of a drive on windows (issue #3535)
-    * don't destroy mergeinnfo with 'svnadmin load --parent-dir' (issue #3547)
+    * don't destroy mergeinfo with 'svnadmin load --parent-dir' (issue #3547)
     * fixed: 'svnadmin hotcopy' does not duplicate symlinks (issue #2591)
     * fixed: post-revprop-change errors cancel commit (issue #2990)
     * fixed: mod_dav_svn runs pre-revprop-change hook twice (issue #3085)
@@ -182,6 +184,7 @@ the 1.6 release:  http://subversion.apac
     * notifications sent when mergeinfo changes (r877588)
     * add information on text and property mods in log APIs (r877688)
     * fixed: svn_ra_local__get_file() leaks file descriptors (issue #3290)
+    * swig-py: always set ChangedPath.path (issue #2630)
 
   - Bindings:
     * New JavaHL package: org.apache.subversion

Modified: subversion/branches/revprop-packing/build/ac-macros/neon.m4
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/build/ac-macros/neon.m4?rev=1161147&r1=1161146&r2=1161147&view=diff
==============================================================================
--- subversion/branches/revprop-packing/build/ac-macros/neon.m4 (original)
+++ subversion/branches/revprop-packing/build/ac-macros/neon.m4 Wed Aug 24 15:16:50 2011
@@ -121,7 +121,8 @@ int main()
               if test "$shared_linking" = "no"; then
                 NEON_LIBS=`$PKG_CONFIG neon --libs --static`
                 LIBS="$LIBS $NEON_LIBS"
-                AC_LINK_IFELSE([AC_LANG_SOURCE([[$neon_test_code]])], , AC_MSG_ERROR([cannot find Neon]))
+                AC_LINK_IFELSE([AC_LANG_SOURCE([[$neon_test_code]])], ,
+                               AC_MSG_ERROR([cannot find a usable Neon library]))
               fi
               CFLAGS="$old_CFLAGS"
               LIBS="$old_LIBS"

Modified: subversion/branches/revprop-packing/build/run_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/build/run_tests.py?rev=1161147&r1=1161146&r2=1161147&view=diff
==============================================================================
--- subversion/branches/revprop-packing/build/run_tests.py (original)
+++ subversion/branches/revprop-packing/build/run_tests.py Wed Aug 24 15:16:50 2011
@@ -453,11 +453,16 @@ class TestHarness:
     else:
       test_selection = []
 
-    failed = svntest.main.execute_tests(prog_mod.test_list,
-                                        serial_only=serial_only,
-                                        test_name=progbase,
-                                        progress_func=prog_f,
-                                        test_selection=test_selection)
+    try:
+      failed = svntest.main.execute_tests(prog_mod.test_list,
+                                          serial_only=serial_only,
+                                          test_name=progbase,
+                                          progress_func=prog_f,
+                                          test_selection=test_selection)
+    except svntest.Failure:
+      if self.log:
+        os.write(old_stdout, '.' * dot_count)
+      failed = True
 
     # restore some values
     sys.path = old_path

Modified: subversion/branches/revprop-packing/build/transform_sql.py
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/build/transform_sql.py?rev=1161147&r1=1161146&r2=1161147&view=diff
==============================================================================
--- subversion/branches/revprop-packing/build/transform_sql.py (original)
+++ subversion/branches/revprop-packing/build/transform_sql.py Wed Aug 24 15:16:50 2011
@@ -103,6 +103,11 @@ class Processor(object):
     for line in input.split('\n'):
       line = line.replace('"', '\\"')
 
+      # '/'+1 == '0'
+      line = re.sub(r'IS_STRICT_DESCENDANT_OF[(]([A-Za-z_.]+), ([?][0-9]+)[)]',
+                    r"((\1) > (\2) || '/' AND (\1) < (\2) || '0') ",
+                    line)
+
       if line.strip():
         handled = False
 

Modified: subversion/branches/revprop-packing/configure.ac
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/configure.ac?rev=1161147&r1=1161146&r2=1161147&view=diff
==============================================================================
--- subversion/branches/revprop-packing/configure.ac (original)
+++ subversion/branches/revprop-packing/configure.ac Wed Aug 24 15:16:50 2011
@@ -737,7 +737,7 @@ AC_ARG_WITH(libmagic,AS_HELP_STRING([--w
       AC_CHECK_LIB(magic, magic_open, [libmagic_found="builtin"])
     ])
     libmagic_prefix="the default locations"
-  else
+  elif test "$withval" != "no"; then
     libmagic_prefix=$withval
     save_cppflags="$CPPFLAGS"
     CPPFLAGS="$CPPFLAGS -I$libmagic_prefix/include"

Modified: subversion/branches/revprop-packing/notes/moves
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/notes/moves?rev=1161147&r1=1161146&r2=1161147&view=diff
==============================================================================
--- subversion/branches/revprop-packing/notes/moves (original)
+++ subversion/branches/revprop-packing/notes/moves Wed Aug 24 15:16:50 2011
@@ -1,20 +1,20 @@
 
- =========================================================================
- This file sketches ideas about how we could improve move support in wc-ng
- =========================================================================
+ =======================
+ Moves in Subversion 1.8
+ =======================
 
 This file purposefully talks about 'moves' rather than 'renames'.
 This isn't about true renames as requested in issue #898.
-Rather, these ideas keep the add+delete concept while trying to make
-moves behave more in a way that one would expect if true renames were
-implemented, as requested in issue #3631.
-
-These ideas only cover local (client-side) moves in the working copy.
-They attempt to reuse as much existing code as possible, so new
-functionality will be implemented as part of existing copy/delete
-code paths unless doing so is not feasible.
+Rather, we keep the add+delete concept while trying to make moves behave
+more in a way that one would expect if true renames were implemented,
+as requested in issue #3631. See also the umbrella issue #3630.
+
+So far the changes only cover local (client-side) moves in the working copy.
+We reuse as much existing code as possible, so new functionality is
+implemented as part of existing copy/delete code paths unless doing
+so is not feasible.
 
-One significant change from how copies work is that moves will be tracked
+One significant change from how copies work is that moves are tracked
 both ways, i.e. one can locate the add-half of a move if given the
 delete-half, and locate the delete-half if given the add-half.
 
@@ -30,17 +30,17 @@ The goals are:
     when talking to the server.
 
 
-
 Notes regarding specific layers of Subversion follow below.
 
 
 == wc.db ==
 
-There already exist columns in the NODES table we use to differentiate
+The following columns in the NODES table are used to differentiate
 moves from copies:
 
   /* Boolean value, specifying if this node was moved here (rather than just
-     copied). The source of the move is specified in copyfrom_*.  */
+     copied). The source of the move is implied by a different node with
+     a moved_to column pointing at this node. */
   moved_here  INTEGER,
 
   /* If the underlying node was moved away (rather than just deleted), this
@@ -48,30 +48,39 @@ moves from copies:
      This is set only on the root of a move, and is NULL for all children.
 
      Note that moved_to never refers to *this* node. It always refers
-     to the "underlying" node, whether that is BASE or a child node
-     implied from a parent's move/copy.  */
+     to the "underlying" node in the BASE tree. A non-NULL moved_to column
+     is only valid in rows where op_depth == 0. */
   moved_to  TEXT,
 
-These will be used as described in their docstrings.
+Some new queries were added which use these columns:
 
+  STMT_SELECT_MOVED_FROM_RELPATH
+  STMT_UPDATE_MOVED_TO_RELPATH
+  STMT_CLEAR_MOVED_TO_RELPATH
+  STMT_CLEAR_MOVED_TO_RELPATH_RECURSIVE
+  STMT_SELECT_MOVED_HERE_CHILDREN
+
+More queries might be needed (TBD).
 
-== libsvn_wc ==
 
-Various wc_db and svn_wc interfaces will be extended for moves.
-New interfaces will be modeled after (and share code with) their
-existing copy or delete equivalents as much as possible.
-See r1146119 for an example of how existing code will be reused.
+== libsvn_wc ==
 
-Some existing interfaces will be extended, e.g. the _scan_addition()
-and _scan_deletion() interfaces will be extended to differentiate
+In the internal wc_db API, the _scan_addition() and _scan_deletion()
+interfaces were extended to make use of new DB queries to differentiate
 moved nodes from copied, added, and deleted nodes.
 
-### gstein: note that scan_addition() already returns status_moved_here,
-###   and scan_deletion() returns a MOVED_TO_ABSPATH. these functions
-###   should already do what you're asking (with bitrot and "untested"
-###   caveats since I first implemented them).
+Two functions were built on top of the wc_db API and added to the
+private libsvn_wc API:
+  svn_wc__node_was_moved_away() provides, for a given local_abspath:
+    - the moved_to abspath within the working copy
+    - the abspath of the op-root of the copy operation that created
+      the node at the moved_to abspath
+  svn_wc__node_was_moved_here() provides, for a given local_abspath:
+    - the moved_from abspath within the working copy
+    - the abspath of the op-root of the delete operation that deleted
+      the node at the moved_from abspath
 
-There might be some public API changes (TBD).
+More API changes might be needed (TBD).
 
 We might require a working copy upgrade when going from 1.7 to 1.8,
 and only allow new move functionality to be used with 1.8 working copies.
@@ -79,40 +88,48 @@ and only allow new move functionality to
 
 == libsvn_client ==
 
-This layer already uses existing svn_wc move APIs. For those callers
-APIs changes will hopefully be fairly transparent, apart from changes
-that enhance behaviour of move operations.
-
-Some code that is expected to change behaviour:
-
- - commit: Commit will refuse to commit anything if only one half of
-    a move appears in the commit target list, or if only one half of
-    a move is picked up by recursion.
-
- - revert: Revert will by default revert both nodes involved in a move,
-    independent of which half of the move is mentioned in the revert
-    target list. If only one half of a move is picked up by recursion,
-    revert will refuse to revert anything.
-    If the delete-half has been replaced by another node after
-    it has been deleted, revert will require both the add and delete
-    half to appear in the revert target list or be picked up by recursion
-    (i.e. the node replacing the delete-half has to be reverted explicitly
-     or via recursion).
-
- - status: Status will provide information about both halfs of a move,
-    in a way that allows the user to tell that both halfs belong to
-    the same move operation.
-
- - update/merge: Update and Merge will use move information to auto-resolve
-    the "local move vs. incoming edit" tree conflict scenario.
+This layer already uses 1.7 and earlier svn_wc move APIs. For callers
+of such APIs, changes will hopefully be fairly transparent apart from
+changes that enhance behaviour of move operations.
+
+Interfaces which have changed behaviour:
+
+ svn_client_commit: Commit will refuse to commit anything if only one
+   half of a move appears in the commit target list, or if only one half of
+   a move is picked up by recursion.
+
+ svn_client_revert: The behaviour of this API is not changed, but it
+   is worth noting how it behaves for moves:
+   - If both halves of a move are among the revert targets (either by
+     virtue of being listed explicitly, or by being picked up during
+     recursion), the entire move is reverted.
+   - If only one half of a move is among the revert targets, the other
+     half will be transformed into a normal copy or delete.
+     See http://svn.haxx.se/dev/archive-2011-08/0239.shtml for rationale.
+
+ - svn_client_status: Status provides the moved-to abspath for a moved-away
+     nodes, and the moved-from abspath for a moved-here node.
+     Note that, mostly due to performance reasons, only information about
+     roots of moves is provided. Children of moved nodes aren't marked as such.
+
+ - svn_client_info: Like status, except that it also provides move
+     information about children of moved nodes.
+
+ - svn_client_patch: Patch uses move information to apply changes to files
+     which have been moved locally.
+
+Interfaces which have not changed behaviour yet but will change in 1.8.0:
+
+ - svn_client_update/svn_client_merge: Update and Merge will use move
+    information to auto-resolve the "local move vs. incoming edit"
+    tree conflict scenario.
 
  - diff: Diff will use move information to generate 'rename from' headers
-    when the --git option is used.
+    when the --git option is used. (A related problem is making diff use
+    correct copyfrom in repos-repos diffs, which is not trivial.)
 
- - patch: Patch will use move information to apply changes to files
-    which have been moved locally.
+Several public APIs may still be bumped as their behaviour changes.
 
-Several public APIs may be bumped as their behaviour changes.
 For backwards compatibility, APIs released prior to 1.8 will continue
 to treat moves just like 1.7 and earlier releases did. (However, see
 also the note on working copy upgrades above, which might affect to
@@ -121,15 +138,15 @@ what degree the APIs need to stay compat
 
 == svn ==
 
-The svn client will present moves similar to but distinct from copy
-operations. E.g. it might show moves like this:
+The svn client presents moves similar to but distinct from copy operations. 
+
+svn status shows move roots:
 
 $ svn status
 A  +    foo
-   > moved from 'bar'
+        > moved from 'bar'
 D       bar
-   > moved to 'foo'
+        > moved to 'foo'
 $
 
-(If the above is done, we should also show copyfrom for normal copies
-this way, but as "copied from '%s'")
+svn info shows additional Moved-To: and Moved-From: lines for any moved node.

Modified: subversion/branches/revprop-packing/subversion/bindings/ctypes-python/csvn/repos.py
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/ctypes-python/csvn/repos.py?rev=1161147&r1=1161146&r2=1161147&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/ctypes-python/csvn/repos.py (original)
+++ subversion/branches/revprop-packing/subversion/bindings/ctypes-python/csvn/repos.py Wed Aug 24 15:16:50 2011
@@ -67,6 +67,10 @@ class RepositoryURI(object):
         return self._as_parameter_
 
 class RemoteRepository(object):
+    """This class represents a connection from the client to a remote
+       Subversion repository."""
+    # The interface corresponds roughly to the svn_ra API, and an object of
+    # this type basically represents the C type 'svn_ra_session_t'.
 
     def __init__(self, url, user=None):
         """Open a new session to URL with the specified USER.
@@ -95,6 +99,10 @@ class RemoteRepository(object):
         self.client[0].log_msg_baton2 = c_void_p()
         self._log_func = None
 
+    def close(self):
+        """Close this RemoteRepository object, releasing any resources."""
+        self.pool.clear()
+
     def txn(self):
         """Create a transaction"""
         return Txn(self)
@@ -146,7 +154,12 @@ class RemoteRepository(object):
         svn_ra_get_dir2(self, dirents.byref(), NULL, NULL, path,
                         rev, fields, dirents.pool)
         self.iterpool.clear()
-        return dirents
+        # Create a Python dict of svn_dirent_t objects from this Hash of
+        # pointers to svn_dirent_t.
+        result = {}
+        for path, dirent_p in dirents.items():
+            result[path] = dirent_p[0]
+        return result
 
     def cat(self, buffer, path, rev = SVN_INVALID_REVNUM):
         """Get PATH@REV and save it to BUFFER. BUFFER must be a Python file
@@ -170,7 +183,7 @@ class RemoteRepository(object):
             rev = self.latest_revnum()
         svn_ra_stat(self, path, rev, byref(dirent), dirent.pool)
         self.iterpool.clear()
-        return dirent
+        return dirent[0]
 
     def proplist(self, path, rev = SVN_INVALID_REVNUM):
         """Return a dictionary containing the properties on PATH@REV
@@ -396,6 +409,14 @@ class LocalRepository(object):
             svn_repos_open(byref(self._as_parameter_), path, self.pool)
         self.fs = _fs(self)
 
+    def __del__(self):
+        self.close()
+
+    def close(self):
+        """Close this LocalRepository object, releasing any resources. In
+           particular, this closes the rep-cache DB."""
+        self.pool.clear()
+
     def latest_revnum(self):
         """Get the latest revision in the repository"""
         return self.fs.latest_revnum()
@@ -532,7 +553,6 @@ class _fs(object):
        This class represents an svn_fs_t object"""
 
     def __init__(self, repos):
-        self.repos = repos
         self.iterpool = Pool()
         self._as_parameter_ = svn_repos_fs(repos)
 
@@ -563,13 +583,6 @@ class _fs(object):
            temporary allocations."""
         return _fs_root(self, rev, txn, pool, iterpool)
 
-    def txn(self, message, base_rev=None):
-        """Open a new transaction for commit to the specified
-           repository, assuming that our data is up to date as
-           of base_rev. Setup the author and commit message
-           revprops."""
-        return _fs_txn(self.repos, message, base_rev)
-
 class _fs_root(object):
     """NOTE: This is a private class. Don't use it outside of
        this module. Use the Repos.txn() method instead.

Modified: subversion/branches/revprop-packing/subversion/bindings/ctypes-python/csvn/wc.py
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/ctypes-python/csvn/wc.py?rev=1161147&r1=1161146&r2=1161147&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/ctypes-python/csvn/wc.py (original)
+++ subversion/branches/revprop-packing/subversion/bindings/ctypes-python/csvn/wc.py Wed Aug 24 15:16:50 2011
@@ -79,6 +79,10 @@ class WC(object):
         self.client[0].log_msg_baton2 = c_void_p()
         self._log_func = None
 
+    def close(self):
+        """Close this WC object, releasing any resources."""
+        self.pool.clear()
+
     def copy(self, src, dest, rev = ""):
         """Copy src to dest.
 

Modified: subversion/branches/revprop-packing/subversion/bindings/ctypes-python/test/localrepos.py
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/ctypes-python/test/localrepos.py?rev=1161147&r1=1161146&r2=1161147&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/ctypes-python/test/localrepos.py (original)
+++ subversion/branches/revprop-packing/subversion/bindings/ctypes-python/test/localrepos.py Wed Aug 24 15:16:50 2011
@@ -33,15 +33,21 @@ class LocalRepositoryTestCase(unittest.T
         dumpfile = open(os.path.join(os.path.split(__file__)[0],
                         'test.dumpfile'))
 
-        # Just in case a preivous test instance was not properly cleaned up
-        self.tearDown()
+        # Just in case a previous test instance was not properly cleaned up
+        self.remove_from_disk()
+
         self.repos = LocalRepository(repos_location, create=True)
         self.repos.load(dumpfile)
 
     def tearDown(self):
+        self.repos.close()
+        self.remove_from_disk()
+        self.repos = None
+
+    def remove_from_disk(self):
+        """Remove anything left on disk"""
         if os.path.exists(repos_location):
             svn_repos_delete(repos_location, Pool())
-        self.repos = None
 
     def test_local_latest_revnum(self):
         self.assertEqual(9, self.repos.latest_revnum())

Modified: subversion/branches/revprop-packing/subversion/bindings/ctypes-python/test/remoterepos.py
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/ctypes-python/test/remoterepos.py?rev=1161147&r1=1161146&r2=1161147&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/ctypes-python/test/remoterepos.py (original)
+++ subversion/branches/revprop-packing/subversion/bindings/ctypes-python/test/remoterepos.py Wed Aug 24 15:16:50 2011
@@ -27,6 +27,13 @@ from csvn.core import *
 from urllib import pathname2url
 from csvn.repos import LocalRepository, RemoteRepository
 from stat import *
+from sys import version_info # For Python version check
+if version_info[0] >= 3:
+  # Python >=3.0
+  from io import StringIO
+else:
+  # Python <3.0
+  from StringIO import StringIO
 
 repos_location = os.path.join(tempfile.gettempdir(), "svn_test_repos")
 repos_url = pathname2url(repos_location)
@@ -46,17 +53,32 @@ class RemoteRepositoryTestCase(unittest.
         dumpfile = open(os.path.join(os.path.split(__file__)[0],
                         'test.dumpfile'))
 
-        # Just in case a preivous test instance was not properly cleaned up
-        self.tearDown()
+        # Just in case a previous test instance was not properly cleaned up
+        self.remove_from_disk()
+
         self.repos = LocalRepository(repos_location, create=True)
         self.repos.load(dumpfile)
 
         self.repos = RemoteRepository(repos_url)
 
     def tearDown(self):
+        self.repos.close()
+        self.remove_from_disk()
+        self.repos = None
+
+    def remove_from_disk(self):
+        """Remove anything left on disk"""
         if os.path.exists(repos_location):
             svn_repos_delete(repos_location, Pool())
-        self.repos = None
+
+    def svn_dirent_t_assert_equal(self, a, b):
+        """Assert that two svn_dirent_t's are equal, ignoring their 'time'
+           fields."""
+        self.assertEqual(a.kind, b.kind)
+        self.assertEqual(a.size, b.size)
+        self.assertEqual(a.has_props, b.has_props)
+        self.assertEqual(a.created_rev, b.created_rev)
+        self.assertEqual(a.last_author, b.last_author)
 
     def test_remote_latest_revnum(self):
         self.assertEqual(9, self.repos.latest_revnum())
@@ -71,6 +93,50 @@ class RemoteRepositoryTestCase(unittest.
         self.assertEqual(svn_node_none,
             self.repos.check_path("does_not_compute"))
 
+    def test_list(self):
+        expected = {
+            'README.txt':
+                svn_dirent_t(kind=svn_node_file, size=159, has_props=True,
+                             created_rev=9, last_author=String('bruce')),
+            'ANOTHERREADME.txt':
+                svn_dirent_t(kind=svn_node_file, size=66, has_props=False,
+                             created_rev=4, last_author=String('clark')) }
+        found = self.repos.list("trunk")
+        self.assertEqual(sorted(found.keys()), sorted(expected.keys()))
+        for path in found:
+            self.svn_dirent_t_assert_equal(found[path], expected[path])
+
+    def test_info(self):
+        e = svn_dirent_t(kind=svn_node_file, size=159, has_props=True,
+                         created_rev=9, last_author=String('bruce'))
+        f = self.repos.info("trunk/README.txt")
+        self.svn_dirent_t_assert_equal(f, e)
+
+    def test_proplist(self):
+        expected = { 'Awesome': 'Yes',
+            'svn:entry:last-author': 'bruce',
+            'svn:entry:committed-rev': '9' }
+        found = self.repos.proplist("trunk/README.txt")
+        # Check results, ignoring some entry-props
+        del found['svn:entry:committed-date']
+        del found['svn:entry:uuid']
+        self.assertEqual(sorted(found.keys()), sorted(expected.keys()))
+        for pname in found:
+            self.assertEqual(found[pname], expected[pname])
+
+    def test_propget(self):
+        found = self.repos.propget("Awesome", "trunk/README.txt")
+        self.assertEqual(found, "Yes")
+
+    def test_log(self):
+        expected = [ (8, 'clark'),
+                     (9, 'bruce') ]
+        for found in self.repos.log(7, 9, ["trunk/README.txt"]):
+            (e_rev, e_author) = expected[0]
+            self.assertEqual(found.revision, e_rev)
+            self.assertEqual(found.author, e_author)
+            expected = expected[1:]
+
     def test_revprop_list(self):
         # Test argument-free case
         props = self.repos.revprop_list()

Modified: subversion/branches/revprop-packing/subversion/bindings/ctypes-python/test/setup_path.py
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/ctypes-python/test/setup_path.py?rev=1161147&r1=1161146&r2=1161147&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/ctypes-python/test/setup_path.py (original)
+++ subversion/branches/revprop-packing/subversion/bindings/ctypes-python/test/setup_path.py Wed Aug 24 15:16:50 2011
@@ -25,8 +25,8 @@
 import sys
 import os
 
-src_swig_python_tests_dir = os.path.dirname(os.path.dirname(__file__))
-sys.path[0:0] = [ src_swig_python_tests_dir ]
+src_ctypes_python_tests_dir = os.path.dirname(os.path.dirname(__file__))
+sys.path[0:0] = [ src_ctypes_python_tests_dir ]
 
 import csvn.core
 csvn.core.svn_cmdline_init("", csvn.core.stderr)

Modified: subversion/branches/revprop-packing/subversion/bindings/ctypes-python/test/svntypes.py
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/ctypes-python/test/svntypes.py?rev=1161147&r1=1161146&r2=1161147&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/ctypes-python/test/svntypes.py (original)
+++ subversion/branches/revprop-packing/subversion/bindings/ctypes-python/test/svntypes.py Wed Aug 24 15:16:50 2011
@@ -21,8 +21,24 @@ import setup_path
 import unittest
 from csvn.core import *
 import csvn.types as _types
+from csvn.types import SvnDate, Hash, Array, APRFile, Stream, SvnStringPtr
 
-class TypesTestCase(unittest.TestCase):
+class SvnDateTestCase(unittest.TestCase):
+
+    def test_as_apr_time_t(self):
+        d1 = SvnDate('1999-12-31T23:59:59.000000Z')
+        d2 = SvnDate('2000-01-01T00:00:00.000000Z')
+        t1 = d1.as_apr_time_t().value
+        t2 = d2.as_apr_time_t().value
+        self.assertEqual(t1 + 1000000, t2)
+
+    def test_as_human_string(self):
+        d1 = SvnDate('1999-12-31T23:59:59.000000Z')
+        s1 = d1.as_human_string()
+        self.assertEqual(s1[:27], '1999-12-31 23:59:59 +0000 (')
+
+
+class HashTestCase(unittest.TestCase):
 
     def test_hash(self):
         self.pydict = {"bruce":"batman", "clark":"superman",
@@ -35,6 +51,34 @@ class TypesTestCase(unittest.TestCase):
         self.assertNotEqual(self.svnhash["clark"].value,
             self.pydict["bruce"])
 
+    def test_insert_delete(self):
+        h = Hash(c_char_p)
+        h['foo'] = 'f'
+        h['bar'] = 'b'
+        self.assertEqual(len(h), 2)
+        self.assertEqual(h['foo'].value, 'f')
+        self.assertEqual(h['bar'].value, 'b')
+        h['bar'] = 'b'
+        self.assertEqual(len(h), 2)
+        del h['foo']
+        self.assertEqual(len(h), 1)
+        self.assertEqual(h['bar'].value, 'b')
+
+    def test_iter(self):
+        h = Hash(c_char_p, { 'foo': 'f', 'bar': 'b' })
+        keys = sorted(h.keys())
+        self.assertEqual(keys, ['bar', 'foo'])
+        vals = []
+        for k in h:
+            vals += [ h[k].value ]
+        self.assertEqual(sorted(vals), ['b', 'f'])
+        vals = []
+        for k,v in h.items():
+            vals += [ v.value ]
+        self.assertEqual(sorted(vals), ['b', 'f'])
+
+class ArrayTestCase(unittest.TestCase):
+
     def test_array(self):
         self.pyarray = ["vini", "vidi", "vici"]
         self.svnarray = _types.Array(c_char_p, self.pyarray)
@@ -43,7 +87,11 @@ class TypesTestCase(unittest.TestCase):
         self.assertEqual(self.svnarray[1], "vidi")
 
 def suite():
-    return unittest.makeSuite(TypesTestCase, 'test')
+    suite = unittest.TestSuite()
+    suite.addTest(unittest.makeSuite(SvnDateTestCase, 'test'))
+    suite.addTest(unittest.makeSuite(HashTestCase, 'test'))
+    suite.addTest(unittest.makeSuite(ArrayTestCase, 'test'))
+    return suite
 
 if __name__ == '__main__':
     runner = unittest.TextTestRunner()

Modified: subversion/branches/revprop-packing/subversion/bindings/ctypes-python/test/wc.py
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/ctypes-python/test/wc.py?rev=1161147&r1=1161146&r2=1161147&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/ctypes-python/test/wc.py (original)
+++ subversion/branches/revprop-packing/subversion/bindings/ctypes-python/test/wc.py Wed Aug 24 15:16:50 2011
@@ -59,8 +59,9 @@ class WCTestCase(unittest.TestCase):
         dumpfile = open(os.path.join(os.path.split(__file__)[0],
                         'test.dumpfile'))
 
-        # Just in case a preivous test instance was not properly cleaned up
-        self.tearDown()
+        # Just in case a previous test instance was not properly cleaned up
+        self.remove_from_disk()
+
         self.repos = LocalRepository(repos_location, create=True)
         self.repos.load(dumpfile)
 
@@ -68,12 +69,18 @@ class WCTestCase(unittest.TestCase):
         self.wc.checkout(repo_url)
 
     def tearDown(self):
+        self.repos.close()
+        self.wc.close()
+        self.remove_from_disk()
+        self.wc = None
+
+    def remove_from_disk(self):
+        """Remove anything left on disk"""
         pool = Pool()
         if os.path.exists(wc_location):
             svn_io_remove_dir(wc_location, pool)
         if os.path.exists(repos_location):
             svn_repos_delete(repos_location, pool)
-        self.wc = None
 
     def _info_receiver(self, path, info):
         self.last_info = info
@@ -247,5 +254,5 @@ def suite():
     return unittest.makeSuite(WCTestCase, 'test')
 
 if __name__ == '__main__':
-    runner = unittest.TextTestRunner(verbosity=2)
+    runner = unittest.TextTestRunner()
     runner.run(suite())

Modified: subversion/branches/revprop-packing/subversion/bindings/javahl/native/ClientContext.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/javahl/native/ClientContext.cpp?rev=1161147&r1=1161146&r2=1161147&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/javahl/native/ClientContext.cpp (original)
+++ subversion/branches/revprop-packing/subversion/bindings/javahl/native/ClientContext.cpp Wed Aug 24 15:16:50 2011
@@ -38,12 +38,11 @@
 #include "CommitMessage.h"
 
 
-ClientContext::ClientContext(jobject jsvnclient)
+ClientContext::ClientContext(jobject jsvnclient, SVN::Pool &pool)
     : m_prompter(NULL),
       m_cancelOperation(false)
 {
     JNIEnv *env = JNIUtil::getEnv();
-    JNICriticalSection criticalSection(*JNIUtil::getGlobalPoolMutex());
 
     /* Grab a global reference to the Java object embedded in the parent Java
        object. */
@@ -72,23 +71,32 @@ ClientContext::ClientContext(jobject jsv
 
     env->DeleteLocalRef(jctx);
 
-    /* Create a long-lived client context object in the global pool. */
-    SVN_JNI_ERR(svn_client_create_context(&persistentCtx, JNIUtil::getPool()),
+    SVN_JNI_ERR(svn_client_create_context(&m_context, pool.getPool()),
                 );
 
+    /* Clear the wc_ctx as we don't want to maintain this unconditionally
+       for compatibility reasons */
+    SVN_JNI_ERR(svn_wc_context_destroy(m_context->wc_ctx),
+                );
+    m_context->wc_ctx = NULL;
+
     /* None of the following members change during the lifetime of
        this object. */
-    persistentCtx->notify_func = NULL;
-    persistentCtx->notify_baton = NULL;
-    persistentCtx->log_msg_func3 = CommitMessage::callback;
-    persistentCtx->cancel_func = checkCancel;
-    persistentCtx->cancel_baton = this;
-    persistentCtx->notify_func2= notify;
-    persistentCtx->notify_baton2 = m_jctx;
-    persistentCtx->progress_func = progress;
-    persistentCtx->progress_baton = m_jctx;
-    persistentCtx->conflict_func2 = resolve;
-    persistentCtx->conflict_baton2 = m_jctx;
+    m_context->notify_func = NULL;
+    m_context->notify_baton = NULL;
+    m_context->log_msg_func3 = CommitMessage::callback;
+    m_context->log_msg_baton3 = NULL;
+    m_context->cancel_func = checkCancel;
+    m_context->cancel_baton = this;
+    m_context->notify_func2= notify;
+    m_context->notify_baton2 = m_jctx;
+    m_context->progress_func = progress;
+    m_context->progress_baton = m_jctx;
+    m_context->conflict_func2 = resolve;
+    m_context->conflict_baton2 = m_jctx;
+
+    m_context->client_name = "javahl";
+    m_pool = &pool;
 }
 
 ClientContext::~ClientContext()
@@ -99,23 +107,70 @@ ClientContext::~ClientContext()
     env->DeleteGlobalRef(m_jctx);
 }
 
+
+/* Helper function to make sure that we don't keep dangling pointers in ctx.
+   Note that this function might be called multiple times if getContext()
+   is called on the same pool.
+   
+   The use of this function assumes a proper subpool behavior by its user,
+   (read: SVNClient) usually per request.
+ */
+extern "C" {
+
+struct clearctx_baton_t
+{
+  svn_client_ctx_t *ctx;
+  svn_client_ctx_t *backup;
+};
+
+static apr_status_t clear_ctx_ptrs(void *ptr)
+{
+    clearctx_baton_t *bt = (clearctx_baton_t*)ptr;
+
+    /* Reset all values to those before overwriting by getContext. */
+    *bt->ctx = *bt->backup;
+
+    return APR_SUCCESS;
+}
+
+};
+
 svn_client_ctx_t *
-ClientContext::getContext(CommitMessage *message)
+ClientContext::getContext(CommitMessage *message, SVN::Pool &in_pool)
 {
-    SVN::Pool *requestPool = JNIUtil::getRequestPool();
-    apr_pool_t *pool = requestPool->pool();
+    apr_pool_t *pool = in_pool.getPool();
     svn_auth_baton_t *ab;
-    svn_client_ctx_t *ctx = persistentCtx;
-    //SVN_JNI_ERR(svn_client_create_context(&ctx, pool), NULL);
+    svn_client_ctx_t *ctx = m_context;
+
+    /* Make a temporary copy of ctx to restore at pool cleanup to avoid
+       leaving references to dangling pointers.
 
-    const char *configDir = m_configDir.c_str();
-    if (m_configDir.length() == 0)
-        configDir = NULL;
-    SVN_JNI_ERR(svn_config_get_config(&(ctx->config), configDir, pool), NULL);
+       Note that this allows creating a stack of context changes if
+       the function is invoked multiple times with different pools.
+     */
+    clearctx_baton_t *bt = (clearctx_baton_t *)apr_pcalloc(pool, sizeof(*bt));
+    bt->ctx = ctx;
+    bt->backup = (svn_client_ctx_t*)apr_pmemdup(pool, ctx, sizeof(*ctx));
+    apr_pool_cleanup_register(in_pool.getPool(), bt, clear_ctx_ptrs,
+                              clear_ctx_ptrs);
+
+
+    if (!ctx->config)
+      {
+        const char *configDir = m_configDir.c_str();
+        if (m_configDir.empty())
+            configDir = NULL;
+        SVN_JNI_ERR(svn_config_get_config(&(ctx->config), configDir,
+                                          m_pool->getPool()),
+                    NULL);
+
+        bt->backup->config = ctx->config;
+      }
     svn_config_t *config = (svn_config_t *) apr_hash_get(ctx->config,
                                                          SVN_CONFIG_CATEGORY_CONFIG,
                                                          APR_HASH_KEY_STRING);
 
+
     /* The whole list of registered providers */
     apr_array_header_t *providers;
 
@@ -173,22 +228,22 @@ ClientContext::getContext(CommitMessage 
     if (m_prompter != NULL)
     {
         /* Two basic prompt providers: username/password, and just username.*/
-        provider = m_prompter->getProviderSimple();
+        provider = m_prompter->getProviderSimple(in_pool);
 
         APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
 
-        provider = m_prompter->getProviderUsername();
+        provider = m_prompter->getProviderUsername(in_pool);
         APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
 
         /* Three ssl prompt providers, for server-certs, client-certs,
          * and client-cert-passphrases.  */
-        provider = m_prompter->getProviderServerSSLTrust();
+        provider = m_prompter->getProviderServerSSLTrust(in_pool);
         APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
 
-        provider = m_prompter->getProviderClientSSL();
+        provider = m_prompter->getProviderClientSSL(in_pool);
         APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
 
-        provider = m_prompter->getProviderClientSSLPassword();
+        provider = m_prompter->getProviderClientSSLPassword(in_pool);
         APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
     }
 
@@ -199,15 +254,26 @@ ClientContext::getContext(CommitMessage 
      * auth_baton's run-time parameter hash.  ### Same with --no-auth-cache? */
     if (!m_userName.empty())
         svn_auth_set_parameter(ab, SVN_AUTH_PARAM_DEFAULT_USERNAME,
-                               m_userName.c_str());
+                               apr_pstrdup(in_pool.getPool(),
+                                           m_userName.c_str()));
     if (!m_passWord.empty())
         svn_auth_set_parameter(ab, SVN_AUTH_PARAM_DEFAULT_PASSWORD,
-                               m_passWord.c_str());
+                               apr_pstrdup(in_pool.getPool(),
+                                           m_passWord.c_str()));
+    /* Store where to retrieve authentication data? */
+    if (!m_configDir.empty())
+        svn_auth_set_parameter(ab, SVN_AUTH_PARAM_CONFIG_DIR,
+                               apr_pstrdup(in_pool.getPool(),
+                                           m_configDir.c_str()));
 
     ctx->auth_baton = ab;
     ctx->log_msg_baton3 = message;
     m_cancelOperation = false;
 
+    SVN_JNI_ERR(svn_wc_context_create(&ctx->wc_ctx, NULL,
+                                      in_pool.getPool(), in_pool.getPool()),
+                NULL);
+
     return ctx;
 }
 
@@ -236,9 +302,10 @@ ClientContext::setConfigDirectory(const 
     // A change to the config directory may necessitate creation of
     // the config templates.
     SVN::Pool requestPool;
-    SVN_JNI_ERR(svn_config_ensure(configDir, requestPool.pool()), );
+    SVN_JNI_ERR(svn_config_ensure(configDir, requestPool.getPool()), );
 
     m_configDir = (configDir == NULL ? "" : configDir);
+    m_context->config = NULL;
 }
 
 const char *
@@ -386,7 +453,8 @@ ClientContext::resolve(svn_wc_conflict_r
     {
       // If an exception is thrown by our conflict resolver, remove it
       // from the JNI env, and convert it into a Subversion error.
-      const char *msg = JNIUtil::thrownExceptionToCString();
+      SVN::Pool tmpPool(scratch_pool);
+      const char *msg = JNIUtil::thrownExceptionToCString(tmpPool);
       svn_error_t *err = svn_error_create(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE,
                                           NULL, msg);
       env->PopLocalFrame(NULL);

Modified: subversion/branches/revprop-packing/subversion/bindings/javahl/native/ClientContext.h
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/javahl/native/ClientContext.h?rev=1161147&r1=1161146&r2=1161147&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/javahl/native/ClientContext.h (original)
+++ subversion/branches/revprop-packing/subversion/bindings/javahl/native/ClientContext.h Wed Aug 24 15:16:50 2011
@@ -42,11 +42,13 @@ class CommitMessage;
 /**
  * This class contains a Java objects implementing the interface ClientContext
  * and implements the functions read & close of svn_stream_t.
+ *
  */
 class ClientContext
 {
  private:
-  svn_client_ctx_t *persistentCtx;
+  svn_client_ctx_t *m_context;
+  const SVN::Pool *m_pool;
   jobject m_jctx;
 
   std::string m_userName;
@@ -70,12 +72,12 @@ class ClientContext
                                                  apr_pool_t *pool);
 
  public:
-  ClientContext(jobject jsvnclient);
+  ClientContext(jobject jsvnclient, SVN::Pool &pool);
   ~ClientContext();
 
   static svn_error_t *checkCancel(void *cancelBaton);
 
-  svn_client_ctx_t *getContext(CommitMessage *message);
+  svn_client_ctx_t *getContext(CommitMessage *message, SVN::Pool &in_pool);
 
   void username(const char *pi_username);
   void password(const char *pi_password);

Modified: subversion/branches/revprop-packing/subversion/bindings/javahl/native/CopySources.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/javahl/native/CopySources.cpp?rev=1161147&r1=1161146&r2=1161147&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/javahl/native/CopySources.cpp (original)
+++ subversion/branches/revprop-packing/subversion/bindings/javahl/native/CopySources.cpp Wed Aug 24 15:16:50 2011
@@ -85,7 +85,7 @@ CopySources::makeJCopySource(const char 
 apr_array_header_t *
 CopySources::array(SVN::Pool &pool)
 {
-  apr_pool_t *p = pool.pool();
+  apr_pool_t *p = pool.getPool();
 
   JNIEnv *env = JNIUtil::getEnv();
   jclass clazz = env->FindClass(JAVA_PACKAGE "/types/CopySource");
@@ -122,7 +122,7 @@ CopySources::array(SVN::Pool &pool)
 
       src->path = apr_pstrdup(p, path);
       env->ReleaseStringUTFChars(jpath, path);
-      SVN_JNI_ERR(JNIUtil::preprocessPath(src->path, pool.pool()),
+      SVN_JNI_ERR(JNIUtil::preprocessPath(src->path, pool.getPool()),
                   NULL);
       env->DeleteLocalRef(jpath);
 

Modified: subversion/branches/revprop-packing/subversion/bindings/javahl/native/CopySources.h
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/javahl/native/CopySources.h?rev=1161147&r1=1161146&r2=1161147&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/javahl/native/CopySources.h (original)
+++ subversion/branches/revprop-packing/subversion/bindings/javahl/native/CopySources.h Wed Aug 24 15:16:50 2011
@@ -71,6 +71,9 @@ class CopySources
    * A local reference to the Java CopySources peer.
    */
   Array &m_copySources;
+
+  CopySources(const CopySources &from);
+  CopySources & operator=(const CopySources &);
 };
 
 #endif  /* COPY_SOURCES_H */

Modified: subversion/branches/revprop-packing/subversion/bindings/javahl/native/CreateJ.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/javahl/native/CreateJ.cpp?rev=1161147&r1=1161146&r2=1161147&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/javahl/native/CreateJ.cpp (original)
+++ subversion/branches/revprop-packing/subversion/bindings/javahl/native/CreateJ.cpp Wed Aug 24 15:16:50 2011
@@ -871,7 +871,8 @@ CreateJ::CommitInfo(const svn_commit_inf
   if (midCT == 0)
     {
       midCT = env->GetMethodID(clazz, "<init>",
-                               "(JLjava/lang/String;Ljava/lang/String;)V");
+                               "(JLjava/lang/String;Ljava/lang/String;"
+                               "Ljava/lang/String;Ljava/lang/String;)V");
       if (JNIUtil::isJavaExceptionThrown() || midCT == 0)
         POP_AND_RETURN_NULL;
     }
@@ -886,8 +887,18 @@ CreateJ::CommitInfo(const svn_commit_inf
 
   jlong jRevision = commit_info->revision;
 
+  jstring jPostCommitError = JNIUtil::makeJString(
+                                            commit_info->post_commit_err);
+  if (JNIUtil::isJavaExceptionThrown())
+    POP_AND_RETURN_NULL;
+
+  jstring jReposRoot = JNIUtil::makeJString(commit_info->repos_root);
+  if (JNIUtil::isJavaExceptionThrown())
+    POP_AND_RETURN_NULL;
+
   // call the Java method
-  jobject jInfo = env->NewObject(clazz, midCT, jRevision, jDate, jAuthor);
+  jobject jInfo = env->NewObject(clazz, midCT, jRevision, jDate, jAuthor,
+                                 jPostCommitError, jReposRoot);
   if (JNIUtil::isJavaExceptionThrown())
     POP_AND_RETURN_NULL;
 

Modified: subversion/branches/revprop-packing/subversion/bindings/javahl/native/File.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/javahl/native/File.cpp?rev=1161147&r1=1161146&r2=1161147&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/javahl/native/File.cpp (original)
+++ subversion/branches/revprop-packing/subversion/bindings/javahl/native/File.cpp Wed Aug 24 15:16:50 2011
@@ -90,7 +90,7 @@ const char *File::getInternalStyle(const
 {
   const char *path = getAbsPath();
   if (path)
-    return svn_dirent_internal_style(path, requestPool.pool());
+    return svn_dirent_internal_style(path, requestPool.getPool());
   else
     return NULL;
 }

Modified: subversion/branches/revprop-packing/subversion/bindings/javahl/native/InputStream.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/javahl/native/InputStream.cpp?rev=1161147&r1=1161146&r2=1161147&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/javahl/native/InputStream.cpp (original)
+++ subversion/branches/revprop-packing/subversion/bindings/javahl/native/InputStream.cpp Wed Aug 24 15:16:50 2011
@@ -53,7 +53,7 @@ svn_stream_t *InputStream::getStream(con
 {
   // Create a stream with this as the baton and set the read and
   // close functions.
-  svn_stream_t *ret = svn_stream_create(this, pool.pool());
+  svn_stream_t *ret = svn_stream_create(this, pool.getPool());
   svn_stream_set_read(ret, InputStream::read);
   svn_stream_set_close(ret, InputStream::close);
   return ret;

Modified: subversion/branches/revprop-packing/subversion/bindings/javahl/native/JNIThreadData.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/javahl/native/JNIThreadData.cpp?rev=1161147&r1=1161146&r2=1161147&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/javahl/native/JNIThreadData.cpp (original)
+++ subversion/branches/revprop-packing/subversion/bindings/javahl/native/JNIThreadData.cpp Wed Aug 24 15:16:50 2011
@@ -41,7 +41,6 @@ JNIThreadData::JNIThreadData()
 {
   m_env = NULL;
   m_exceptionThrown = false;
-  m_requestPool = NULL;
   m_previous = NULL;
 }
 

Modified: subversion/branches/revprop-packing/subversion/bindings/javahl/native/JNIThreadData.h
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/javahl/native/JNIThreadData.h?rev=1161147&r1=1161146&r2=1161147&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/javahl/native/JNIThreadData.h (original)
+++ subversion/branches/revprop-packing/subversion/bindings/javahl/native/JNIThreadData.h Wed Aug 24 15:16:50 2011
@@ -61,10 +61,6 @@ class JNIThreadData
    */
   char m_formatBuffer[JNIUtil::formatBufferSize];
 
-  /**
-   * The pool for the current request (call).
-   */
-  SVN::Pool *m_requestPool;
  private:
   /**
    * Pointer to previous thread information to enable reentrent

Modified: subversion/branches/revprop-packing/subversion/bindings/javahl/native/JNIUtil.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/javahl/native/JNIUtil.cpp?rev=1161147&r1=1161146&r2=1161147&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/javahl/native/JNIUtil.cpp (original)
+++ subversion/branches/revprop-packing/subversion/bindings/javahl/native/JNIUtil.cpp Wed Aug 24 15:16:50 2011
@@ -64,7 +64,6 @@ apr_pool_t *JNIUtil::g_pool = NULL;
 std::list<SVNBase*> JNIUtil::g_finalizedObjects;
 JNIMutex *JNIUtil::g_finalizedObjectsMutex = NULL;
 JNIMutex *JNIUtil::g_logMutex = NULL;
-JNIMutex *JNIUtil::g_globalPoolMutext = NULL;
 bool JNIUtil::g_initException;
 bool JNIUtil::g_inInit;
 JNIEnv *JNIUtil::g_initEnv;
@@ -127,39 +126,7 @@ bool JNIUtil::JNIGlobalInit(JNIEnv *env)
 
   apr_status_t status;
 
-  /* C programs default to the "C" locale. But because svn is supposed
-     to be i18n-aware, it should inherit the default locale of its
-     environment.  */
-  if (!setlocale(LC_ALL, ""))
-    {
-      if (stderr)
-        {
-          const char *env_vars[] = { "LC_ALL", "LC_CTYPE", "LANG", NULL };
-          const char **env_var = &env_vars[0], *env_val = NULL;
-          while (*env_var)
-            {
-              env_val = getenv(*env_var);
-              if (env_val && env_val[0])
-                break;
-              ++env_var;
-            }
 
-          if (!*env_var)
-            {
-              /* Unlikely. Can setlocale fail if no env vars are set? */
-              --env_var;
-              env_val = "not set";
-            }
-
-          fprintf(stderr,
-                  "%s: error: cannot set LC_ALL locale\n"
-                  "%s: error: environment variable %s is %s\n"
-                  "%s: error: please check that your locale name is "
-                  "correct\n",
-                  "svnjavahl", "svnjavahl", *env_var, env_val, "svnjavahl");
-        }
-      return FALSE;
-    }
 
   /* Initialize the APR subsystem, and register an atexit() function
    * to Uninitialize that subsystem at program exit. */
@@ -196,6 +163,19 @@ bool JNIUtil::JNIGlobalInit(JNIEnv *env)
       return FALSE;
     }
 
+  /* Create our top-level pool. */
+  g_pool = svn_pool_create(NULL);
+
+  apr_allocator_t* allocator = apr_pool_allocator_get(g_pool);
+
+  if (allocator)
+    {
+      /* Keep a maximum of 1 free block, to release memory back to the JVM
+         (and other modules). */
+      apr_allocator_max_free_set(allocator, 1);
+    }
+
+
 #ifdef ENABLE_NLS
 #ifdef WIN32
   {
@@ -207,7 +187,7 @@ bool JNIUtil::JNIGlobalInit(JNIEnv *env)
     apr_size_t inwords, outbytes;
     unsigned int outlength;
 
-    apr_pool_create(&pool, 0);
+    pool = svn_pool_create(g_pool);
     /* get dll name - our locale info will be in '../share/locale' */
     inwords = sizeof(ucs2_path) / sizeof(ucs2_path[0]);
     HINSTANCE moduleHandle = GetModuleHandle("libsvnjavahl-1");
@@ -232,16 +212,13 @@ bool JNIUtil::JNIGlobalInit(JNIEnv *env)
     internal_path = svn_dirent_join(internal_path, SVN_LOCALE_RELATIVE_PATH,
                                   pool);
     bindtextdomain(PACKAGE_NAME, internal_path);
-    apr_pool_destroy(pool);
+    svn_pool_destroy(pool);
   }
 #else
   bindtextdomain(PACKAGE_NAME, SVN_LOCALE_DIR);
 #endif
 #endif
 
-  /* Create our top-level pool. */
-  g_pool = svn_pool_create(NULL);
-
 #if defined(WIN32) || defined(__CYGWIN__)
   /* See http://svn.apache.org/repos/asf/subversion/trunk/notes/asp-dot-net-hack.txt */
   /* ### This code really only needs to be invoked by consumers of
@@ -272,10 +249,6 @@ bool JNIUtil::JNIGlobalInit(JNIEnv *env)
   if (isExceptionThrown())
     return false;
 
-  g_globalPoolMutext = new JNIMutex(g_pool);
-  if (isExceptionThrown())
-    return false;
-
   // initialized the thread local storage
   if (!JNIThreadData::initThreadData())
     return false;
@@ -298,15 +271,6 @@ apr_pool_t *JNIUtil::getPool()
   return g_pool;
 }
 
-/**
- * Return the mutex securing the global pool.
- * @return the mutex for the global pool
- */
-JNIMutex *JNIUtil::getGlobalPoolMutex()
-{
-  return g_globalPoolMutext;
-}
-
 void JNIUtil::raiseThrowable(const char *name, const char *message)
 {
   if (getLogLevel() >= errorLog)
@@ -655,7 +619,7 @@ bool JNIUtil::isJavaExceptionThrown()
 }
 
 const char *
-JNIUtil::thrownExceptionToCString()
+JNIUtil::thrownExceptionToCString(SVN::Pool &in_pool)
 {
   const char *msg;
   JNIEnv *env = getEnv();
@@ -672,7 +636,7 @@ JNIUtil::thrownExceptionToCString()
         }
       jstring jmsg = (jstring) env->CallObjectMethod(t, getMessage);
       JNIStringHolder tmp(jmsg);
-      msg = tmp.pstrdup(getRequestPool()->pool());
+      msg = tmp.pstrdup(in_pool.getPool());
       // ### Conditionally add t.printStackTrace() to msg?
     }
   else
@@ -808,25 +772,6 @@ jobject JNIUtil::createDate(apr_time_t t
 }
 
 /**
- * Return the request pool. The request pool will be destroyed after each
- * request (call).
- * @return the pool to be used for this request
- */
-SVN::Pool *JNIUtil::getRequestPool()
-{
-  return JNIThreadData::getThreadData()->m_requestPool;
-}
-
-/**
- * Set the request pool in thread local storage.
- * @param pool  the request pool
- */
-void JNIUtil::setRequestPool(SVN::Pool *pool)
-{
-  JNIThreadData::getThreadData()->m_requestPool = pool;
-}
-
-/**
  * Create a Java byte array from an array of characters.
  * @param data      the character array
  * @param length    the number of characters in the array

Modified: subversion/branches/revprop-packing/subversion/bindings/javahl/native/JNIUtil.h
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/javahl/native/JNIUtil.h?rev=1161147&r1=1161146&r2=1161147&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/javahl/native/JNIUtil.h (original)
+++ subversion/branches/revprop-packing/subversion/bindings/javahl/native/JNIUtil.h Wed Aug 24 15:16:50 2011
@@ -63,8 +63,6 @@ class JNIUtil
 
   static void throwNullPointerException(const char *message);
   static jbyteArray makeJByteArray(const signed char *data, int length);
-  static void setRequestPool(SVN::Pool *pool);
-  static SVN::Pool *getRequestPool();
   static jobject createDate(apr_time_t time);
   static void logMessage(const char *message);
   static int getLogLevel();
@@ -103,7 +101,7 @@ class JNIUtil
    * occurred. Useful for converting Java @c Exceptions into @c
    * svn_error_t's.
    */
-  static const char *thrownExceptionToCString();
+  static const char *thrownExceptionToCString(SVN::Pool &in_pool);
 
   /**
    * Throw a Java exception corresponding to err, and run
@@ -135,7 +133,7 @@ class JNIUtil
   static apr_pool_t *getPool();
   static bool JNIGlobalInit(JNIEnv *env);
   static bool JNIInit(JNIEnv *env);
-  static JNIMutex *getGlobalPoolMutex();
+  static bool initializeJNIRuntime();
   enum { formatBufferSize = 2048 };
   enum { noLog, errorLog, exceptionLog, entryLog } LogLevel;
 
@@ -202,11 +200,6 @@ class JNIUtil
    * The stream to write log messages to.
    */
   static std::ofstream g_logStream;
-
-  /**
-   * Flag to secure our global pool.
-   */
-  static JNIMutex *g_globalPoolMutext;
 };
 
 /**

Modified: subversion/branches/revprop-packing/subversion/bindings/javahl/native/OutputStream.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/javahl/native/OutputStream.cpp?rev=1161147&r1=1161146&r2=1161147&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/javahl/native/OutputStream.cpp (original)
+++ subversion/branches/revprop-packing/subversion/bindings/javahl/native/OutputStream.cpp Wed Aug 24 15:16:50 2011
@@ -56,7 +56,7 @@ svn_stream_t *OutputStream::getStream(co
 {
   // Create a stream with this as the baton and set the write and
   // close functions.
-  svn_stream_t *ret = svn_stream_create(this, pool.pool());
+  svn_stream_t *ret = svn_stream_create(this, pool.getPool());
   svn_stream_set_write(ret, OutputStream::write);
   svn_stream_set_close(ret, OutputStream::close);
   return ret;

Modified: subversion/branches/revprop-packing/subversion/bindings/javahl/native/Path.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/javahl/native/Path.cpp?rev=1161147&r1=1161146&r2=1161147&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/javahl/native/Path.cpp (original)
+++ subversion/branches/revprop-packing/subversion/bindings/javahl/native/Path.cpp Wed Aug 24 15:16:50 2011
@@ -36,9 +36,9 @@
  * @see Path::Path(const std::string &)
  * @param path Path string
  */
-Path::Path(const char *pi_path)
+Path::Path(const char *pi_path, SVN::Pool &in_pool)
 {
-  init(pi_path);
+  init(pi_path, in_pool);
 }
 
 /**
@@ -48,9 +48,9 @@ Path::Path(const char *pi_path)
  *
  * @param path Path string
  */
-Path::Path(const std::string &pi_path)
+Path::Path(const std::string &pi_path, SVN::Pool &in_pool)
 {
-  init(pi_path.c_str());
+  init(pi_path.c_str(), in_pool);
 }
 
 /**
@@ -58,9 +58,9 @@ Path::Path(const std::string &pi_path)
  *
  * @param path Path to be copied
  */
-Path::Path(const Path &pi_path)
+Path::Path(const Path &pi_path, SVN::Pool &in_pool)
 {
-  init(pi_path.c_str());
+  init(pi_path.c_str(), in_pool);
 }
 
 /**
@@ -69,7 +69,7 @@ Path::Path(const Path &pi_path)
  * @param path Path string
  */
 void
-Path::init(const char *pi_path)
+Path::init(const char *pi_path, SVN::Pool &in_pool)
 {
   if (*pi_path == 0)
     {
@@ -78,9 +78,7 @@ Path::init(const char *pi_path)
     }
   else
     {
-      m_error_occured =
-        JNIUtil::preprocessPath(pi_path,
-                                JNIUtil::getRequestPool()->pool() );
+      m_error_occured = JNIUtil::preprocessPath(pi_path, in_pool.getPool());
 
       m_path = pi_path;
     }
@@ -110,7 +108,9 @@ Path::c_str() const
 Path&
 Path::operator=(const Path &pi_path)
 {
-  init(pi_path.c_str());
+  m_error_occured = NULL;
+  m_path = pi_path.m_path;
+
   return *this;
 }
 
@@ -125,7 +125,7 @@ jboolean Path::isValid(const char *p)
     return JNI_FALSE;
 
   SVN::Pool requestPool;
-  svn_error_t *err = svn_path_check_valid(p, requestPool.pool());
+  svn_error_t *err = svn_path_check_valid(p, requestPool.getPool());
   if (err == SVN_NO_ERROR)
     {
       return JNI_TRUE;

Modified: subversion/branches/revprop-packing/subversion/bindings/javahl/native/Path.h
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/javahl/native/Path.h?rev=1161147&r1=1161146&r2=1161147&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/javahl/native/Path.h (original)
+++ subversion/branches/revprop-packing/subversion/bindings/javahl/native/Path.h Wed Aug 24 15:16:50 2011
@@ -29,6 +29,7 @@
 
 #include <string>
 #include <jni.h>
+#include "Pool.h"
 struct svn_error_t;
 
 /**
@@ -47,7 +48,7 @@ class Path
    *
    * @param pi_path Path string
    */
-  void init(const char *pi_path);
+  void init(const char *pi_path, SVN::Pool &in_pool);
 
  public:
   /**
@@ -57,7 +58,7 @@ class Path
    *
    * @param pi_path Path string
    */
-  Path(const std::string &pi_path = "");
+  Path(const std::string &pi_path, SVN::Pool &in_pool);
 
   /**
    * Constructor
@@ -65,14 +66,14 @@ class Path
    * @see Path::Path (const std::string &)
    * @param pi_path Path string
    */
-  Path(const char *pi_path);
+  Path(const char *pi_path, SVN::Pool &in_pool);
 
   /**
    * Copy constructor
    *
    * @param pi_path Path to be copied
    */
-  Path(const Path &pi_path);
+  Path(const Path &pi_path, SVN::Pool &in_pool);
 
   /**
    * Assignment operator

Modified: subversion/branches/revprop-packing/subversion/bindings/javahl/native/Pool.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/javahl/native/Pool.cpp?rev=1161147&r1=1161146&r2=1161147&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/javahl/native/Pool.cpp (original)
+++ subversion/branches/revprop-packing/subversion/bindings/javahl/native/Pool.cpp Wed Aug 24 15:16:50 2011
@@ -31,14 +31,27 @@
 #include "svn_pools.h"
 
 /**
- * Constructor to create one apr pool as the subpool of the global pool
- * store this pool as the request pool.
+ * Constructor to create one apr pool as the subpool of the global pool.
  */
 SVN::Pool::Pool()
 {
-  JNICriticalSection criticalSection(*JNIUtil::getGlobalPoolMutex());
   m_pool = svn_pool_create(JNIUtil::getPool());
-  JNIUtil::setRequestPool(this);
+}
+
+/**
+ * Constructor to create one apr pool as a subpool of the passed pool.
+ */
+SVN::Pool::Pool(const Pool &parent_pool)
+{
+  m_pool = svn_pool_create(parent_pool.m_pool);
+}
+
+/**
+ * Constructor to create one apr pool as a subpool of the passed pool.
+ */
+SVN::Pool::Pool(apr_pool_t *parent_pool)
+{
+  m_pool = svn_pool_create(parent_pool);
 }
 
 /**
@@ -47,8 +60,10 @@ SVN::Pool::Pool()
  */
 SVN::Pool::~Pool()
 {
-  JNICriticalSection criticalSection(*JNIUtil::getGlobalPoolMutex());
-  JNIUtil::setRequestPool(NULL);
   if (m_pool)
-    svn_pool_destroy(m_pool);
+    {
+      svn_pool_destroy(m_pool);
+      m_pool = NULL;
+    }
 }
+

Modified: subversion/branches/revprop-packing/subversion/bindings/javahl/native/Pool.h
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/javahl/native/Pool.h?rev=1161147&r1=1161146&r2=1161147&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/javahl/native/Pool.h (original)
+++ subversion/branches/revprop-packing/subversion/bindings/javahl/native/Pool.h Wed Aug 24 15:16:50 2011
@@ -39,8 +39,10 @@ namespace SVN {
   {
   public:
     Pool();
+    Pool(const Pool &parent_pool);
+    Pool(apr_pool_t *parent_pool);
     ~Pool();
-    apr_pool_t *pool() const;
+    apr_pool_t *getPool() const;
     void clear() const;
 
   private:
@@ -50,14 +52,14 @@ namespace SVN {
     apr_pool_t *m_pool;
 
     /**
-     * We declare the copy constructor and assignment operator private
-     * here, so that the compiler won't inadvertently use them for us.
-     * The default copy constructor just copies all the data members,
-     * which would create two pointers to the same pool, one of which
-     * would get destroyed while the other thought it was still
-     * valid...and BOOM!  Hence the private declaration.
+     * We declare the assignment operator private here, so that the compiler
+     * won't inadvertently use them for us.
+     * The default code just copies all the data members, which would create
+     * two pointers to the same pool, one of which would get destroyed while
+     * the other thought it was still valid...and BOOM!
+     *
+     * Hence the private declaration.
      */
-    Pool(Pool &that);
     Pool &operator=(Pool &that);
   };
 
@@ -65,7 +67,7 @@ namespace SVN {
   // need to be implemented in the header file for that to happen.
 
   inline
-  apr_pool_t *Pool::pool() const
+  apr_pool_t *Pool::getPool() const
   {
     return m_pool;
   }

Modified: subversion/branches/revprop-packing/subversion/bindings/javahl/native/Prompter.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/javahl/native/Prompter.cpp?rev=1161147&r1=1161146&r2=1161147&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/javahl/native/Prompter.cpp (original)
+++ subversion/branches/revprop-packing/subversion/bindings/javahl/native/Prompter.cpp Wed Aug 24 15:16:50 2011
@@ -361,9 +361,9 @@ bool Prompter::prompt(const char *realm,
   return ret ? true:false;
 }
 
-svn_auth_provider_object_t *Prompter::getProviderSimple()
+svn_auth_provider_object_t *Prompter::getProviderSimple(SVN::Pool &in_pool)
 {
-  apr_pool_t *pool = JNIUtil::getRequestPool()->pool();
+  apr_pool_t *pool = in_pool.getPool();
   svn_auth_provider_object_t *provider;
   svn_auth_get_simple_prompt_provider(&provider,
                                       simple_prompt,
@@ -374,9 +374,9 @@ svn_auth_provider_object_t *Prompter::ge
   return provider;
 }
 
-svn_auth_provider_object_t *Prompter::getProviderUsername()
+svn_auth_provider_object_t *Prompter::getProviderUsername(SVN::Pool &in_pool)
 {
-  apr_pool_t *pool = JNIUtil::getRequestPool()->pool();
+  apr_pool_t *pool = in_pool.getPool();
   svn_auth_provider_object_t *provider;
   svn_auth_get_username_prompt_provider(&provider,
                                         username_prompt,
@@ -387,9 +387,9 @@ svn_auth_provider_object_t *Prompter::ge
   return provider;
 }
 
-svn_auth_provider_object_t *Prompter::getProviderServerSSLTrust()
+svn_auth_provider_object_t *Prompter::getProviderServerSSLTrust(SVN::Pool &in_pool)
 {
-  apr_pool_t *pool = JNIUtil::getRequestPool()->pool();
+  apr_pool_t *pool = in_pool.getPool();
   svn_auth_provider_object_t *provider;
   svn_auth_get_ssl_server_trust_prompt_provider
     (&provider, ssl_server_trust_prompt, this, pool);
@@ -397,9 +397,9 @@ svn_auth_provider_object_t *Prompter::ge
   return provider;
 }
 
-svn_auth_provider_object_t *Prompter::getProviderClientSSL()
+svn_auth_provider_object_t *Prompter::getProviderClientSSL(SVN::Pool &in_pool)
 {
-  apr_pool_t *pool = JNIUtil::getRequestPool()->pool();
+  apr_pool_t *pool = in_pool.getPool();
   svn_auth_provider_object_t *provider;
   svn_auth_get_ssl_client_cert_prompt_provider(&provider,
                                                ssl_client_cert_prompt,
@@ -410,9 +410,9 @@ svn_auth_provider_object_t *Prompter::ge
   return provider;
 }
 
-svn_auth_provider_object_t *Prompter::getProviderClientSSLPassword()
+svn_auth_provider_object_t *Prompter::getProviderClientSSLPassword(SVN::Pool &in_pool)
 {
-  apr_pool_t *pool = JNIUtil::getRequestPool()->pool();
+  apr_pool_t *pool = in_pool.getPool();
   svn_auth_provider_object_t *provider;
   svn_auth_get_ssl_client_cert_pw_prompt_provider
     (&provider, ssl_client_cert_pw_prompt, this, 2 /* retry limit */,

Modified: subversion/branches/revprop-packing/subversion/bindings/javahl/native/Prompter.h
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/javahl/native/Prompter.h?rev=1161147&r1=1161146&r2=1161147&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/javahl/native/Prompter.h (original)
+++ subversion/branches/revprop-packing/subversion/bindings/javahl/native/Prompter.h Wed Aug 24 15:16:50 2011
@@ -30,7 +30,7 @@
 #include <jni.h>
 #include "svn_auth.h"
 #include <string>
-
+#include "Pool.h"
 /**
  * This class requests username/password and informations about
  * ssl-certificates from the user.
@@ -96,11 +96,11 @@ class Prompter
  public:
   static Prompter *makeCPrompter(jobject jprompter);
   ~Prompter();
-  svn_auth_provider_object_t *getProviderUsername();
-  svn_auth_provider_object_t *getProviderSimple();
-  svn_auth_provider_object_t *getProviderServerSSLTrust();
-  svn_auth_provider_object_t *getProviderClientSSL();
-  svn_auth_provider_object_t *getProviderClientSSLPassword();
+  svn_auth_provider_object_t *getProviderUsername(SVN::Pool &in_pool);
+  svn_auth_provider_object_t *getProviderSimple(SVN::Pool &in_pool);
+  svn_auth_provider_object_t *getProviderServerSSLTrust(SVN::Pool &in_pool);
+  svn_auth_provider_object_t *getProviderClientSSL(SVN::Pool &in_pool);
+  svn_auth_provider_object_t *getProviderClientSSLPassword(SVN::Pool &in_pool);
 
   static svn_error_t *plaintext_prompt(svn_boolean_t *may_save_plaintext,
                                        const char *realmstring,

Modified: subversion/branches/revprop-packing/subversion/bindings/javahl/native/RevisionRange.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/javahl/native/RevisionRange.cpp?rev=1161147&r1=1161146&r2=1161147&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/javahl/native/RevisionRange.cpp (original)
+++ subversion/branches/revprop-packing/subversion/bindings/javahl/native/RevisionRange.cpp Wed Aug 24 15:16:50 2011
@@ -87,7 +87,7 @@ const svn_opt_revision_range_t *Revision
     return NULL;
 
   svn_opt_revision_range_t *range =
-    (svn_opt_revision_range_t *) apr_palloc(pool.pool(), sizeof(*range));
+    (svn_opt_revision_range_t *) apr_palloc(pool.getPool(), sizeof(*range));
 
   range->start = *startRevision.revision();
   if (JNIUtil::isExceptionThrown())

Modified: subversion/branches/revprop-packing/subversion/bindings/javahl/native/RevpropTable.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/javahl/native/RevpropTable.cpp?rev=1161147&r1=1161146&r2=1161147&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/javahl/native/RevpropTable.cpp (original)
+++ subversion/branches/revprop-packing/subversion/bindings/javahl/native/RevpropTable.cpp Wed Aug 24 15:16:50 2011
@@ -46,15 +46,15 @@ const apr_hash_t *RevpropTable::hash(con
   if (m_revprops.size() == 0)
     return NULL;
 
-  apr_hash_t *revprop_table = apr_hash_make(pool.pool());
+  apr_hash_t *revprop_table = apr_hash_make(pool.getPool());
 
   std::map<std::string, std::string>::const_iterator it;
   for (it = m_revprops.begin(); it != m_revprops.end(); ++it)
     {
-      const char *propname = apr_pstrdup(pool.pool(), it->first.c_str());
+      const char *propname = apr_pstrdup(pool.getPool(), it->first.c_str());
       if (!svn_prop_name_is_valid(propname))
         {
-          const char *msg = apr_psprintf(pool.pool(),
+          const char *msg = apr_psprintf(pool.getPool(),
                                          "Invalid property name: '%s'",
                                          propname);
           JNIUtil::throwNativeException(JAVA_PACKAGE "/ClientException", msg,
@@ -63,7 +63,7 @@ const apr_hash_t *RevpropTable::hash(con
         }
 
       svn_string_t *propval = svn_string_create(it->second.c_str(),
-                                                pool.pool());
+                                                pool.getPool());
 
       apr_hash_set(revprop_table, propname, APR_HASH_KEY_STRING, propval);
     }



Mime
View raw message