You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by iv...@apache.org on 2014/06/25 20:16:51 UTC

svn commit: r1605535 [1/3] - in /subversion/branches/remove-log-addressing: ./ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversion/bindings/javahl/tests/org/apache/subversion/javahl/ subversion/bin...

Author: ivan
Date: Wed Jun 25 18:16:50 2014
New Revision: 1605535

URL: http://svn.apache.org/r1605535
Log:
On remove-log-addressing branch: Merge changes from trunk.

Modified:
    subversion/branches/remove-log-addressing/   (props changed)
    subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/SVNClient.cpp
    subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/SVNClient.h
    subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
    subversion/branches/remove-log-addressing/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
    subversion/branches/remove-log-addressing/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNConfig.java
    subversion/branches/remove-log-addressing/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
    subversion/branches/remove-log-addressing/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
    subversion/branches/remove-log-addressing/subversion/bindings/swig/ruby/test/test_client.rb
    subversion/branches/remove-log-addressing/subversion/include/private/svn_string_private.h
    subversion/branches/remove-log-addressing/subversion/include/svn_client.h
    subversion/branches/remove-log-addressing/subversion/include/svn_fs.h
    subversion/branches/remove-log-addressing/subversion/include/svn_path.h
    subversion/branches/remove-log-addressing/subversion/include/svn_types.h
    subversion/branches/remove-log-addressing/subversion/include/svn_wc.h
    subversion/branches/remove-log-addressing/subversion/libsvn_client/diff.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/cached_data.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/cached_data.h
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/dag.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/fs_fs.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/hotcopy.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/id.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/id.h
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/low_level.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/low_level.h
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/recovery.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/rev_file.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/rev_file.h
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/temp_serializer.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/transaction.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/transaction.h
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/tree.c
    subversion/branches/remove-log-addressing/subversion/libsvn_repos/log.c
    subversion/branches/remove-log-addressing/subversion/libsvn_repos/repos.c
    subversion/branches/remove-log-addressing/subversion/libsvn_subr/checksum.c
    subversion/branches/remove-log-addressing/subversion/libsvn_subr/io.c
    subversion/branches/remove-log-addressing/subversion/libsvn_subr/string.c
    subversion/branches/remove-log-addressing/subversion/mod_dav_svn/dav_svn.h
    subversion/branches/remove-log-addressing/subversion/svn/log-cmd.c
    subversion/branches/remove-log-addressing/subversion/svn/notify.c
    subversion/branches/remove-log-addressing/subversion/svn/svn.c
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/commit_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/depth_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/diff_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/svnadmin_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/svntest/wc.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/trans_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/libsvn_subr/dirent_uri-test.c
    subversion/branches/remove-log-addressing/tools/dev/unix-build/Makefile.svn
    subversion/branches/remove-log-addressing/tools/server-side/svn-rep-sharing-stats.c

Propchange: subversion/branches/remove-log-addressing/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1604133-1605441

Modified: subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/SVNClient.cpp?rev=1605535&r1=1605534&r2=1605535&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/SVNClient.cpp (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/SVNClient.cpp Wed Jun 25 18:16:50 2014
@@ -510,7 +510,12 @@ void SVNClient::mkdir(Targets &targets, 
                                   ctx, subPool.getPool()), );
 }
 
-void SVNClient::cleanup(const char *path)
+void SVNClient::cleanup(const char *path,
+                        bool break_locks,
+                        bool fix_recorded_timestamps,
+                        bool clear_dav_cache,
+                        bool remove_unused_pristines,
+                        bool include_externals)
 {
     SVN::Pool subPool(pool);
     SVN_JNI_NULL_PTR_EX(path, "path", );
@@ -521,7 +526,13 @@ void SVNClient::cleanup(const char *path
     if (ctx == NULL)
         return;
 
-    SVN_JNI_ERR(svn_client_cleanup(intPath.c_str(), ctx, subPool.getPool()),);
+    SVN_JNI_ERR(svn_client_cleanup2(intPath.c_str(),
+                                    break_locks,
+                                    fix_recorded_timestamps,
+                                    clear_dav_cache,
+                                    remove_unused_pristines,
+                                    include_externals,
+                                    ctx, subPool.getPool()),);
 }
 
 void SVNClient::resolve(const char *path, svn_depth_t depth,
@@ -1479,6 +1490,29 @@ SVNClient::patch(const char *patchPath, 
                                  ctx, subPool.getPool()), );
 }
 
+void SVNClient::vacuum(const char *path,
+                       bool remove_unversioned_items,
+                       bool remove_ignored_items,
+                       bool fix_recorded_timestamps,
+                       bool remove_unused_pristines,
+                       bool include_externals)
+{
+    SVN_JNI_NULL_PTR_EX(path, "path", );
+
+    SVN::Pool subPool(pool);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
+    if (ctx == NULL)
+        return;
+
+    SVN_JNI_ERR(svn_client_vacuum(path,
+                                  remove_unversioned_items,
+                                  remove_ignored_items,
+                                  fix_recorded_timestamps,
+                                  remove_unused_pristines,
+                                  include_externals,
+                                  ctx, subPool.getPool()), );
+}
+
 jobject
 SVNClient::openRemoteSession(const char* path, int retryAttempts)
 {

Modified: subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/SVNClient.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/SVNClient.h?rev=1605535&r1=1605534&r2=1605535&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/SVNClient.h (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/SVNClient.h Wed Jun 25 18:16:50 2014
@@ -63,6 +63,10 @@ class SVNClient :public SVNBase
 {
  public:
   jobject openRemoteSession(const char* path, int);
+  void vacuum(const char *path,
+              bool remove_unversioned_items, bool remove_ignored_items,
+              bool fix_recorded_timestamps, bool remove_unused_pristines,
+              bool include_externals);
   void patch(const char *patchPath, const char *targetPath, bool dryRun,
              int stripCount, bool reverse, bool ignoreWhitespace,
              bool removeTempfiles, PatchCallback *callback);
@@ -131,7 +135,12 @@ class SVNClient :public SVNBase
                  svn_depth_t depth, const char *nativeEOL);
   void resolve(const char *path, svn_depth_t depth,
                svn_wc_conflict_choice_t choice);
-  void cleanup(const char *path);
+  void cleanup(const char *path,
+               bool break_locks,
+               bool fix_recorded_timestamps,
+               bool clear_dav_cache,
+               bool remove_unused_pristines,
+               bool include_externals);
   void mkdir(Targets &targets, CommitMessage *message, bool makeParents,
              PropertyTable &revprops, CommitCallback *callback);
   void move(Targets &srcPaths, const char *destPath,

Modified: subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp?rev=1605535&r1=1605534&r2=1605535&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp Wed Jun 25 18:16:50 2014
@@ -667,7 +667,10 @@ Java_org_apache_subversion_javahl_SVNCli
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_cleanup
-(JNIEnv *env, jobject jthis, jstring jpath)
+(JNIEnv *env, jobject jthis, jstring jpath,
+ jboolean jbreakLocks, jboolean jfixRecordedTimestamps,
+ jboolean jclearDavCache, jboolean jremoveUnusedPristines,
+ jboolean jincludeExternals)
 {
   JNIEntry(SVNClient, cleanup);
   SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -680,7 +683,9 @@ Java_org_apache_subversion_javahl_SVNCli
   if (JNIUtil::isExceptionThrown())
     return;
 
-  cl->cleanup(path);
+  cl->cleanup(path, jbreakLocks, jfixRecordedTimestamps,
+              jclearDavCache, jremoveUnusedPristines,
+              jincludeExternals);
 }
 
 JNIEXPORT void JNICALL
@@ -1947,6 +1952,28 @@ Java_org_apache_subversion_javahl_SVNCli
             jremoveTempfiles ? true : false, &callback);
 }
 
+JNIEXPORT void JNICALL
+Java_org_apache_subversion_javahl_SVNClient_vacuum
+(JNIEnv *env, jobject jthis, jstring jpath,
+ jboolean jremoveUnversionedItems, jboolean jremoveIgnoredItems,
+ jboolean jfixRecordedTimestamps, jboolean jremoveUnusedPristines,
+ jboolean jincludeExternals)
+{
+  JNIEntry(SVNClient, patch);
+  SVNClient *cl = SVNClient::getCppObject(jthis);
+  if (cl == NULL)
+    {
+      JNIUtil::throwError("bad C++ this");
+      return;
+    }
+
+  JNIStringHolder path(jpath);
+  cl->vacuum(path,
+             jremoveUnversionedItems, jremoveIgnoredItems,
+             jfixRecordedTimestamps, jremoveUnusedPristines,
+             jincludeExternals);
+}
+
 JNIEXPORT jobject JNICALL
 Java_org_apache_subversion_javahl_SVNClient_nativeOpenRemoteSession
 (JNIEnv *env, jobject jthis, jstring jpath, jint jretryAttempts)

Modified: subversion/branches/remove-log-addressing/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java?rev=1605535&r1=1605534&r2=1605535&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java Wed Jun 25 18:16:50 2014
@@ -446,6 +446,30 @@ public interface ISVNClient
      * Recursively cleans up a local directory, finishing any
      * incomplete operations, removing lockfiles, etc.
      * @param path a local directory.
+     * @param breakLocks ### FIXME: Missing docstring in svn_client.h
+     * @param clearDavCache ### FIXME: Missing docstring in svn_client.h
+     * @param removeUnusedPristines ### FIXME: Missing docstring in svn_client.h
+     * @param includeExternals Recurse into externals working copies
+     *        and clean them up, too.
+     * @throws ClientException
+     * @since 1.9
+     */
+    void cleanup(String path,
+                 boolean breakLocks,
+                 boolean fixRecordedTimestamps,
+                 boolean clearDavCache,
+                 boolean removeUnusedPristines,
+                 boolean includeExternals)
+        throws ClientException;
+
+    /**
+     * Recursively cleans up a local directory, finishing any
+     * incomplete operations, removing lockfiles, etc.
+     * <p>
+     * Behaves like the 1.9 version with <code>breakLocks</code> and
+     * <code>includeExternals</code> set to <code>false<code>, and the
+     * other flags to <code>true</code>.
+     * @param path a local directory.
      * @throws ClientException
      */
     void cleanup(String path) throws ClientException;
@@ -1446,28 +1470,10 @@ public interface ISVNClient
     /**
      * Retrieve information about repository or working copy items.
      * <p>
-     * Behaves like {@see ISVNClient#info} with
-     * <code>includeExternals</code> set to <code>fals</code>
-     * @since 1.9
-     */
-    void info2(String pathOrUrl,
-               Revision revision, Revision pegRevision, Depth depth,
-               boolean fetchExcluded, boolean fetchActualOnly,
-               Collection<String> changelists, InfoCallback callback)
-        throws ClientException;
-
-    /**
-     * Retrieve information about repository or working copy items.
-     * <p>
      * Behaves like the 1.9 version, with <code>fetchExcluded</code>
-     * set to <code>false</code> and <code>fetchActualOnly</code> set
-     * to <code>true</code>.
-     * @param pathOrUrl     the path or the url of the item
-     * @param revision      the revision of the item to return
-     * @param pegRevision   the revision to interpret pathOrUrl
-     * @param depth         the depth to recurse
-     * @param changelists   if non-null, filter paths using changelists
-     * @param callback      a callback to receive the infos retrieved
+     * set to <code>false</code>, <code>fetchActualOnly</code> set to
+     * <code>true</code> anf <code>includeExternals</code> set to
+     * <code>false</code>.
      */
     void info2(String pathOrUrl, Revision revision, Revision pegRevision,
                Depth depth, Collection<String> changelists,
@@ -1511,6 +1517,37 @@ public interface ISVNClient
             throws ClientException;
 
     /**
+     * Recursively vacuum a working copy, removing unnecessary data.
+     * <p>
+     * This method will report an error when
+     * <code>removeUnversionedItems</code> or
+     * <code>removeIgnoredItems</code> are set, and the working copy
+     * is already locked. This prevents accidental corruption of the
+     * working copy if this method is invoked while another client is
+     * performing some other operation on the working copy.
+     * @param path The path of the working copy directory.
+     * @param removeUnversionedItems Remove unversioned items from the
+     *        working copy after it has been successfully cleaned up.
+     * @param removeIgnoredItems Remove unversioned items that are
+     *        ignored by Subversion, after the working copy has been
+     *        successfully cleaned up.
+     * @param fixRecordedTimestamps Update timestamps recorded in the
+     *        working copy database to their actual on-disk values.
+     * @param removeUnusedPristines Remove pristine files that are not
+     *        referenced by the working copy.
+     * @param includeExternals Recurse into externals working copies
+     *        and vacuum them, too.
+     * @since 1.9
+     */
+    void vacuum(String path,
+                boolean removeUnversionedItems,
+                boolean removeIgnoredItems,
+                boolean fixRecordedTimestamps,
+                boolean removeUnusedPristines,
+                boolean includeExternals)
+            throws ClientException;
+
+    /**
      * Open a persistent session to a repository.
      * <p>
      * <b>Note:</b> The session object inherits the progress callback,

Modified: subversion/branches/remove-log-addressing/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNConfig.java
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNConfig.java?rev=1605535&r1=1605534&r2=1605535&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNConfig.java (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNConfig.java Wed Jun 25 18:16:50 2014
@@ -59,6 +59,7 @@ public interface ISVNConfig
     public static final String LOG_ENCODING              = "log-encoding";
     public static final String USE_COMMIT_TIMES          = "use-commit-times";
     public static final String ENABLE_AUTO_PROPS         = "enable-auto-props";
+    public static final String ENABLE_MAGIC_FILE         = "enable-magic-file";
     public static final String NO_UNLOCK                 = "no-unlock";
     public static final String MIMETYPES_FILE            = "mime-types-file";
     public static final String PRESERVED_CF_EXTS         = "preserved-conflict-file-exts";
@@ -73,6 +74,7 @@ public interface ISVNConfig
     public static final String SECTION_WORKING_COPY  = "working-copy";
     public static final String SQLITE_EXCLUSIVE          = "exclusive-locking";
     public static final String SQLITE_EXCLUSIVE_CLIENTS  = "exclusive-locking-clients";
+    public static final String SQLITE_BUSY_TIMEOUT       = "busy-timeout";
 
     /**
      * Returns a reference to the "servers" configuration category.
@@ -110,6 +112,8 @@ public interface ISVNConfig
     public static final String HTTP_BULK_UPDATES         = "http-bulk-updates";
     public static final String HTTP_MAX_CONNECTIONS      = "http-max-connections";
     public static final String HTTP_CHUNKED_REQUESTS     = "http-chunked-requests";
+    public static final String SERF_LOG_COMPONENTS       = "serf-log-components";
+    public static final String SERF_LOG_LEVEL            = "serf-log-level";
 
     /**
      * "true" value in configuration. One of the values returned by

Modified: subversion/branches/remove-log-addressing/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java?rev=1605535&r1=1605534&r2=1605535&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java Wed Jun 25 18:16:50 2014
@@ -270,8 +270,18 @@ public class SVNClient implements ISVNCl
                              CommitMessageCallback handler, CommitCallback callback)
             throws ClientException;
 
-    public native void cleanup(String path)
-            throws ClientException;
+    public native void cleanup(String path,
+                               boolean breakLocks,
+                               boolean fixRecordedTimestamps,
+                               boolean clearDavCache,
+                               boolean removeUnusedPristines,
+                               boolean includeExternals)
+        throws ClientException;
+
+    public void cleanup(String path) throws ClientException
+    {
+        cleanup(path, false, true, true, true, false);
+    }
 
     public native void resolve(String path, Depth depth,
                                ConflictResult.Choice conflictResult)
@@ -754,17 +764,6 @@ public class SVNClient implements ISVNCl
 
     public void info2(String pathOrUrl, Revision revision,
                       Revision pegRevision, Depth depth,
-                      boolean fetchExcluded, boolean fetchActualOnly,
-                      Collection<String> changelists,
-                      InfoCallback callback)
-            throws ClientException
-    {
-        info(pathOrUrl, revision, pegRevision, depth,
-             fetchExcluded, fetchActualOnly, false, changelists, callback);
-    }
-
-    public void info2(String pathOrUrl, Revision revision,
-                      Revision pegRevision, Depth depth,
                       Collection<String> changelists,
                       InfoCallback callback)
             throws ClientException
@@ -779,6 +778,14 @@ public class SVNClient implements ISVNCl
                              PatchCallback callback)
             throws ClientException;
 
+    public native void vacuum(String wcPath,
+                              boolean removeUnversionedItems,
+                              boolean removeIgnoredItems,
+                              boolean fixRecordedTimestamps,
+                              boolean removeUnusedPristines,
+                              boolean includeExternals)
+            throws ClientException;
+
     public ISVNRemote openRemoteSession(String pathOrUrl)
             throws ClientException, SubversionException
     {

Modified: subversion/branches/remove-log-addressing/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java?rev=1605535&r1=1605534&r2=1605535&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java Wed Jun 25 18:16:50 2014
@@ -2278,7 +2278,7 @@ public class BasicTests extends SVNTests
     }
 
     /**
-     * Test the basic SVNClient.info2 functionality.
+     * Test the basic SVNClient.info functionality.
      * @throws Throwable
      * @since 1.2
      */
@@ -4305,8 +4305,9 @@ public class BasicTests extends SVNTests
     {
        final List<Info> infos = new ArrayList<Info>();
 
-       client.info2(pathOrUrl, revision, pegRevision, depth, true, true,
-                     changelists, new InfoCallback () {
+       client.info(pathOrUrl, revision, pegRevision, depth,
+                   true, true, false,
+                   changelists, new InfoCallback () {
             public void singleInfo(Info info)
             { infos.add(info); }
         });

Modified: subversion/branches/remove-log-addressing/subversion/bindings/swig/ruby/test/test_client.rb
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/swig/ruby/test/test_client.rb?rev=1605535&r1=1605534&r2=1605535&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/swig/ruby/test/test_client.rb (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/swig/ruby/test/test_client.rb Wed Jun 25 18:16:50 2014
@@ -179,7 +179,9 @@ class SvnClientTest < Test::Unit::TestCa
 
       infos = []
       ctx.set_notify_func do |notify|
-        infos << [notify.path, notify]
+        if notify.action != Svn::Wc::NOTIFY_COMMIT_FINALIZING
+          infos << [notify.path, notify]
+        end
       end
 
       assert_equal([false, false], dirs_path.collect {|path| path.exist?})
@@ -223,7 +225,9 @@ class SvnClientTest < Test::Unit::TestCa
 
       infos = []
       ctx.set_notify_func do |notify|
-        infos << [notify.path, notify]
+        if notify.action != Svn::Wc::NOTIFY_COMMIT_FINALIZING
+          infos << [notify.path, notify]
+        end
       end
 
       assert_equal([false, false], [dir_path.exist?, child_dir_path.exist?])
@@ -1228,10 +1232,12 @@ class SvnClientTest < Test::Unit::TestCa
       end
       ctx.ci(@wc_path)
 
-      assert_equal([full_path2.to_s].sort,
+      assert_equal([full_path2.to_s, '.'].sort,
                    infos.collect{|path, notify| path}.sort)
       path2_notify = infos.assoc(full_path2.to_s)[1]
       assert(path2_notify.commit_added?)
+      finalizing_notify = infos.assoc('.')[1]
+      assert(finalizing_notify.action == Svn::Wc::NOTIFY_COMMIT_FINALIZING)
       assert_equal(File.open(path1) {|f| f.read},
                    File.open(path2) {|f| f.read})
     end
@@ -1259,12 +1265,16 @@ class SvnClientTest < Test::Unit::TestCa
       end
       ctx.ci(@wc_path)
 
-      assert_equal([path1, path2].sort.collect{|p|File.expand_path(p)},
+      assert_equal([path1, path2].collect do |p|
+                     File.expand_path(p)
+                   end.push('.').sort,
                    infos.collect{|path, notify| path}.sort)
       path1_notify = infos.assoc(File.expand_path(path1))[1]
       assert(path1_notify.commit_deleted?)
       path2_notify = infos.assoc(File.expand_path(path2))[1]
       assert(path2_notify.commit_added?)
+      finalizing_notify = infos.assoc('.')[1]
+      assert(finalizing_notify.action == Svn::Wc::NOTIFY_COMMIT_FINALIZING)
       assert_equal(src, File.open(path2) {|f| f.read})
     end
   end
@@ -1303,7 +1313,9 @@ class SvnClientTest < Test::Unit::TestCa
       paths = notifies.collect do |notify|
         notify.path
       end
-      assert_equal([path1, path2, path2].sort.collect{|p|File.expand_path(p)},
+      assert_equal([path1, path2, path2].collect do |p|
+                     File.expand_path(p)
+                   end.push('.').sort,
                    paths.sort)
 
       deleted_paths = notifies.find_all do |notify|
@@ -1330,6 +1342,13 @@ class SvnClientTest < Test::Unit::TestCa
       assert_equal([path2].sort.collect{|p|File.expand_path(p)},
                    postfix_txdelta_paths.sort)
 
+      finalizing_paths = notifies.find_all do |notify|
+        notify.action == Svn::Wc::NOTIFY_COMMIT_FINALIZING
+      end.collect do |notify|
+        notify.path
+      end
+      assert_equal(['.'], finalizing_paths)
+
       assert_equal(src2, File.open(path2) {|f| f.read})
     end
   end

Modified: subversion/branches/remove-log-addressing/subversion/include/private/svn_string_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/include/private/svn_string_private.h?rev=1605535&r1=1605534&r2=1605535&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/include/private/svn_string_private.h (original)
+++ subversion/branches/remove-log-addressing/subversion/include/private/svn_string_private.h Wed Jun 25 18:16:50 2014
@@ -139,6 +139,13 @@ svn_stringbuf__morph_into_string(svn_str
 unsigned long
 svn__strtoul(const char *buffer, const char **end);
 
+/** Like strtol but with a fixed base of 10 and without overflow checks.
+ * This allows the compiler to generate massively faster code.
+ * (E.g. Avoiding locale specific processing)
+ */
+long
+svn__strtol(const char *buffer, const char **end);
+
 /** Number of chars needed to represent signed (19 places + sign + NUL) or
  * unsigned (20 places + NUL) integers as strings.
  */

Modified: subversion/branches/remove-log-addressing/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/include/svn_client.h?rev=1605535&r1=1605534&r2=1605535&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/include/svn_client.h (original)
+++ subversion/branches/remove-log-addressing/subversion/include/svn_client.h Wed Jun 25 18:16:50 2014
@@ -4130,9 +4130,23 @@ svn_client_vacuum(const char *dir_abspat
                   apr_pool_t *scratch_pool);
 
 
-/** Recursively cleanup a working copy directory @a dir, finishing any
+/** Recursively cleanup a working copy directory @a dir_abspath, finishing any
  * incomplete operations, removing lockfiles, etc.
  *
+ * If @a break_locks is @c TRUE, existing working copy locks at or below @a
+ * dir_abspath are broken, otherwise a normal write lock is obtained.
+ *
+ * If @a fix_recorded_timestamps is @c TRUE, this function fixes recorded
+ * timestamps for unmodified files in the working copy, reducing comparision
+ * time on future checks.
+ *
+ * If @a clear_dav_cache is @c TRUE, the caching of DAV information for older
+ * mod_dav served repositories is cleared. This clearing invalidates some
+ * cached information used for pre-HTTPv2 repositories.
+ *
+ * If @a vacuum_pristines is @c TRUE, and @a dir_abspath points to the working
+ * copy root unreferenced files in the pristine store are removed.
+ *
  * If @a include_externals is @c TRUE, recurse into externals and clean
  * them up as well.
  *
@@ -4160,6 +4174,7 @@ svn_client_cleanup2(const char *dir_absp
  *
  * @deprecated Provided for limited backwards compatibility with the 1.8 API.
  */
+SVN_DEPRECATED
 svn_error_t *
 svn_client_cleanup(const char *dir,
                    svn_client_ctx_t *ctx,

Modified: subversion/branches/remove-log-addressing/subversion/include/svn_fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/include/svn_fs.h?rev=1605535&r1=1605534&r2=1605535&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/include/svn_fs.h (original)
+++ subversion/branches/remove-log-addressing/subversion/include/svn_fs.h Wed Jun 25 18:16:50 2014
@@ -1003,6 +1003,8 @@ typedef struct svn_fs_txn_t svn_fs_txn_t
 /** Allow the client to specify the final svn:date of the revision by
  * setting or deleting the corresponding transaction property rather
  * than have it set automatically when the transaction is committed.
+ *
+ * @since New in 1.9.
  */
 #define SVN_FS_TXN_CLIENT_DATE                   0x00004
 
@@ -2561,6 +2563,8 @@ void svn_fs_lock_target_set_token(svn_fs
  *
  * If the callback returns an error no further callbacks will be made
  * and svn_fs_lock_many/svn_fs_unlock_many will return an error.
+ *
+ * @since New in 1.9.
  */
 typedef svn_error_t *(*svn_fs_lock_callback_t)(void *baton,
                                                const char *path,

Modified: subversion/branches/remove-log-addressing/subversion/include/svn_path.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/include/svn_path.h?rev=1605535&r1=1605534&r2=1605535&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/include/svn_path.h (original)
+++ subversion/branches/remove-log-addressing/subversion/include/svn_path.h Wed Jun 25 18:16:50 2014
@@ -722,7 +722,7 @@ svn_path_resolve_repos_relative_url(cons
  * characters have been escaped using the form "\NNN" (where NNN is the
  * octal representation of the byte's ordinal value).
  *
- * @since New in 1.9. */
+ * @since New in 1.8. */
 const char *
 svn_path_illegal_path_escape(const char *path, apr_pool_t *pool);
 

Modified: subversion/branches/remove-log-addressing/subversion/include/svn_types.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/include/svn_types.h?rev=1605535&r1=1605534&r2=1605535&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/include/svn_types.h (original)
+++ subversion/branches/remove-log-addressing/subversion/include/svn_types.h Wed Jun 25 18:16:50 2014
@@ -149,10 +149,16 @@ typedef int svn_boolean_t;
 
 
 
-/** Declaration of the null pointer constant type. */
+/** Declaration of the null pointer constant type.
+ *
+ * @since New in 1.9.
+ */
 struct svn_null_pointer_constant_stdarg_sentinel_t;
 
-/** Null pointer constant used as a sentinel in variable argument lists. */
+/** Null pointer constant used as a sentinel in variable argument lists.
+ *
+ * @since New in 1.9.
+ */
 #define SVN_VA_NULL ((struct svn_null_pointer_constant_stdarg_sentinel_t*)0)
 /* See? (char*)NULL -- They have the same length, but the cast looks ugly. */
 
@@ -421,6 +427,8 @@ typedef long int svn_revnum_t;
 #define SVN_IGNORED_REVNUM ((svn_revnum_t) -1)
 
 /** Convert NULL-terminated C string @a str to a revision number. */
+/* When in a hot path, consider using svn__strtol() instead; atol() may be
+   locale-aware and thus slower. */
 #define SVN_STR_TO_REV(str) ((svn_revnum_t) atol(str))
 
 /**

Modified: subversion/branches/remove-log-addressing/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/include/svn_wc.h?rev=1605535&r1=1605534&r2=1605535&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/include/svn_wc.h (original)
+++ subversion/branches/remove-log-addressing/subversion/include/svn_wc.h Wed Jun 25 18:16:50 2014
@@ -7362,8 +7362,13 @@ svn_wc_get_pristine_copy_path(const char
  * files will be updated, which will improve performance of future is-modified
  * checks.
  *
+ * If @a clear_dav_cache is @c TRUE, the caching of DAV information for older
+ * mod_dav served repositories is cleared. This clearing invalidates some
+ * cached information used for pre-HTTPv2 repositories.
+ *
  * If @a vacuum_pristines is TRUE, try to remove unreferenced pristines from
- * the working copy.
+ * the working copy. (Will not remove anything unless the obtained lock applies
+ * to the entire working copy)
  *
  * If @a cancel_func is non-NULL, invoke it with @a cancel_baton at various
  * points during the operation.  If it returns an error (typically

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_client/diff.c?rev=1605535&r1=1605534&r2=1605535&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_client/diff.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_client/diff.c Wed Jun 25 18:16:50 2014
@@ -1926,6 +1926,13 @@ diff_repos_wc(const char **root_relpath,
       SVN_ERR(svn_wc_get_actual_target2(&anchor, &target, ctx->wc_ctx, path2,
                                         scratch_pool, scratch_pool));
 
+      /* Handle the ugly case where target is ".." */
+      if (*target && !svn_path_is_single_path_component(target))
+        {
+          anchor = svn_dirent_join(anchor, target, scratch_pool);
+          target = "";
+        }
+
       if (root_relpath)
         *root_relpath = apr_pstrdup(result_pool, target);
       if (root_is_dir)

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/cached_data.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/cached_data.c?rev=1605535&r1=1605534&r2=1605535&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/cached_data.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/cached_data.c Wed Jun 25 18:16:50 2014
@@ -76,12 +76,13 @@ dbg_log_access(svn_fs_t *fs,
   const char *type = types[item_type];
   const char *pack = "";
   apr_off_t offset;
-  svn_fs_fs__revision_file_t rev_file;
+  svn_fs_fs__revision_file_t *rev_file;
 
-  svn_fs_fs__init_revision_file(&rev_file, fs, revision, scratch_pool);
+  SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&rev_file, fs, revision,
+                                           scratch_pool));
 
   /* determine rev / pack file offset */
-  SVN_ERR(svn_fs_fs__item_offset(&offset, fs, &rev_file, revision, NULL,
+  SVN_ERR(svn_fs_fs__item_offset(&offset, fs, rev_file, revision, NULL,
                                  item_index, scratch_pool));
 
   /* constructing the pack file description */
@@ -140,11 +141,26 @@ dbg_log_access(svn_fs_t *fs,
         }
     }
 
+<<<<<<< .working
   /* reduced logging for format 6 and earlier */
   printf("%5s%10" APR_UINT64_T_HEX_FMT " %s %7ld %7" APR_UINT64_T_FMT \
          "   %s\n",
          pack, (apr_uint64_t)(offset), type, revision, item_index,
          description);
+=======
+  /* some info is only available in format7 repos */
+  if (svn_fs_fs__use_log_addressing(fs, revision))
+    {
+      /* reverse index lookup: get item description in ENTRY */
+      SVN_ERR(svn_fs_fs__p2l_entry_lookup(&entry, fs, rev_file, revision,
+                                          offset, scratch_pool));
+      if (entry)
+        {
+          /* more details */
+          end_offset = offset + entry->size;
+          type = types[entry->type];
+        }
+>>>>>>> .merge-right.r1605441
 
 #endif
 
@@ -248,7 +264,8 @@ static svn_error_t *
 get_node_revision_body(node_revision_t **noderev_p,
                        svn_fs_t *fs,
                        const svn_fs_id_t *id,
-                       apr_pool_t *pool)
+                       apr_pool_t *result_pool,
+                       apr_pool_t *scratch_pool)
 {
   svn_error_t *err;
   svn_boolean_t is_cached = FALSE;
@@ -261,8 +278,10 @@ get_node_revision_body(node_revision_t *
       /* This is a transaction node-rev.  Its storage logic is very
          different from that of rev / pack files. */
       err = svn_io_file_open(&file,
-                             svn_fs_fs__path_txn_node_rev(fs, id, pool),
-                             APR_READ | APR_BUFFERED, APR_OS_DEFAULT, pool);
+                             svn_fs_fs__path_txn_node_rev(fs, id,
+                             scratch_pool),
+                             APR_READ | APR_BUFFERED, APR_OS_DEFAULT,
+                             scratch_pool);
       if (err)
         {
           if (APR_STATUS_IS_ENOENT(err->apr_err))
@@ -277,8 +296,8 @@ get_node_revision_body(node_revision_t *
       SVN_ERR(svn_fs_fs__read_noderev(noderev_p,
                                       svn_stream_from_aprfile2(file,
                                                                FALSE,
-                                                               pool),
-                                      pool));
+                                                               scratch_pool),
+                                      result_pool, scratch_pool));
     }
   else
     {
@@ -298,7 +317,7 @@ get_node_revision_body(node_revision_t *
                                  &is_cached,
                                  ffd->node_revision_cache,
                                  &key,
-                                 pool));
+                                 result_pool));
           if (is_cached)
             return SVN_NO_ERROR;
         }
@@ -307,12 +326,13 @@ get_node_revision_body(node_revision_t *
       SVN_ERR(open_and_seek_revision(&revision_file, fs,
                                      rev_item->revision,
                                      rev_item->number,
-                                     pool));
+                                     scratch_pool));
 
       /* physical addressing mode reading, parsing and caching */
       SVN_ERR(svn_fs_fs__read_noderev(noderev_p,
                                       revision_file->stream,
-                                      pool));
+                                      result_pool,
+                                      scratch_pool));
 
       /* Workaround issue #4031: is-fresh-txn-root in revision files. */
       (*noderev_p)->is_fresh_txn_root = FALSE;
@@ -322,7 +342,7 @@ get_node_revision_body(node_revision_t *
       SVN_ERR(svn_cache__set(ffd->node_revision_cache,
                               &key,
                               *noderev_p,
-                              pool));
+                              scratch_pool));
 
       SVN_ERR(svn_fs_fs__close_revision_file(revision_file));
     }
@@ -334,14 +354,16 @@ svn_error_t *
 svn_fs_fs__get_node_revision(node_revision_t **noderev_p,
                              svn_fs_t *fs,
                              const svn_fs_id_t *id,
-                             apr_pool_t *pool)
+                             apr_pool_t *result_pool,
+                             apr_pool_t *scratch_pool)
 {
   const svn_fs_fs__id_part_t *rev_item = svn_fs_fs__id_rev_item(id);
 
-  svn_error_t *err = get_node_revision_body(noderev_p, fs, id, pool);
+  svn_error_t *err = get_node_revision_body(noderev_p, fs, id,
+                                            result_pool, scratch_pool);
   if (err && err->apr_err == SVN_ERR_FS_CORRUPT)
     {
-      svn_string_t *id_string = svn_fs_fs__id_unparse(id, pool);
+      svn_string_t *id_string = svn_fs_fs__id_unparse(id, scratch_pool);
       return svn_error_createf(SVN_ERR_FS_CORRUPT, err,
                                "Corrupt node-revision '%s'",
                                id_string->data);
@@ -352,7 +374,7 @@ svn_fs_fs__get_node_revision(node_revisi
                          rev_item->number,
                          *noderev_p,
                          SVN_FS_FS__ITEM_TYPE_NODEREV,
-                         pool));
+                         scratch_pool));
 
   return svn_error_trace(err);
 }
@@ -374,7 +396,7 @@ get_fs_id_at_offset(svn_fs_id_t **id_p,
   SVN_ERR(aligned_seek(fs, rev_file->file, NULL, offset, pool));
   SVN_ERR(svn_fs_fs__read_noderev(&noderev,
                                   rev_file->stream,
-                                  pool));
+                                  pool, pool));
 
   /* noderev->id is const, get rid of that */
   *id_p = svn_fs_fs__id_copy(noderev->id, pool);
@@ -487,7 +509,8 @@ svn_error_t *
 svn_fs_fs__rev_get_root(svn_fs_id_t **root_id_p,
                         svn_fs_t *fs,
                         svn_revnum_t rev,
-                        apr_pool_t *pool)
+                        apr_pool_t *result_pool,
+                        apr_pool_t *scratch_pool)
 {
   fs_fs_data_t *ffd = fs->fsap_data;
   svn_fs_fs__revision_file_t *revision_file;
@@ -495,23 +518,23 @@ svn_fs_fs__rev_get_root(svn_fs_id_t **ro
   svn_fs_id_t *root_id = NULL;
   svn_boolean_t is_cached;
 
-  SVN_ERR(svn_fs_fs__ensure_revision_exists(rev, fs, pool));
+  SVN_ERR(svn_fs_fs__ensure_revision_exists(rev, fs, scratch_pool));
 
   SVN_ERR(svn_cache__get((void **) root_id_p, &is_cached,
-                        ffd->rev_root_id_cache, &rev, pool));
+                        ffd->rev_root_id_cache, &rev, result_pool));
   if (is_cached)
     return SVN_NO_ERROR;
 
-  SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&revision_file, fs, rev, pool));
+  SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&revision_file, fs, rev, scratch_pool));
   SVN_ERR(get_root_changes_offset(&root_offset, NULL,
-                                  revision_file->file, fs, rev, pool));
+                                  revision_file->file, fs, rev, scratch_pool));
 
   SVN_ERR(get_fs_id_at_offset(&root_id, revision_file, fs, rev,
-                              root_offset, pool));
+                              root_offset, result_pool));
 
   SVN_ERR(svn_fs_fs__close_revision_file(revision_file));
 
-  SVN_ERR(svn_cache__set(ffd->rev_root_id_cache, &rev, root_id, pool));
+  SVN_ERR(svn_cache__set(ffd->rev_root_id_cache, &rev, root_id, scratch_pool));
 
   *root_id_p = root_id;
 
@@ -654,10 +677,11 @@ create_rep_state_body(rep_state_t **rep_
                       shared_file_t **shared_file,
                       representation_t *rep,
                       svn_fs_t *fs,
-                      apr_pool_t *pool)
+                      apr_pool_t *result_pool,
+                      apr_pool_t *scratch_pool)
 {
   fs_fs_data_t *ffd = fs->fsap_data;
-  rep_state_t *rs = apr_pcalloc(pool, sizeof(*rs));
+  rep_state_t *rs = apr_pcalloc(result_pool, sizeof(*rs));
   svn_fs_fs__rep_header_t *rh;
   svn_boolean_t is_cached = FALSE;
   apr_uint64_t estimated_window_storage;
@@ -714,7 +738,7 @@ create_rep_state_body(rep_state_t **rep_
   /* cache lookup, i.e. skip reading the rep header if possible */
   if (ffd->rep_header_cache && !svn_fs_fs__id_txn_used(&rep->txn_id))
     SVN_ERR(svn_cache__get((void **) &rh, &is_cached,
-                           ffd->rep_header_cache, &key, pool));
+                           ffd->rep_header_cache, &key, result_pool));
 
   /* initialize the (shared) FILE member in RS */
   if (reuse_shared_file)
@@ -723,9 +747,9 @@ create_rep_state_body(rep_state_t **rep_
     }
   else
     {
-      shared_file_t *file = apr_pcalloc(pool, sizeof(*file));
+      shared_file_t *file = apr_pcalloc(result_pool, sizeof(*file));
       file->revision = rep->revision;
-      file->pool = pool;
+      file->pool = result_pool;
       file->fs = fs;
       rs->sfile = file;
 
@@ -749,8 +773,8 @@ create_rep_state_body(rep_state_t **rep_
           SVN_ERR(auto_open_shared_file(rs->sfile));
           SVN_ERR(svn_fs_fs__item_offset(&offset, fs, rs->sfile->rfile,
                                          rep->revision, NULL, rep->item_index,
-                                         pool));
-          SVN_ERR(rs_aligned_seek(rs, NULL, offset, pool));
+                                         scratch_pool));
+          SVN_ERR(rs_aligned_seek(rs, NULL, offset, scratch_pool));
         }
       else
         {
@@ -758,23 +782,24 @@ create_rep_state_body(rep_state_t **rep_
            * an in-txn file.
            */
           SVN_ERR(open_and_seek_representation(&rs->sfile->rfile, fs, rep,
-                                               pool));
+                                               result_pool));
         }
 
-      SVN_ERR(svn_fs_fs__read_rep_header(&rh, rs->sfile->rfile->stream, pool));
-      SVN_ERR(get_file_offset(&rs->start, rs, pool));
+      SVN_ERR(svn_fs_fs__read_rep_header(&rh, rs->sfile->rfile->stream,
+                                         result_pool, scratch_pool));
+      SVN_ERR(get_file_offset(&rs->start, rs, result_pool));
 
       /* populate the cache if appropriate */
       if (! svn_fs_fs__id_txn_used(&rep->txn_id))
         {
           if (ffd->rep_header_cache)
-            SVN_ERR(svn_cache__set(ffd->rep_header_cache, &key, rh, pool));
+            SVN_ERR(svn_cache__set(ffd->rep_header_cache, &key, rh, scratch_pool));
         }
     }
 
   /* finalize */
   SVN_ERR(dbg_log_access(fs, rep->revision, rep->item_index, rh,
-                         SVN_FS_FS__ITEM_TYPE_ANY_REP, pool));
+                         SVN_FS_FS__ITEM_TYPE_ANY_REP, scratch_pool));
 
   rs->header_size = rh->header_size;
   *rep_state = rs;
@@ -807,13 +832,16 @@ create_rep_state(rep_state_t **rep_state
                  shared_file_t **shared_file,
                  representation_t *rep,
                  svn_fs_t *fs,
-                 apr_pool_t *pool)
+                 apr_pool_t *result_pool,
+                 apr_pool_t *scratch_pool)
 {
   svn_error_t *err = create_rep_state_body(rep_state, rep_header,
-                                           shared_file, rep, fs, pool);
+                                           shared_file, rep, fs,
+                                           result_pool, scratch_pool);
   if (err && err->apr_err == SVN_ERR_FS_CORRUPT)
     {
       fs_fs_data_t *ffd = fs->fsap_data;
+      const char *rep_str;
 
       /* ### This always returns "-1" for transaction reps, because
          ### this particular bit of code doesn't know if the rep is
@@ -822,12 +850,14 @@ create_rep_state(rep_state_t **rep_state
          ### from the protorev file, though, so this is probably OK.
          ### And anyone going to debug corruption errors is probably
          ### going to jump straight to this comment anyway! */
+      rep_str = rep
+              ? svn_fs_fs__unparse_representation
+                  (rep, ffd->format, TRUE, scratch_pool, scratch_pool)->data
+              : "(null)";
+
       return svn_error_createf(SVN_ERR_FS_CORRUPT, err,
                                "Corrupt representation '%s'",
-                               rep
-                               ? svn_fs_fs__unparse_representation
-                                   (rep, ffd->format, TRUE, pool)->data
-                               : "(null)");
+                               rep_str);
     }
   /* ### Call representation_string() ? */
   return svn_error_trace(err);
@@ -837,14 +867,15 @@ svn_error_t *
 svn_fs_fs__check_rep(representation_t *rep,
                      svn_fs_t *fs,
                      void **hint,
-                     apr_pool_t *pool)
+                     apr_pool_t *scratch_pool)
 {
   rep_state_t *rs;
   svn_fs_fs__rep_header_t *rep_header;
 
   /* ### Should this be using read_rep_line() directly? */
+  /* ### Should this be using read_rep_line() directly? */
   SVN_ERR(create_rep_state(&rs, &rep_header, (shared_file_t**)hint,
-                            rep, fs, pool));
+                           rep, fs, scratch_pool, scratch_pool));
 
   return SVN_NO_ERROR;
 }
@@ -854,13 +885,14 @@ svn_fs_fs__rep_chain_length(int *chain_l
                             int *shard_count,
                             representation_t *rep,
                             svn_fs_t *fs,
-                            apr_pool_t *pool)
+                            apr_pool_t *scratch_pool)
 {
   fs_fs_data_t *ffd = fs->fsap_data;
   svn_revnum_t shard_size = ffd->max_files_per_dir
                           ? ffd->max_files_per_dir
                           : 1;
-  apr_pool_t *sub_pool = svn_pool_create(pool);
+  apr_pool_t *sub_pool = svn_pool_create(scratch_pool);
+  apr_pool_t *iterpool = svn_pool_create(scratch_pool);
   svn_boolean_t is_delta = FALSE;
   int count = 0;
   int shards = 1;
@@ -881,6 +913,9 @@ svn_fs_fs__rep_chain_length(int *chain_l
   do
     {
       rep_state_t *rep_state;
+
+      svn_pool_clear(iterpool);
+
       if (base_rep.revision / shard_size != last_shard)
         {
           last_shard = base_rep.revision / shard_size;
@@ -892,7 +927,8 @@ svn_fs_fs__rep_chain_length(int *chain_l
                                     &file_hint,
                                     &base_rep,
                                     fs,
-                                    sub_pool));
+                                    sub_pool,
+                                    iterpool));
 
       base_rep.revision = header->base_revision;
       base_rep.item_index = header->base_item_index;
@@ -912,6 +948,7 @@ svn_fs_fs__rep_chain_length(int *chain_l
   *chain_length = count;
   *shard_count = shards;
   svn_pool_destroy(sub_pool);
+  svn_pool_destroy(iterpool);
 
   return SVN_NO_ERROR;
 }
@@ -1034,8 +1071,8 @@ parse_raw_window(void **out,
  * rep state RS from the current FSFS session's cache.  This will be a
  * no-op and IS_CACHED will be set to FALSE if no cache has been given.
  * If a cache is available IS_CACHED will inform the caller about the
- * success of the lookup. Allocations (of the window in particualar) will
- * be made from POOL.
+ * success of the lookup. Allocations of the window in will be made
+ * from RESULT_POOL. Use SCRATCH_POOL for temporary allocations.
  *
  * If the information could be found, put RS to CHUNK_INDEX.
  */
@@ -1044,7 +1081,8 @@ get_cached_window(svn_txdelta_window_t *
                   rep_state_t *rs,
                   int chunk_index,
                   svn_boolean_t *is_cached,
-                  apr_pool_t *pool)
+                  apr_pool_t *result_pool,
+                  apr_pool_t *scratch_pool)
 {
   if (! rs->window_cache)
     {
@@ -1062,7 +1100,7 @@ get_cached_window(svn_txdelta_window_t *
                              is_cached,
                              rs->window_cache,
                              &key,
-                             pool));
+                             result_pool));
 
       /* If we did not find a parsed txdelta window, we might have a raw
          version of it in our cache.  If so, read, parse and re-cache it. */
@@ -1070,10 +1108,10 @@ get_cached_window(svn_txdelta_window_t *
         {
           SVN_ERR(svn_cache__get_partial((void **) &cached_window, is_cached,
                                          rs->raw_window_cache, &key,
-                                         parse_raw_window, NULL, pool));
+                                         parse_raw_window, NULL, result_pool));
           if (*is_cached)
             SVN_ERR(svn_cache__set(rs->window_cache, &key, cached_window,
-                                   pool));
+                                   scratch_pool));
         }
 
       /* Return cached information. */
@@ -1198,6 +1236,7 @@ build_rep_list(apr_array_header_t **list
   svn_fs_fs__rep_header_t *rep_header;
   svn_boolean_t is_cached = FALSE;
   shared_file_t *shared_file = NULL;
+  apr_pool_t *iterpool = svn_pool_create(pool);
 
   *list = apr_array_make(pool, 1, sizeof(rep_state_t *));
   rep = *first_rep;
@@ -1207,7 +1246,8 @@ build_rep_list(apr_array_header_t **list
   *expanded_size = first_rep->expanded_size;
 
   /* for the top-level rep, we need the rep_args */
-  SVN_ERR(create_rep_state(&rs, &rep_header, &shared_file, &rep, fs, pool));
+  SVN_ERR(create_rep_state(&rs, &rep_header, &shared_file, &rep, fs, pool,
+                           iterpool));
 
   /* Unknown size or empty representation?
      That implies the this being the first iteration.
@@ -1221,10 +1261,12 @@ build_rep_list(apr_array_header_t **list
 
   while (1)
     {
+      svn_pool_clear(iterpool);
+
       /* fetch state, if that has not been done already */
       if (!rs)
         SVN_ERR(create_rep_state(&rs, &rep_header, &shared_file,
-                                 &rep, fs, pool));
+                                 &rep, fs, pool, iterpool));
 
       /* for txn reps, there won't be a cached combined window */
       if (!svn_fs_fs__id_txn_used(&rep.txn_id))
@@ -1238,14 +1280,14 @@ build_rep_list(apr_array_header_t **list
           rs->current = 0;
           rs->size = (*window_p)->len;
           *src_state = rs;
-          return SVN_NO_ERROR;
+          break;
         }
 
       if (rep_header->type == svn_fs_fs__rep_plain)
         {
           /* This is a plaintext, so just return the current rep_state. */
           *src_state = rs;
-          return SVN_NO_ERROR;
+          break;
         }
 
       /* Push this rep onto the list.  If it's self-compressed, we're done. */
@@ -1253,7 +1295,7 @@ build_rep_list(apr_array_header_t **list
       if (rep_header->type == svn_fs_fs__rep_self_delta)
         {
           *src_state = NULL;
-          return SVN_NO_ERROR;
+          break;
         }
 
       rep.revision = rep_header->base_revision;
@@ -1263,6 +1305,9 @@ build_rep_list(apr_array_header_t **list
 
       rs = NULL;
     }
+  svn_pool_destroy(iterpool);
+
+  return SVN_NO_ERROR;
 }
 
 
@@ -1307,18 +1352,22 @@ rep_read_get_baton(struct rep_read_baton
    than THIS_CHUNK + 1 when this function returns. */
 static svn_error_t *
 read_delta_window(svn_txdelta_window_t **nwin, int this_chunk,
-                  rep_state_t *rs, apr_pool_t *pool)
+                  rep_state_t *rs, apr_pool_t *result_pool,
+                  apr_pool_t *scratch_pool)
 {
   svn_boolean_t is_cached;
   apr_off_t start_offset;
   apr_off_t end_offset;
+  apr_pool_t *iterpool;
+
   SVN_ERR_ASSERT(rs->chunk_index <= this_chunk);
 
   SVN_ERR(dbg_log_access(rs->sfile->fs, rs->revision, rs->item_index,
-                         NULL, SVN_FS_FS__ITEM_TYPE_ANY_REP, pool));
+                         NULL, SVN_FS_FS__ITEM_TYPE_ANY_REP, scratch_pool));
 
   /* Read the next window.  But first, try to find it in the cache. */
-  SVN_ERR(get_cached_window(nwin, rs, this_chunk, &is_cached, pool));
+  SVN_ERR(get_cached_window(nwin, rs, this_chunk, &is_cached,
+                            result_pool, scratch_pool));
   if (is_cached)
     return SVN_NO_ERROR;
 
@@ -1327,21 +1376,23 @@ read_delta_window(svn_txdelta_window_t *
 
   /* data is still not cached -> we need to read it.
      Make sure we have all the necessary info. */
-  SVN_ERR(auto_set_start_offset(rs, pool));
-  SVN_ERR(auto_read_diff_version(rs, pool));
+  SVN_ERR(auto_set_start_offset(rs, scratch_pool));
+  SVN_ERR(auto_read_diff_version(rs, scratch_pool));
 
   /* RS->FILE may be shared between RS instances -> make sure we point
    * to the right data. */
   start_offset = rs->start + rs->current;
-  SVN_ERR(rs_aligned_seek(rs, NULL, start_offset, pool));
+  SVN_ERR(rs_aligned_seek(rs, NULL, start_offset, scratch_pool));
 
   /* Skip windows to reach the current chunk if we aren't there yet. */
+  iterpool = svn_pool_create(scratch_pool);
   while (rs->chunk_index < this_chunk)
     {
+      svn_pool_clear(iterpool);
       SVN_ERR(svn_txdelta_skip_svndiff_window(rs->sfile->rfile->file,
-                                              rs->ver, pool));
+                                              rs->ver, iterpool));
       rs->chunk_index++;
-      SVN_ERR(get_file_offset(&start_offset, rs, pool));
+      SVN_ERR(get_file_offset(&start_offset, rs, iterpool));
       rs->current = start_offset - rs->start;
       if (rs->current >= rs->size)
         return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
@@ -1349,11 +1400,12 @@ read_delta_window(svn_txdelta_window_t *
                                   "beyond the end of the "
                                   "representation"));
     }
+  svn_pool_destroy(iterpool);
 
   /* Actually read the next window. */
   SVN_ERR(svn_txdelta_read_svndiff_window(nwin, rs->sfile->rfile->stream,
-                                          rs->ver, pool));
-  SVN_ERR(get_file_offset(&end_offset, rs, pool));
+                                          rs->ver, result_pool));
+  SVN_ERR(get_file_offset(&end_offset, rs, scratch_pool));
   rs->current = end_offset - rs->start;
   if (rs->current > rs->size)
     return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
@@ -1363,7 +1415,7 @@ read_delta_window(svn_txdelta_window_t *
   /* the window has not been cached before, thus cache it now
    * (if caching is used for them at all) */
   if (SVN_IS_VALID_REVNUM(rs->revision))
-    SVN_ERR(set_cached_window(*nwin, rs, pool));
+    SVN_ERR(set_cached_window(*nwin, rs, scratch_pool));
 
   return SVN_NO_ERROR;
 }
@@ -1371,22 +1423,23 @@ read_delta_window(svn_txdelta_window_t *
 /* Read SIZE bytes from the representation RS and return it in *NWIN. */
 static svn_error_t *
 read_plain_window(svn_stringbuf_t **nwin, rep_state_t *rs,
-                  apr_size_t size, apr_pool_t *pool)
+                  apr_size_t size, apr_pool_t *result_pool,
+                  apr_pool_t *scratch_pool)
 {
   apr_off_t offset;
   
   /* RS->FILE may be shared between RS instances -> make sure we point
    * to the right data. */
   SVN_ERR(auto_open_shared_file(rs->sfile));
-  SVN_ERR(auto_set_start_offset(rs, pool));
+  SVN_ERR(auto_set_start_offset(rs, scratch_pool));
 
   offset = rs->start + rs->current;
-  SVN_ERR(rs_aligned_seek(rs, NULL, offset, pool));
+  SVN_ERR(rs_aligned_seek(rs, NULL, offset, scratch_pool));
 
   /* Read the plain data. */
-  *nwin = svn_stringbuf_create_ensure(size, pool);
+  *nwin = svn_stringbuf_create_ensure(size, result_pool);
   SVN_ERR(svn_io_file_read_full2(rs->sfile->rfile->file, (*nwin)->data, size,
-                                 NULL, NULL, pool));
+                                 NULL, NULL, result_pool));
   (*nwin)->data[size] = 0;
 
   /* Update RS. */
@@ -1407,6 +1460,7 @@ get_combined_window(svn_stringbuf_t **re
   apr_array_header_t *windows;
   svn_stringbuf_t *source, *buf = rb->base_window;
   rep_state_t *rs;
+  apr_pool_t *iterpool;
 
   /* Read all windows that we need to combine. This is fine because
      the size of each window is relatively small (100kB) and skip-
@@ -1414,12 +1468,16 @@ get_combined_window(svn_stringbuf_t **re
      Stop early if one of them does not depend on its predecessors. */
   window_pool = svn_pool_create(rb->pool);
   windows = apr_array_make(window_pool, 0, sizeof(svn_txdelta_window_t *));
+  iterpool = svn_pool_create(rb->pool);
   for (i = 0; i < rb->rs_list->nelts; ++i)
     {
       svn_txdelta_window_t *window;
 
+      svn_pool_clear(iterpool);
+
       rs = APR_ARRAY_IDX(rb->rs_list, i, rep_state_t *);
-      SVN_ERR(read_delta_window(&window, rb->chunk_index, rs, window_pool));
+      SVN_ERR(read_delta_window(&window, rb->chunk_index, rs, window_pool,
+                                iterpool));
 
       APR_ARRAY_PUSH(windows, svn_txdelta_window_t *) = window;
       if (window->src_ops == 0)
@@ -1435,6 +1493,8 @@ get_combined_window(svn_stringbuf_t **re
     {
       svn_txdelta_window_t *window;
 
+      svn_pool_clear(iterpool);
+
       rs = APR_ARRAY_IDX(rb->rs_list, i, rep_state_t *);
       window = APR_ARRAY_IDX(windows, i, svn_txdelta_window_t *);
 
@@ -1445,7 +1505,7 @@ get_combined_window(svn_stringbuf_t **re
       source = buf;
       if (source == NULL && rb->src_state != NULL)
         SVN_ERR(read_plain_window(&source, rb->src_state, window->sview_len,
-                                  pool));
+                                  pool, iterpool));
 
       /* Combine this window with the current one. */
       new_pool = svn_pool_create(rb->pool);
@@ -1472,6 +1532,7 @@ get_combined_window(svn_stringbuf_t **re
       svn_pool_destroy(pool);
       pool = new_pool;
     }
+  svn_pool_destroy(iterpool);
 
   svn_pool_destroy(window_pool);
 
@@ -2000,14 +2061,18 @@ delta_read_next_window(svn_txdelta_windo
                        apr_pool_t *pool)
 {
   struct delta_read_baton *drb = baton;
+  apr_pool_t *scratch_pool = svn_pool_create(pool);
 
   *window = NULL;
   if (drb->rs->current < drb->rs->size)
     {
-      SVN_ERR(read_delta_window(window, drb->rs->chunk_index, drb->rs, pool));
+      SVN_ERR(read_delta_window(window, drb->rs->chunk_index, drb->rs, pool,
+                                scratch_pool));
       drb->rs->chunk_index++;
     }
 
+  svn_pool_destroy(scratch_pool);
+
   return SVN_NO_ERROR;
 }
 
@@ -2055,7 +2120,7 @@ svn_fs_fs__get_file_delta_stream(svn_txd
     {
       /* Read target's base rep if any. */
       SVN_ERR(create_rep_state(&rep_state, &rep_header, NULL,
-                                target->data_rep, fs, pool));
+                                target->data_rep, fs, pool, pool));
 
       if (source && source->data_rep && target->data_rep)
         {
@@ -2222,7 +2287,7 @@ read_dir_entries(apr_array_header_t *ent
                            _("Directory entry corrupt in '%s'"),
                            svn_fs_fs__id_unparse(id, scratch_pool)->data);
 
-      dirent->id = svn_fs_fs__id_parse(str, strlen(str), result_pool);
+      dirent->id = svn_fs_fs__id_parse(str, result_pool);
 
       /* In incremental mode, update the hash; otherwise, write to the
        * final array.  Be sure to use hash keys that survive this iteration.
@@ -2279,11 +2344,9 @@ get_dir_contents(apr_array_header_t **en
     }
   else if (noderev->data_rep)
     {
-      /* use a temporary pool for temp objects.
-       * Also undeltify content before parsing it. Otherwise, we could only
+      /* Undeltify content before parsing it. Otherwise, we could only
        * parse it byte-by-byte.
        */
-      apr_pool_t *text_pool = svn_pool_create(scratch_pool);
       apr_size_t len = noderev->data_rep->expanded_size
                      ? (apr_size_t)noderev->data_rep->expanded_size
                      : (apr_size_t)noderev->data_rep->size;
@@ -2291,16 +2354,14 @@ get_dir_contents(apr_array_header_t **en
 
       /* The representation is immutable.  Read it normally. */
       SVN_ERR(svn_fs_fs__get_contents(&contents, fs, noderev->data_rep,
-                                      FALSE, text_pool));
-      SVN_ERR(svn_stringbuf_from_stream(&text, contents, len, text_pool));
+                                      FALSE, scratch_pool));
+      SVN_ERR(svn_stringbuf_from_stream(&text, contents, len, scratch_pool));
       SVN_ERR(svn_stream_close(contents));
 
       /* de-serialize hash */
-      contents = svn_stream_from_stringbuf(text, text_pool);
+      contents = svn_stream_from_stringbuf(text, scratch_pool);
       SVN_ERR(read_dir_entries(*entries, contents, FALSE,  noderev->id,
                                result_pool, scratch_pool));
-
-      svn_pool_destroy(text_pool);
     }
 
   return SVN_NO_ERROR;
@@ -2505,19 +2566,20 @@ svn_error_t *
 svn_fs_fs__get_changes(apr_array_header_t **changes,
                        svn_fs_t *fs,
                        svn_revnum_t rev,
-                       apr_pool_t *pool)
+                       apr_pool_t *result_pool)
 {
   apr_off_t changes_offset = SVN_FS_FS__ITEM_INDEX_CHANGES;
   svn_fs_fs__revision_file_t *revision_file;
   svn_boolean_t found;
   fs_fs_data_t *ffd = fs->fsap_data;
+  apr_pool_t *scratch_pool = svn_pool_create(result_pool);
 
   /* try cache lookup first */
 
   if (ffd->changes_cache)
     {
       SVN_ERR(svn_cache__get((void **) changes, &found, ffd->changes_cache,
-                             &rev, pool));
+                             &rev, result_pool));
     }
   else
     {
@@ -2528,31 +2590,43 @@ svn_fs_fs__get_changes(apr_array_header_
     {
       /* read changes from revision file */
 
-      SVN_ERR(svn_fs_fs__ensure_revision_exists(rev, fs, pool));
+      SVN_ERR(svn_fs_fs__ensure_revision_exists(rev, fs, scratch_pool));
       SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&revision_file, fs, rev,
-                                               pool));
+                                               scratch_pool));
 
       /* physical addressing mode code path */
       SVN_ERR(get_root_changes_offset(NULL, &changes_offset,
                                       revision_file->file, fs, rev,
-                                      pool));
+                                      scratch_pool));
 
       SVN_ERR(aligned_seek(fs, revision_file->file, NULL, changes_offset,
-                            pool));
+                           scratch_pool));
       SVN_ERR(svn_fs_fs__read_changes(changes, revision_file->stream,
-                                      pool));
+                                      result_pool, scratch_pool));
 
       /* cache for future reference */
 
       if (ffd->changes_cache)
-        SVN_ERR(svn_cache__set(ffd->changes_cache, &rev, *changes, pool));
+        {
+          /* Guesstimate for the size of the in-cache representation. */
+          apr_size_t estimated_size = (apr_size_t)250 * (*changes)->nelts;
+
+          /* Don't even serialize data that probably won't fit into the
+           * cache.  This often implies that either CHANGES is very
+           * large, memory is scarce or both.  Having a huge temporary
+           * copy would not be a good thing in either case. */
+          if (svn_cache__is_cachable(ffd->changes_cache, estimated_size))
+            SVN_ERR(svn_cache__set(ffd->changes_cache, &rev, *changes,
+                                   scratch_pool));
+        }
 
       SVN_ERR(svn_fs_fs__close_revision_file(revision_file));
     }
 
   SVN_ERR(dbg_log_access(fs, rev, changes_offset, *changes,
-                         SVN_FS_FS__ITEM_TYPE_CHANGES, pool));
+                         SVN_FS_FS__ITEM_TYPE_CHANGES, scratch_pool));
 
+  svn_pool_destroy(scratch_pool);
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/cached_data.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/cached_data.h?rev=1605535&r1=1605534&r2=1605535&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/cached_data.h (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/cached_data.h Wed Jun 25 18:16:50 2014
@@ -36,7 +36,8 @@ svn_error_t *
 svn_fs_fs__get_node_revision(node_revision_t **noderev_p,
                              svn_fs_t *fs,
                              const svn_fs_id_t *id,
-                             apr_pool_t *pool);
+                             apr_pool_t *result_pool,
+                             apr_pool_t *scratch_pool);
 
 /* Set *ROOT_ID to the node-id for the root of revision REV in
    filesystem FS.  Do any allocations in POOL. */
@@ -44,28 +45,29 @@ svn_error_t *
 svn_fs_fs__rev_get_root(svn_fs_id_t **root_id,
                         svn_fs_t *fs,
                         svn_revnum_t rev,
-                        apr_pool_t *pool);
+                        apr_pool_t *result_pool,
+                        apr_pool_t *scratch_pool);
 
 /* Verify that representation REP in FS can be accessed.  Successive calls
    to this function should pass a non-NULL value to HINT.  In that case,
    many file open / close operations can be eliminated.
-   Do any allocations in POOL. */
+   Do any allocations in SCRATCH_POOL. */
 svn_error_t *
 svn_fs_fs__check_rep(representation_t *rep,
                      svn_fs_t *fs,
                      void **hint,
-                     apr_pool_t *pool);
+                     apr_pool_t *scratch_pool);
 
 /* Follow the representation delta chain in FS starting with REP.  The
    number of reps (including REP) in the chain will be returned in
    *CHAIN_LENGTH.  *SHARD_COUNT will be set to the number of shards
-   accessed.  Do any allocations in POOL. */
+   accessed.  Do any allocations in SCRATCH_POOL. */
 svn_error_t *
 svn_fs_fs__rep_chain_length(int *chain_length,
                             int *shard_count,
                             representation_t *rep,
                             svn_fs_t *fs,
-                            apr_pool_t *pool);
+                            apr_pool_t *scratch_pool);
 
 /* Set *CONTENTS to be a readable svn_stream_t that receives the text
    representation REP as seen in filesystem FS.  If CACHE_FULLTEXT is

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/dag.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/dag.c?rev=1605535&r1=1605534&r2=1605535&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/dag.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/dag.c Wed Jun 25 18:16:50 2014
@@ -160,10 +160,13 @@ get_node_revision(node_revision_t **node
   if (! node->node_revision)
     {
       node_revision_t *noderev;
+      apr_pool_t *scratch_pool = svn_pool_create(node->node_pool);
 
       SVN_ERR(svn_fs_fs__get_node_revision(&noderev, node->fs,
-                                           node->id, node->node_pool));
+                                           node->id, node->node_pool,
+                                           scratch_pool));
       node->node_revision = noderev;
+      svn_pool_destroy(scratch_pool);
     }
 
   /* Now NODE->node_revision is set.  */
@@ -614,7 +617,7 @@ svn_fs_fs__dag_revision_root(dag_node_t 
   /* Construct the node. */
   new_node = apr_pcalloc(pool, sizeof(*new_node));
   new_node->fs = fs;
-  SVN_ERR(svn_fs_fs__rev_get_root(&new_node->id, fs, rev, pool));
+  SVN_ERR(svn_fs_fs__rev_get_root(&new_node->id, fs, rev, pool, pool));
 
   /* Grab the contents so we can inspect the node's kind and created path. */
   new_node->node_pool = pool;

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/fs_fs.c?rev=1605535&r1=1605534&r2=1605535&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/fs_fs.c Wed Jun 25 18:16:50 2014
@@ -43,6 +43,7 @@
 
 #include "private/svn_fs_util.h"
 #include "private/svn_string_private.h"
+#include "private/svn_subr_private.h"
 #include "../libsvn_fs/fs-loader.h"
 
 /* The default maximum number of files per directory to store in the
@@ -676,7 +677,7 @@ read_config(fs_fs_data_t *ffd,
       SVN_ERR(svn_config_get_bool(config, &ffd->compress_packed_revprops,
                                   CONFIG_SECTION_PACKED_REVPROPS,
                                   CONFIG_OPTION_COMPRESS_PACKED_REVPROPS,
-                                  TRUE));
+                                  FALSE));
       SVN_ERR(svn_config_get_int64(config, &ffd->revprop_pack_size,
                                    CONFIG_SECTION_PACKED_REVPROPS,
                                    CONFIG_OPTION_REVPROP_PACK_SIZE,
@@ -858,15 +859,15 @@ write_config(svn_fs_t *fs,
 "### ineffective."                                                           NL
 "### revprop-pack-size is 64 kBytes by default for non-compressed revprop"   NL
 "### pack files and 256 kBytes when compression has been enabled."           NL
-"# " CONFIG_OPTION_REVPROP_PACK_SIZE " = 256"                                NL
+"# " CONFIG_OPTION_REVPROP_PACK_SIZE " = 64"                                 NL
 "###"                                                                        NL
 "### To save disk space, packed revprop files may be compressed.  Standard"  NL
 "### revprops tend to allow for very effective compression.  Reading and"    NL
 "### even more so writing, become significantly more CPU intensive.  With"   NL
 "### revprop caching enabled, the overhead can be offset by reduced I/O"     NL
 "### unless you often modify revprops after packing."                        NL
-"### Compressing packed revprops is enabled by default."                     NL
-"# " CONFIG_OPTION_COMPRESS_PACKED_REVPROPS " = true"                        NL
+"### Compressing packed revprops is disabled by default."                    NL
+"# " CONFIG_OPTION_COMPRESS_PACKED_REVPROPS " = false"                       NL
 ""                                                                           NL
 "[" CONFIG_SECTION_IO "]"                                                    NL
 "### Parameters in this section control the data access granularity in"      NL
@@ -891,6 +892,14 @@ write_config(svn_fs_t *fs,
                             fsfs_conf_contents, pool);
 }
 
+/* Read / Evaluate the global configuration in FS->CONFIG to set up
+ * parameters in FS. */
+static svn_error_t *
+read_global_config(svn_fs_t *fs)
+{
+  return SVN_NO_ERROR;
+}
+
 svn_error_t *
 svn_fs_fs__open(svn_fs_t *fs, const char *path, apr_pool_t *pool)
 {
@@ -927,6 +936,9 @@ svn_fs_fs__open(svn_fs_t *fs, const char
   /* Read the configuration file. */
   SVN_ERR(read_config(ffd, fs->path, fs->pool, pool));
 
+  /* Global configuration options. */
+  SVN_ERR(read_global_config(fs));
+
   return get_youngest(&(ffd->youngest_rev_cache), path, pool);
 }
 
@@ -1454,6 +1466,9 @@ svn_fs_fs__create(svn_fs_t *fs,
 
   SVN_ERR(read_config(ffd, fs->path, fs->pool, pool));
 
+  /* Global configuration options. */
+  SVN_ERR(read_global_config(fs));
+
   /* Create the min unpacked rev file. */
   if (ffd->format >= SVN_FS_FS__MIN_PACKED_FORMAT)
     SVN_ERR(svn_io_file_create(svn_fs_fs__path_min_unpacked_rev(fs, pool),
@@ -1577,8 +1592,9 @@ svn_fs_fs__get_node_origin(const svn_fs_
         = apr_hash_get(node_origins, node_id_ptr, len);
 
       if (origin_id_str)
-        *origin_id = svn_fs_fs__id_parse(origin_id_str->data,
-                                         origin_id_str->len, pool);
+        *origin_id = svn_fs_fs__id_parse(apr_pstrdup(pool,
+                                                     origin_id_str->data),
+                                         pool);
     }
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/hotcopy.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/hotcopy.c?rev=1605535&r1=1605534&r2=1605535&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/hotcopy.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/hotcopy.c Wed Jun 25 18:16:50 2014
@@ -228,7 +228,6 @@ hotcopy_io_copy_dir_recursively(const ch
 
 /* Copy an un-packed revision or revprop file for revision REV from SRC_SUBDIR
  * to DST_SUBDIR. Assume a sharding layout based on MAX_FILES_PER_DIR.
- * If INCLUDE_INDEXES is set, copy rev index files as well.
  * Use SCRATCH_POOL for temporary allocations. */
 static svn_error_t *
 hotcopy_copy_shard_file(const char *src_subdir,

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/id.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/id.c?rev=1605535&r1=1605534&r2=1605535&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/id.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/id.c Wed Jun 25 18:16:50 2014
@@ -78,7 +78,10 @@ part_parse(svn_fs_fs__id_part_t *part,
       return *data == '\0';
     }
 
-  part->revision = SVN_STR_TO_REV(++data);
+  {
+    const char *end;
+    part->revision = svn__strtol(data+1, &end);
+  }
 
   return TRUE;
 }
@@ -90,8 +93,9 @@ static svn_boolean_t
 txn_id_parse(svn_fs_fs__id_part_t *txn_id,
              const char *data)
 {
-  txn_id->revision = SVN_STR_TO_REV(data);
-  data = strchr(data, '-');
+  const char *end;
+  txn_id->revision = svn__strtol(data, &end);
+  data = strchr(end, '-');
   if (data == NULL)
     return FALSE;
 
@@ -435,16 +439,11 @@ svn_fs_fs__id_copy(const svn_fs_id_t *so
 
 
 svn_fs_id_t *
-svn_fs_fs__id_parse(const char *data,
-                    apr_size_t len,
+svn_fs_fs__id_parse(char *data,
                     apr_pool_t *pool)
 {
   fs_fs__id_t *id;
-  char *data_copy, *str;
-
-  /* Dup the ID data into POOL.  Our returned ID will have references
-     into this memory. */
-  data_copy = apr_pstrmemdup(pool, data, len);
+  char *str;
 
   /* Alloc a new svn_fs_id_t structure. */
   id = apr_pcalloc(pool, sizeof(*id));
@@ -458,40 +457,41 @@ svn_fs_fs__id_parse(const char *data,
      string.*/
 
   /* Node Id */
-  str = svn_cstring_tokenize(".", &data_copy);
+  str = svn_cstring_tokenize(".", &data);
   if (str == NULL)
     return NULL;
   if (! part_parse(&id->private_id.node_id, str))
     return NULL;
 
   /* Copy Id */
-  str = svn_cstring_tokenize(".", &data_copy);
+  str = svn_cstring_tokenize(".", &data);
   if (str == NULL)
     return NULL;
   if (! part_parse(&id->private_id.copy_id, str))
     return NULL;
 
   /* Txn/Rev Id */
-  str = svn_cstring_tokenize(".", &data_copy);
+  str = svn_cstring_tokenize(".", &data);
   if (str == NULL)
     return NULL;
 
   if (str[0] == 'r')
     {
       apr_int64_t val;
+      const char *tmp;
       svn_error_t *err;
 
       /* This is a revision type ID */
       id->private_id.txn_id.revision = SVN_INVALID_REVNUM;
       id->private_id.txn_id.number = 0;
 
-      data_copy = str + 1;
-      str = svn_cstring_tokenize("/", &data_copy);
+      data = str + 1;
+      str = svn_cstring_tokenize("/", &data);
       if (str == NULL)
         return NULL;
-      id->private_id.rev_item.revision = SVN_STR_TO_REV(str);
+      id->private_id.rev_item.revision = svn__strtol(str, &tmp);
 
-      err = svn_cstring_atoi64(&val, data_copy);
+      err = svn_cstring_atoi64(&val, data);
       if (err)
         {
           svn_error_clear(err);

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/id.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/id.h?rev=1605535&r1=1605534&r2=1605535&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/id.h (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/id.h Wed Jun 25 18:16:50 2014
@@ -149,10 +149,9 @@ svn_fs_id_t *svn_fs_fs__id_rev_create(co
 svn_fs_id_t *svn_fs_fs__id_copy(const svn_fs_id_t *id,
                                 apr_pool_t *pool);
 
-/* Return an ID resulting from parsing the string DATA (with length
-   LEN), or NULL if DATA is an invalid ID string. */
-svn_fs_id_t *svn_fs_fs__id_parse(const char *data,
-                                 apr_size_t len,
+/* Return an ID resulting from parsing the string DATA, or NULL if DATA is
+   an invalid ID string. *DATA will be modified / invalidated by this call. */
+svn_fs_id_t *svn_fs_fs__id_parse(char *data,
                                  apr_pool_t *pool);