Modified: subversion/branches/svn-auth-x509/subversion/libsvn_fs_x/fs.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/subversion/libsvn_fs_x/fs.c?rev=1652409&r1=1652408&r2=1652409&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/subversion/libsvn_fs_x/fs.c (original)
+++ subversion/branches/svn-auth-x509/subversion/libsvn_fs_x/fs.c Fri Jan 16 
14:01:35 2015
@@ -59,14 +59,17 @@
 
 /* Initialize the part of FS that requires global serialization across all
    instances.  The caller is responsible of ensuring that serialization.
-   Use COMMON_POOL for process-wide and POOL for temporary allocations. */
+   Use COMMON_POOL for process-wide and SCRATCH_POOL for temporary
+   allocations. */
 static svn_error_t *
-x_serialized_init(svn_fs_t *fs, apr_pool_t *common_pool, apr_pool_t *pool)
+x_serialized_init(svn_fs_t *fs,
+                  apr_pool_t *common_pool,
+                  apr_pool_t *scratch_pool)
 {
-  fs_x_data_t *ffd = fs->fsap_data;
+  svn_fs_x__data_t *ffd = fs->fsap_data;
   const char *key;
   void *val;
-  fs_x_shared_data_t *ffsd;
+  svn_fs_x__shared_data_t *ffsd;
   apr_status_t status;
 
   /* Note that we are allocating a small amount of long-lived data for
@@ -93,7 +96,7 @@ x_serialized_init(svn_fs_t *fs, apr_pool
   SVN_ERR_ASSERT(fs->uuid);
   SVN_ERR_ASSERT(ffd->instance_id);
 
-  key = apr_pstrcat(pool, SVN_FSX_SHARED_USERDATA_PREFIX,
+  key = apr_pstrcat(scratch_pool, SVN_FSX_SHARED_USERDATA_PREFIX,
                     fs->uuid, ":", ffd->instance_id, SVN_VA_NULL);
   status = apr_pool_userdata_get(&val, key, common_pool);
   if (status)
@@ -155,26 +158,27 @@ struct x_freeze_baton_t {
 
 static svn_error_t *
 x_freeze_body(void *baton,
-              apr_pool_t *pool)
+              apr_pool_t *scratch_pool)
 {
   struct x_freeze_baton_t *b = baton;
   svn_boolean_t exists;
 
-  SVN_ERR(svn_fs_x__exists_rep_cache(&exists, b->fs, pool));
+  SVN_ERR(svn_fs_x__exists_rep_cache(&exists, b->fs, scratch_pool));
   if (exists)
-    SVN_ERR(svn_fs_x__lock_rep_cache(b->fs, pool));
+    SVN_ERR(svn_fs_x__lock_rep_cache(b->fs, scratch_pool));
 
-  SVN_ERR(b->freeze_func(b->freeze_baton, pool));
+  SVN_ERR(b->freeze_func(b->freeze_baton, scratch_pool));
 
   return SVN_NO_ERROR;
 }
 
 static svn_error_t *
 x_freeze_body2(void *baton,
-               apr_pool_t *pool)
+               apr_pool_t *scratch_pool)
 {
   struct x_freeze_baton_t *b = baton;
-  SVN_ERR(svn_fs_x__with_write_lock(b->fs, x_freeze_body, baton, pool));
+  SVN_ERR(svn_fs_x__with_write_lock(b->fs, x_freeze_body, baton,
+                                    scratch_pool));
 
   return SVN_NO_ERROR;
 }
@@ -183,7 +187,7 @@ static svn_error_t *
 x_freeze(svn_fs_t *fs,
          svn_fs_freeze_func_t freeze_func,
          void *freeze_baton,
-         apr_pool_t *pool)
+         apr_pool_t *scratch_pool)
 {
   struct x_freeze_baton_t b;
 
@@ -192,7 +196,7 @@ x_freeze(svn_fs_t *fs,
   b.freeze_baton = freeze_baton;
 
   SVN_ERR(svn_fs__check_fs(fs, TRUE));
-  SVN_ERR(svn_fs_x__with_pack_lock(fs, x_freeze_body2, &b, pool));
+  SVN_ERR(svn_fs_x__with_pack_lock(fs, x_freeze_body2, &b, scratch_pool));
 
   return SVN_NO_ERROR;
 }
@@ -203,7 +207,7 @@ x_info(const void **fsx_info,
        apr_pool_t *result_pool,
        apr_pool_t *scratch_pool)
 {
-  fs_x_data_t *ffd = fs->fsap_data;
+  svn_fs_x__data_t *ffd = fs->fsap_data;
   svn_fs_fsx_info_t *info = apr_palloc(result_pool, sizeof(*info));
   info->fs_type = SVN_FS_TYPE_FSX;
   info->shard_size = ffd->max_files_per_dir;
@@ -230,11 +234,11 @@ x_revision_proplist(apr_hash_t **proplis
 static svn_error_t *
 x_set_uuid(svn_fs_t *fs,
            const char *uuid,
-           apr_pool_t *pool)
+           apr_pool_t *scratch_pool)
 {
   /* Whenever we set a new UUID, imply that FS will also be a different
    * instance (on formats that support this). */
-  return svn_error_trace(svn_fs_x__set_uuid(fs, uuid, NULL, pool));
+  return svn_error_trace(svn_fs_x__set_uuid(fs, uuid, NULL, scratch_pool));
 }
 
 
@@ -272,7 +276,7 @@ static fs_vtable_t fs_vtable = {
 static svn_error_t *
 initialize_fs_struct(svn_fs_t *fs)
 {
-  fs_x_data_t *ffd = apr_pcalloc(fs->pool, sizeof(*ffd));
+  svn_fs_x__data_t *ffd = apr_pcalloc(fs->pool, sizeof(*ffd));
   fs->vtable = &fs_vtable;
   fs->fsap_data = ffd;
   return SVN_NO_ERROR;
@@ -289,24 +293,26 @@ uninitialize_fs_struct(svn_fs_t *fs)
 
 /* This implements the fs_library_vtable_t.create() API.  Create a new
    fsx-backed Subversion filesystem at path PATH and link it into
-   *FS.  Perform temporary allocations in POOL, and fs-global allocations
+   *FS.
+
+   Perform temporary allocations in SCRATCH_POOL, and fs-global allocations
    in COMMON_POOL.  The latter must be serialized using COMMON_POOL_LOCK. */
 static svn_error_t *
 x_create(svn_fs_t *fs,
          const char *path,
          svn_mutex__t *common_pool_lock,
-         apr_pool_t *pool,
+         apr_pool_t *scratch_pool,
          apr_pool_t *common_pool)
 {
   SVN_ERR(svn_fs__check_fs(fs, FALSE));
 
   SVN_ERR(initialize_fs_struct(fs));
 
-  SVN_ERR(svn_fs_x__create(fs, path, pool));
+  SVN_ERR(svn_fs_x__create(fs, path, scratch_pool));
 
-  SVN_ERR(svn_fs_x__initialize_caches(fs, pool));
+  SVN_ERR(svn_fs_x__initialize_caches(fs, scratch_pool));
   SVN_MUTEX__WITH_LOCK(common_pool_lock,
-                       x_serialized_init(fs, common_pool, pool));
+                       x_serialized_init(fs, common_pool, scratch_pool));
 
   return SVN_NO_ERROR;
 }
@@ -317,17 +323,17 @@ x_create(svn_fs_t *fs,
 
 /* This implements the fs_library_vtable_t.open() API.  Open an FSX
    Subversion filesystem located at PATH, set *FS to point to the
-   correct vtable for the filesystem.  Use POOL for any temporary
+   correct vtable for the filesystem.  Use SCRATCH_POOL for any temporary
    allocations, and COMMON_POOL for fs-global allocations.
    The latter must be serialized using COMMON_POOL_LOCK.  */
 static svn_error_t *
 x_open(svn_fs_t *fs,
        const char *path,
        svn_mutex__t *common_pool_lock,
-       apr_pool_t *pool,
+       apr_pool_t *scratch_pool,
        apr_pool_t *common_pool)
 {
-  apr_pool_t *subpool = svn_pool_create(pool);
+  apr_pool_t *subpool = svn_pool_create(scratch_pool);
 
   SVN_ERR(svn_fs__check_fs(fs, FALSE));
 
@@ -351,12 +357,12 @@ static svn_error_t *
 x_open_for_recovery(svn_fs_t *fs,
                     const char *path,
                     svn_mutex__t *common_pool_lock,
-                    apr_pool_t *pool,
+                    apr_pool_t *scratch_pool,
                     apr_pool_t *common_pool)
 {
   svn_error_t * err;
   svn_revnum_t youngest_rev;
-  apr_pool_t * subpool = svn_pool_create(pool);
+  apr_pool_t * subpool = svn_pool_create(scratch_pool);
 
   /* Recovery for FSFS is currently limited to recreating the 'current'
      file from the latest revision. */
@@ -403,7 +409,7 @@ x_open_for_recovery(svn_fs_t *fs,
   svn_pool_destroy(subpool);
 
   /* Now open the filesystem properly by calling the vtable method directly. */
-  return x_open(fs, path, common_pool_lock, pool, common_pool);
+  return x_open(fs, path, common_pool_lock, scratch_pool, common_pool);
 }
 
 
@@ -417,16 +423,17 @@ x_upgrade(svn_fs_t *fs,
           svn_cancel_func_t cancel_func,
           void *cancel_baton,
           svn_mutex__t *common_pool_lock,
-          apr_pool_t *pool,
+          apr_pool_t *scratch_pool,
           apr_pool_t *common_pool)
 {
-  SVN_ERR(x_open(fs, path, common_pool_lock, pool, common_pool));
+  SVN_ERR(x_open(fs, path, common_pool_lock, scratch_pool, common_pool));
   return svn_fs_x__upgrade(fs, notify_func, notify_baton,
-                           cancel_func, cancel_baton, pool);
+                           cancel_func, cancel_baton, scratch_pool);
 }
 
 static svn_error_t *
-x_verify(svn_fs_t *fs, const char *path,
+x_verify(svn_fs_t *fs,
+         const char *path,
          svn_revnum_t start,
          svn_revnum_t end,
          svn_fs_progress_notify_func_t notify_func,
@@ -434,12 +441,12 @@ x_verify(svn_fs_t *fs, const char *path,
          svn_cancel_func_t cancel_func,
          void *cancel_baton,
          svn_mutex__t *common_pool_lock,
-         apr_pool_t *pool,
+         apr_pool_t *scratch_pool,
          apr_pool_t *common_pool)
 {
-  SVN_ERR(x_open(fs, path, common_pool_lock, pool, common_pool));
+  SVN_ERR(x_open(fs, path, common_pool_lock, scratch_pool, common_pool));
   return svn_fs_x__verify(fs, start, end, notify_func, notify_baton,
-                          cancel_func, cancel_baton, pool);
+                          cancel_func, cancel_baton, scratch_pool);
 }
 
 static svn_error_t *
@@ -450,12 +457,12 @@ x_pack(svn_fs_t *fs,
        svn_cancel_func_t cancel_func,
        void *cancel_baton,
        svn_mutex__t *common_pool_lock,
-       apr_pool_t *pool,
+       apr_pool_t *scratch_pool,
        apr_pool_t *common_pool)
 {
-  SVN_ERR(x_open(fs, path, common_pool_lock, pool, common_pool));
+  SVN_ERR(x_open(fs, path, common_pool_lock, scratch_pool, common_pool));
   return svn_fs_x__pack(fs, notify_func, notify_baton,
-                        cancel_func, cancel_baton, pool);
+                        cancel_func, cancel_baton, scratch_pool);
 }
 
 
@@ -467,7 +474,8 @@ x_pack(svn_fs_t *fs,
    re-copy data which already exists in DST_FS.
    The CLEAN_LOGS argument is ignored and included for Subversion
    1.0.x compatibility.  The NOTIFY_FUNC and NOTIFY_BATON arguments
-   are also currently ignored.  Perform all temporary allocations in POOL. */
+   are also currently ignored.
+   Perform all temporary allocations in SCRATCH_POOL. */
 static svn_error_t *
 x_hotcopy(svn_fs_t *src_fs,
           svn_fs_t *dst_fs,
@@ -480,11 +488,12 @@ x_hotcopy(svn_fs_t *src_fs,
           svn_cancel_func_t cancel_func,
           void *cancel_baton,
           svn_mutex__t *common_pool_lock,
-          apr_pool_t *pool,
+          apr_pool_t *scratch_pool,
           apr_pool_t *common_pool)
 {
   /* Open the source repo as usual. */
-  SVN_ERR(x_open(src_fs, src_path, common_pool_lock, pool, common_pool));
+  SVN_ERR(x_open(src_fs, src_path, common_pool_lock, scratch_pool,
+                 common_pool));
   if (cancel_func)
     SVN_ERR(cancel_func(cancel_baton));
 
@@ -493,18 +502,19 @@ x_hotcopy(svn_fs_t *src_fs,
    * available. */
   SVN_ERR(initialize_fs_struct(dst_fs));
   SVN_ERR(svn_fs_x__hotcopy_prepare_target(src_fs, dst_fs, dst_path,
-                                           incremental, pool));
+                                           incremental, scratch_pool));
   uninitialize_fs_struct(dst_fs);
 
   /* Now, the destination repo should open just fine. */
-  SVN_ERR(x_open(dst_fs, dst_path, common_pool_lock, pool, common_pool));
+  SVN_ERR(x_open(dst_fs, dst_path, common_pool_lock, scratch_pool,
+                 common_pool));
   if (cancel_func)
     SVN_ERR(cancel_func(cancel_baton));
 
   /* Now, we may copy data as needed ... */
   return svn_fs_x__hotcopy(src_fs, dst_fs, incremental,
                            notify_func, notify_baton,
-                           cancel_func, cancel_baton, pool);
+                           cancel_func, cancel_baton, scratch_pool);
 }
 
 
@@ -529,13 +539,14 @@ x_logfiles(apr_array_header_t **logfiles
 
 
 /* Delete the filesystem located at path PATH.  Perform any temporary
-   allocations in POOL. */
+   allocations in SCRATCH_POOL. */
 static svn_error_t *
 x_delete_fs(const char *path,
-            apr_pool_t *pool)
+            apr_pool_t *scratch_pool)
 {
   /* Remove everything. */
-  return svn_error_trace(svn_io_remove_dir2(path, FALSE, NULL, NULL, pool));
+  return svn_error_trace(svn_io_remove_dir2(path, FALSE, NULL, NULL,
+                                            scratch_pool));
 }
 
 static const svn_version_t *
@@ -558,7 +569,7 @@ x_set_svn_fs_open(svn_fs_t *fs,
                                                apr_pool_t *,
                                                apr_pool_t *))
 {
-  fs_x_data_t *ffd = fs->fsap_data;
+  svn_fs_x__data_t *ffd = fs->fsap_data;
   ffd->svn_fs_open_ = svn_fs_open_;
   return SVN_NO_ERROR;
 }
@@ -595,12 +606,14 @@ static fs_library_vtable_t library_vtabl
 
 svn_error_t *
 svn_fs_x__init(const svn_version_t *loader_version,
-               fs_library_vtable_t **vtable, apr_pool_t* common_pool)
+               fs_library_vtable_t **vtable,
+               apr_pool_t* common_pool)
 {
   static const svn_version_checklist_t checklist[] =
     {
       { "svn_subr",  svn_subr_version },
       { "svn_delta", svn_delta_version },
+      { "svn_fs_util", svn_fs_util__version },
       { NULL, NULL }
     };
 

Modified: subversion/branches/svn-auth-x509/subversion/libsvn_fs_x/fs.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/subversion/libsvn_fs_x/fs.h?rev=1652409&r1=1652408&r2=1652409&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/subversion/libsvn_fs_x/fs.h (original)
+++ subversion/branches/svn-auth-x509/subversion/libsvn_fs_x/fs.h Fri Jan 16 
14:01:35 2015
@@ -140,11 +140,11 @@ extern "C" {
    relate to a particular transaction in a filesystem (as identified
    by transaction id and filesystem UUID).  Objects of this type are
    allocated in their own subpool of the common pool. */
-typedef struct fs_x_shared_txn_data_t
+typedef struct svn_fs_x__shared_txn_data_t
 {
   /* The next transaction in the list, or NULL if there is no following
      transaction. */
-  struct fs_x_shared_txn_data_t *next;
+  struct svn_fs_x__shared_txn_data_t *next;
 
   /* ID of this transaction. */
   svn_fs_x__txn_id_t txn_id;
@@ -158,22 +158,22 @@ typedef struct fs_x_shared_txn_data_t
   /* The pool in which this object has been allocated; a subpool of the
      common pool. */
   apr_pool_t *pool;
-} fs_x_shared_txn_data_t;
+} svn_fs_x__shared_txn_data_t;
 
 /* Private FSX-specific data shared between all svn_fs_t objects that
    relate to a particular filesystem, as identified by filesystem UUID.
    Objects of this type are allocated in the common pool. */
-typedef struct fs_x_shared_data_t
+typedef struct svn_fs_x__shared_data_t
 {
   /* A list of shared transaction objects for each transaction that is
      currently active, or NULL if none are.  All access to this list,
      including the contents of the objects stored in it, is synchronised
      under TXN_LIST_LOCK. */
-  fs_x_shared_txn_data_t *txns;
+  svn_fs_x__shared_txn_data_t *txns;
 
   /* A free transaction object, or NULL if there is no free object.
      Access to this object is synchronised under TXN_LIST_LOCK. */
-  fs_x_shared_txn_data_t *free_txn;
+  svn_fs_x__shared_txn_data_t *free_txn;
 
   /* The following lock must be taken out in reverse order of their
      declaration here.  Any subset may be acquired and held at any given
@@ -199,26 +199,26 @@ typedef struct fs_x_shared_data_t
   /* The common pool, under which this object is allocated, subpools
      of which are used to allocate the transaction objects. */
   apr_pool_t *common_pool;
-} fs_x_shared_data_t;
+} svn_fs_x__shared_data_t;
 
 /* Data structure for the 1st level DAG node cache. */
-typedef struct fs_x_dag_cache_t fs_x_dag_cache_t;
+typedef struct svn_fs_x__dag_cache_t svn_fs_x__dag_cache_t;
 
 /* Key type for all caches that use revision + offset / counter as key.
 
    Note: Cache keys should be 16 bytes for best performance and there
          should be no padding. */
-typedef struct pair_cache_key_t
+typedef struct svn_fs_x__pair_cache_key_t
 {
   /* The object's revision.  Use the 64 data type to prevent padding. */
   apr_int64_t revision;
 
   /* Sub-address: item index, revprop generation, packed flag, etc. */
   apr_int64_t second;
-} pair_cache_key_t;
+} svn_fs_x__pair_cache_key_t;
 
 /* Key type that identifies a representation / rep header. */
-typedef struct representation_cache_key_t
+typedef struct svn_fs_x__representation_cache_key_t
 {
   /* Revision that contains the representation */
   svn_revnum_t revision;
@@ -228,12 +228,12 @@ typedef struct representation_cache_key_
 
   /* Item index of the representation */
   apr_uint64_t item_index;
-} representation_cache_key_t;
+} svn_fs_x__representation_cache_key_t;
 
 /* Key type that identifies a txdelta window.
 
    Note: Cache keys should require no padding. */
-typedef struct window_cache_key_t
+typedef struct svn_fs_x__window_cache_key_t
 {
   /* The object's revision.  Use the 64 data type to prevent padding. */
   apr_int64_t revision;
@@ -243,11 +243,11 @@ typedef struct window_cache_key_t
 
   /* Item index of the representation */
   apr_uint64_t item_index;
-} window_cache_key_t;
+} svn_fs_x__window_cache_key_t;
 
 /* Private (non-shared) FSX-specific data for each svn_fs_t object.
    Any caches in here may be NULL. */
-typedef struct fs_x_data_t
+typedef struct svn_fs_x__data_t
 {
   /* The format number of this FS. */
   int format;
@@ -279,12 +279,8 @@ typedef struct fs_x_data_t
      e.g. memcached may be ignored as caching is an optional feature. */
   svn_boolean_t fail_stop;
 
-  /* A cache of revision root IDs, mapping from (svn_revnum_t *) to
-     (svn_fs_id_t *).  (Not threadsafe.) */
-  svn_cache__t *rev_root_id_cache;
-
   /* Caches native dag_node_t* instances and acts as a 1st level cache */
-  fs_x_dag_cache_t *dag_node_cache;
+  svn_fs_x__dag_cache_t *dag_node_cache;
 
   /* DAG node cache for immutable nodes.  Maps (revision, fspath)
      to (dag_node_t *). This is the 2nd level cache for DAG nodes. */
@@ -292,7 +288,7 @@ typedef struct fs_x_data_t
 
   /* A cache of the contents of immutable directories; maps from
      unparsed FS ID to a apr_hash_t * mapping (const char *) dirent
-     names to (svn_fs_dirent_t *). */
+     names to (svn_fs_x__dirent_t *). */
   svn_cache__t *dir_cache;
 
   /* Fulltext cache; currently only used with memcached.  Maps from
@@ -315,11 +311,12 @@ typedef struct fs_x_data_t
      respective pack file. */
   svn_cache__t *packed_offset_cache;
 
-  /* Cache for txdelta_window_t objects; the key is window_cache_key_t */
+  /* Cache for txdelta_window_t objects;
+   * the key is svn_fs_x__window_cache_key_t */
   svn_cache__t *txdelta_window_cache;
 
   /* Cache for combined windows as svn_stringbuf_t objects;
-     the key is window_cache_key_t */
+     the key is svn_fs_x__window_cache_key_t */
   svn_cache__t *combined_window_cache;
 
   /* Cache for svn_fs_x__rep_header_t objects;
@@ -330,8 +327,8 @@ typedef struct fs_x_data_t
      the key is a (pack file revision, file offset) pair */
   svn_cache__t *noderevs_container_cache;
 
-  /* Cache for change lists as APR arrays of change_t * objects; the key
-     is the revision */
+  /* Cache for change lists as APR arrays of svn_fs_x__change_t * objects;
+     the key is the revision */
   svn_cache__t *changes_cache;
 
   /* Cache for change_list_t containers;
@@ -376,7 +373,7 @@ typedef struct fs_x_data_t
   svn_boolean_t has_write_lock;
 
   /* Data shared between all svn_fs_t objects for a given filesystem. */
-  fs_x_shared_data_t *shared;
+  svn_fs_x__shared_data_t *shared;
 
   /* The sqlite database used for rep caching. */
   svn_sqlite__db_t *rep_cache_db;
@@ -421,34 +418,30 @@ typedef struct fs_x_data_t
   /* Pointer to svn_fs_open. */
   svn_error_t *(*svn_fs_open_)(svn_fs_t **, const char *, apr_hash_t *,
                                apr_pool_t *, apr_pool_t *);
-} fs_x_data_t;
+} svn_fs_x__data_t;
 
 
 /*** Filesystem Transaction ***/
-typedef struct transaction_t
+typedef struct svn_fs_x__transaction_t
 {
   /* property list (const char * name, svn_string_t * value).
      may be NULL if there are no properties.  */
   apr_hash_t *proplist;
 
-  /* node revision id of the root node.  */
-  const svn_fs_id_t *root_id;
-
-  /* node revision id of the node which is the root of the revision
-     upon which this txn is base.  (unfinished only) */
-  const svn_fs_id_t *base_id;
+  /* revision upon which this txn is base.  (unfinished only) */
+  svn_revnum_t base_rev;
 
   /* copies list (const char * copy_ids), or NULL if there have been
      no copies in this transaction.  */
   apr_array_header_t *copies;
 
-} transaction_t;
+} svn_fs_x__transaction_t;
 
 
 /*** Representation ***/
 /* If you add fields to this, check to see if you need to change
  * svn_fs_x__rep_copy. */
-typedef struct representation_t
+typedef struct svn_fs_x__representation_t
 {
   /* Checksums digests for the contents produced by this representation.
      This checksum is for the contents the rep shows to consumers,
@@ -466,7 +459,7 @@ typedef struct representation_t
   unsigned char md5_digest[APR_MD5_DIGESTSIZE];
 
   /* Change set and item number where this representation is located. */
-  svn_fs_x__id_part_t id;
+  svn_fs_x__id_t id;
 
   /* The size of the representation in bytes as seen in the revision
      file. */
@@ -475,23 +468,26 @@ typedef struct representation_t
   /* The size of the fulltext of the representation. */
   svn_filesize_t expanded_size;
 
-} representation_t;
+} svn_fs_x__representation_t;
 
 
 /*** Node-Revision ***/
 /* If you add fields to this, check to see if you need to change
  * copy_node_revision in dag.c. */
-typedef struct node_revision_t
+typedef struct svn_fs_x__noderev_t
 {
-  /* node kind */
-  svn_node_kind_t kind;
+  /* Predecessor node revision id.  Will be "unused" if there is no
+     predecessor for this node revision. */
+  svn_fs_x__id_t predecessor_id;
+
+  /* The ID of this noderev */
+  svn_fs_x__id_t noderev_id;
 
-  /* The node-id for this node-rev. */
-  const svn_fs_id_t *id;
+  /* Identifier of the node that this noderev belongs to. */
+  svn_fs_x__id_t node_id;
 
-  /* predecessor node revision id, or NULL if there is no predecessor
-     for this node revision */
-  const svn_fs_id_t *predecessor_id;
+  /* Copy identifier of this line of history. */
+  svn_fs_x__id_t copy_id;
 
   /* If this node-rev is a copy, where was it copied from? */
   const char *copyfrom_path;
@@ -502,17 +498,19 @@ typedef struct node_revision_t
   svn_revnum_t copyroot_rev;
   const char *copyroot_path;
 
-  /* number of predecessors this node revision has (recursively), or
-     -1 if not known (for backward compatibility). */
+  /* node kind */
+  svn_node_kind_t kind;
+
+  /* number of predecessors this node revision has (recursively). */
   int predecessor_count;
 
   /* representation key for this node's properties.  may be NULL if
      there are no properties.  */
-  representation_t *prop_rep;
+  svn_fs_x__representation_t *prop_rep;
 
   /* representation for this node's data.  may be NULL if there is
      no data. */
-  representation_t *data_rep;
+  svn_fs_x__representation_t *data_rep;
 
   /* path at which this node first came into existence.  */
   const char *created_path;
@@ -520,25 +518,54 @@ typedef struct node_revision_t
   /* is this the unmodified root of a transaction? */
   svn_boolean_t is_fresh_txn_root;
 
+  /* Does this node itself have svn:mergeinfo? */
+  svn_boolean_t has_mergeinfo;
+
   /* Number of nodes with svn:mergeinfo properties that are
      descendants of this node (including it itself) */
   apr_int64_t mergeinfo_count;
 
-  /* Does this node itself have svn:mergeinfo? */
-  svn_boolean_t has_mergeinfo;
+} svn_fs_x__noderev_t;
+
+
+/** The type of a directory entry.  */
+typedef struct svn_fs_x__dirent_t
+{
+
+  /** The name of this directory entry.  */
+  const char *name;
+
+  /** The node revision ID it names.  */
+  svn_fs_x__id_t id;
 
-} node_revision_t;
+  /** The node kind. */
+  svn_node_kind_t kind;
+} svn_fs_x__dirent_t;
 
 
 /*** Change ***/
-typedef struct change_t
+typedef struct svn_fs_x__change_t
 {
   /* Path of the change. */
   svn_string_t path;
 
-  /* API compatible change description */
-  svn_fs_path_change2_t info;
-} change_t;
+  /* node revision id of changed path */
+  svn_fs_x__id_t noderev_id;
+
+  /* See svn_fs_path_change2_t for a description for the remaining elements.
+   */
+  svn_fs_path_change_kind_t change_kind;
+
+  svn_boolean_t text_mod;
+  svn_boolean_t prop_mod;
+  svn_node_kind_t node_kind;
+
+  svn_boolean_t copyfrom_known;
+  svn_revnum_t copyfrom_rev;
+  const char *copyfrom_path;
+
+  svn_tristate_t mergeinfo_mod;
+} svn_fs_x__change_t;
 
 
 #ifdef __cplusplus

Modified: subversion/branches/svn-auth-x509/subversion/libsvn_fs_x/fs_x.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/subversion/libsvn_fs_x/fs_x.c?rev=1652409&r1=1652408&r2=1652409&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/subversion/libsvn_fs_x/fs_x.c (original)
+++ subversion/branches/svn-auth-x509/subversion/libsvn_fs_x/fs_x.c Fri Jan 16 
14:01:35 2015
@@ -76,13 +76,15 @@
 /* Check that BUF, a nul-terminated buffer of text from format file PATH,
    contains only digits at OFFSET and beyond, raising an error if not.
 
-   Uses POOL for temporary allocation. */
+   Uses SCRATCH_POOL for temporary allocation. */
 static svn_error_t *
-check_format_file_buffer_numeric(const char *buf, apr_off_t offset,
-                                 const char *path, apr_pool_t *pool)
+check_format_file_buffer_numeric(const char *buf,
+                                 apr_off_t offset,
+                                 const char *path,
+                                 apr_pool_t *scratch_pool)
 {
   return svn_fs_x__check_file_buffer_numeric(buf, offset, path, "Format",
-                                             pool);
+                                             scratch_pool);
 }
 
 /* Return the error SVN_ERR_FS_UNSUPPORTED_FORMAT if FS's format
@@ -102,45 +104,51 @@ check_format(int format)
      SVN_FS_X__FORMAT_NUMBER, format);
 }
 
+/* Read the format file at PATH and set *PFORMAT to the format version found
+ * and *MAX_FILES_PER_DIR to the shard size.  Use SCRATCH_POOL for temporary
+ * allocations. */
 static svn_error_t *
-read_format(int *pformat, int *max_files_per_dir,
-            const char *path, apr_pool_t *pool)
+read_format(int *pformat,
+            int *max_files_per_dir,
+            const char *path,
+            apr_pool_t *scratch_pool)
 {
   svn_stream_t *stream;
   svn_stringbuf_t *content;
   svn_stringbuf_t *buf;
   svn_boolean_t eos = FALSE;
 
-  SVN_ERR(svn_stringbuf_from_file2(&content, path, pool));
-  stream = svn_stream_from_stringbuf(content, pool);
-  SVN_ERR(svn_stream_readline(stream, &buf, "\n", &eos, pool));
+  SVN_ERR(svn_stringbuf_from_file2(&content, path, scratch_pool));
+  stream = svn_stream_from_stringbuf(content, scratch_pool);
+  SVN_ERR(svn_stream_readline(stream, &buf, "\n", &eos, scratch_pool));
   if (buf->len == 0 && eos)
     {
       /* Return a more useful error message. */
       return svn_error_createf(SVN_ERR_BAD_VERSION_FILE_FORMAT, NULL,
                                _("Can't read first line of format file '%s'"),
-                               svn_dirent_local_style(path, pool));
+                               svn_dirent_local_style(path, scratch_pool));
     }
 
   /* Check that the first line contains only digits. */
-  SVN_ERR(check_format_file_buffer_numeric(buf->data, 0, path, pool));
+  SVN_ERR(check_format_file_buffer_numeric(buf->data, 0, path, scratch_pool));
   SVN_ERR(svn_cstring_atoi(pformat, buf->data));
 
   /* Check that we support this format at all */
   SVN_ERR(check_format(*pformat));
 
   /* Read any options. */
-  SVN_ERR(svn_stream_readline(stream, &buf, "\n", &eos, pool));
+  SVN_ERR(svn_stream_readline(stream, &buf, "\n", &eos, scratch_pool));
   if (!eos && strncmp(buf->data, "layout sharded ", 15) == 0)
     {
       /* Check that the argument is numeric. */
-      SVN_ERR(check_format_file_buffer_numeric(buf->data, 15, path, pool));
+      SVN_ERR(check_format_file_buffer_numeric(buf->data, 15, path,
+                                               scratch_pool));
       SVN_ERR(svn_cstring_atoi(max_files_per_dir, buf->data + 15));
     }
   else
     return svn_error_createf(SVN_ERR_BAD_VERSION_FILE_FORMAT, NULL,
                   _("'%s' contains invalid filesystem format option '%s'"),
-                  svn_dirent_local_style(path, pool), buf->data);
+                  svn_dirent_local_style(path, scratch_pool), buf->data);
 
   return SVN_NO_ERROR;
 }
@@ -149,20 +157,21 @@ read_format(int *pformat, int *max_files
    to a new format file in PATH, possibly expecting to overwrite a
    previously existing file.
 
-   Use POOL for temporary allocation. */
+   Use SCRATCH_POOL for temporary allocation. */
 svn_error_t *
 svn_fs_x__write_format(svn_fs_t *fs,
                        svn_boolean_t overwrite,
-                       apr_pool_t *pool)
+                       apr_pool_t *scratch_pool)
 {
   svn_stringbuf_t *sb;
-  const char *path = svn_fs_x__path_format(fs, pool);
-  fs_x_data_t *ffd = fs->fsap_data;
+  const char *path = svn_fs_x__path_format(fs, scratch_pool);
+  svn_fs_x__data_t *ffd = fs->fsap_data;
 
   SVN_ERR_ASSERT(1 <= ffd->format && ffd->format <= SVN_FS_X__FORMAT_NUMBER);
 
-  sb = svn_stringbuf_createf(pool, "%d\n", ffd->format);
-  svn_stringbuf_appendcstr(sb, apr_psprintf(pool, "layout sharded %d\n",
+  sb = svn_stringbuf_createf(scratch_pool, "%d\n", ffd->format);
+  svn_stringbuf_appendcstr(sb, apr_psprintf(scratch_pool,
+                                            "layout sharded %d\n",
                                             ffd->max_files_per_dir));
 
   /* svn_io_write_version_file() does a load of magic to allow it to
@@ -171,16 +180,16 @@ svn_fs_x__write_format(svn_fs_t *fs,
   if (! overwrite)
     {
       /* Create the file */
-      SVN_ERR(svn_io_file_create(path, sb->data, pool));
+      SVN_ERR(svn_io_file_create(path, sb->data, scratch_pool));
     }
   else
     {
       SVN_ERR(svn_io_write_atomic(path, sb->data, sb->len,
-                                  NULL /* copy_perms_path */, pool));
+                                  NULL /* copy_perms_path */, scratch_pool));
     }
 
   /* And set the perms to make it read only */
-  return svn_io_set_file_read_only(path, FALSE, pool);
+  return svn_io_set_file_read_only(path, FALSE, scratch_pool);
 }
 
 /* Check that BLOCK_SIZE is a valid block / page size, i.e. it is within
@@ -231,7 +240,7 @@ verify_block_size(apr_int64_t block_size
  * and set the respective values in FFD.  Use pools as usual.
  */
 static svn_error_t *
-read_config(fs_x_data_t *ffd,
+read_config(svn_fs_x__data_t *ffd,
             const char *fs_path,
             apr_pool_t *result_pool,
             apr_pool_t *scratch_pool)
@@ -325,9 +334,11 @@ read_config(fs_x_data_t *ffd,
   return SVN_NO_ERROR;
 }
 
+/* Write FS' initial configuration file.
+ * Use SCRATCH_POOL for temporary allocations. */
 static svn_error_t *
 write_config(svn_fs_t *fs,
-             apr_pool_t *pool)
+             apr_pool_t *scratch_pool)
 {
 #define NL APR_EOL_STR
   static const char * const fsx_conf_contents =
@@ -504,8 +515,9 @@ write_config(svn_fs_t *fs,
 "# " CONFIG_OPTION_P2L_PAGE_SIZE " = 1024"                                   NL
 ;
 #undef NL
-  return svn_io_file_create(svn_dirent_join(fs->path, PATH_CONFIG, pool),
-                            fsx_conf_contents, pool);
+  return svn_io_file_create(svn_dirent_join(fs->path, PATH_CONFIG,
+                                            scratch_pool),
+                            fsx_conf_contents, scratch_pool);
 }
 
 /* Read FS's UUID file and store the data in the FS struct. */
@@ -513,7 +525,7 @@ static svn_error_t *
 read_uuid(svn_fs_t *fs,
           apr_pool_t *scratch_pool)
 {
-  fs_x_data_t *ffd = fs->fsap_data;
+  svn_fs_x__data_t *ffd = fs->fsap_data;
   apr_file_t *uuid_file;
   char buf[APR_UUID_FORMATTED_LENGTH + 2];
   apr_size_t limit;
@@ -542,7 +554,7 @@ svn_error_t *
 svn_fs_x__read_format_file(svn_fs_t *fs,
                            apr_pool_t *scratch_pool)
 {
-  fs_x_data_t *ffd = fs->fsap_data;
+  svn_fs_x__data_t *ffd = fs->fsap_data;
   int format, max_files_per_dir;
 
   /* Read info from format file. */
@@ -557,25 +569,27 @@ svn_fs_x__read_format_file(svn_fs_t *fs,
 }
 
 svn_error_t *
-svn_fs_x__open(svn_fs_t *fs, const char *path, apr_pool_t *pool)
+svn_fs_x__open(svn_fs_t *fs,
+               const char *path,
+               apr_pool_t *scratch_pool)
 {
-  fs_x_data_t *ffd = fs->fsap_data;
+  svn_fs_x__data_t *ffd = fs->fsap_data;
   fs->path = apr_pstrdup(fs->pool, path);
 
   /* Read the FS format file. */
-  SVN_ERR(svn_fs_x__read_format_file(fs, pool));
+  SVN_ERR(svn_fs_x__read_format_file(fs, scratch_pool));
 
   /* Read in and cache the repository uuid. */
-  SVN_ERR(read_uuid(fs, pool));
+  SVN_ERR(read_uuid(fs, scratch_pool));
 
   /* Read the min unpacked revision. */
-  SVN_ERR(svn_fs_x__update_min_unpacked_rev(fs, pool));
+  SVN_ERR(svn_fs_x__update_min_unpacked_rev(fs, scratch_pool));
 
   /* Read the configuration file. */
-  SVN_ERR(read_config(ffd, fs->path, fs->pool, pool));
+  SVN_ERR(read_config(ffd, fs->path, fs->pool, scratch_pool));
 
   return svn_error_trace(svn_fs_x__read_current(&ffd->youngest_rev_cache,
-                                                fs, pool));
+                                                fs, scratch_pool));
 }
 
 /* Baton type bridging svn_fs_x__upgrade and upgrade_body carrying 
@@ -589,16 +603,25 @@ struct upgrade_baton_t
   void *cancel_baton;
 };
 
+/* Upgrade the FS given in upgrade_baton_t *)BATON to the latest format
+ * version.  Apply options an invoke callback from that BATON.
+ * Temporary allocations are to be made from SCRATCH_POOL.
+ *
+ * At the moment, this is a simple placeholder as we don't support upgrades
+ * from experimental FSX versions.
+ */
 static svn_error_t *
-upgrade_body(void *baton, apr_pool_t *pool)
+upgrade_body(void *baton,
+             apr_pool_t *scratch_pool)
 {
   struct upgrade_baton_t *upgrade_baton = baton;
   svn_fs_t *fs = upgrade_baton->fs;
   int format, max_files_per_dir;
-  const char *format_path = svn_fs_x__path_format(fs, pool);
+  const char *format_path = svn_fs_x__path_format(fs, scratch_pool);
 
   /* Read the FS format number and max-files-per-dir setting. */
-  SVN_ERR(read_format(&format, &max_files_per_dir, format_path, pool));
+  SVN_ERR(read_format(&format, &max_files_per_dir, format_path,
+                      scratch_pool));
 
   /* If we're already up-to-date, there's nothing else to be done here. */
   if (format == SVN_FS_X__FORMAT_NUMBER)
@@ -615,7 +638,7 @@ svn_fs_x__upgrade(svn_fs_t *fs,
                   void *notify_baton,
                   svn_cancel_func_t cancel_func,
                   void *cancel_baton,
-                  apr_pool_t *pool)
+                  apr_pool_t *scratch_pool)
 {
   struct upgrade_baton_t baton;
   baton.fs = fs;
@@ -624,17 +647,18 @@ svn_fs_x__upgrade(svn_fs_t *fs,
   baton.cancel_func = cancel_func;
   baton.cancel_baton = cancel_baton;
   
-  return svn_fs_x__with_all_locks(fs, upgrade_body, (void *)&baton, pool);
+  return svn_fs_x__with_all_locks(fs, upgrade_body, (void *)&baton,
+                                  scratch_pool);
 }
 
 
 svn_error_t *
 svn_fs_x__youngest_rev(svn_revnum_t *youngest_p,
                        svn_fs_t *fs,
-                       apr_pool_t *pool)
+                       apr_pool_t *scratch_pool)
 {
-  fs_x_data_t *ffd = fs->fsap_data;
-  SVN_ERR(svn_fs_x__read_current(youngest_p, fs, pool));
+  svn_fs_x__data_t *ffd = fs->fsap_data;
+  SVN_ERR(svn_fs_x__read_current(youngest_p, fs, scratch_pool));
   ffd->youngest_rev_cache = *youngest_p;
 
   return SVN_NO_ERROR;
@@ -643,9 +667,9 @@ svn_fs_x__youngest_rev(svn_revnum_t *you
 svn_error_t *
 svn_fs_x__ensure_revision_exists(svn_revnum_t rev,
                                  svn_fs_t *fs,
-                                 apr_pool_t *pool)
+                                 apr_pool_t *scratch_pool)
 {
-  fs_x_data_t *ffd = fs->fsap_data;
+  svn_fs_x__data_t *ffd = fs->fsap_data;
 
   if (! SVN_IS_VALID_REVNUM(rev))
     return svn_error_createf(SVN_ERR_FS_NO_SUCH_REVISION, NULL,
@@ -657,7 +681,7 @@ svn_fs_x__ensure_revision_exists(svn_rev
   if (rev <= ffd->youngest_rev_cache)
     return SVN_NO_ERROR;
 
-  SVN_ERR(svn_fs_x__read_current(&ffd->youngest_rev_cache, fs, pool));
+  SVN_ERR(svn_fs_x__read_current(&ffd->youngest_rev_cache, fs, scratch_pool));
 
   /* Check again. */
   if (rev <= ffd->youngest_rev_cache)
@@ -681,8 +705,7 @@ svn_fs_x__revision_proplist(apr_hash_t *
 
 svn_error_t *
 svn_fs_x__file_length(svn_filesize_t *length,
-                      node_revision_t *noderev,
-                      apr_pool_t *pool)
+                      svn_fs_x__noderev_t *noderev)
 {
   if (noderev->data_rep)
     *length = noderev->data_rep->expanded_size;
@@ -693,8 +716,8 @@ svn_fs_x__file_length(svn_filesize_t *le
 }
 
 svn_boolean_t
-svn_fs_x__file_text_rep_equal(representation_t *a,
-                              representation_t *b)
+svn_fs_x__file_text_rep_equal(svn_fs_x__representation_t *a,
+                              svn_fs_x__representation_t *b)
 {
   svn_boolean_t a_empty = a == NULL || a->expanded_size == 0;
   svn_boolean_t b_empty = b == NULL || b->expanded_size == 0;
@@ -708,7 +731,7 @@ svn_fs_x__file_text_rep_equal(representa
 
   /* Same physical representation?  Note that these IDs are always up-to-date
      instead of e.g. being set lazily. */
-  if (svn_fs_x__id_part_eq(&a->id, &b->id))
+  if (svn_fs_x__id_eq(&a->id, &b->id))
     return TRUE;
 
   /* Contents are equal if the checksums match.  These are also always known.
@@ -720,13 +743,13 @@ svn_fs_x__file_text_rep_equal(representa
 svn_error_t *
 svn_fs_x__prop_rep_equal(svn_boolean_t *equal,
                          svn_fs_t *fs,
-                         node_revision_t *a,
-                         node_revision_t *b,
+                         svn_fs_x__noderev_t *a,
+                         svn_fs_x__noderev_t *b,
                          svn_boolean_t strict,
                          apr_pool_t *scratch_pool)
 {
-  representation_t *rep_a = a->prop_rep;
-  representation_t *rep_b = b->prop_rep;
+  svn_fs_x__representation_t *rep_a = a->prop_rep;
+  svn_fs_x__representation_t *rep_b = b->prop_rep;
   apr_hash_t *proplist_a;
   apr_hash_t *proplist_b;
 
@@ -750,7 +773,7 @@ svn_fs_x__prop_rep_equal(svn_boolean_t *
     }
 
   /* Same path in same txn? */
-  if (svn_fs_x__id_eq(a->id, b->id))
+  if (svn_fs_x__id_eq(&a->noderev_id, &b->noderev_id))
     {
       *equal = TRUE;
       return SVN_NO_ERROR;
@@ -776,9 +799,9 @@ svn_fs_x__prop_rep_equal(svn_boolean_t *
 
 svn_error_t *
 svn_fs_x__file_checksum(svn_checksum_t **checksum,
-                        node_revision_t *noderev,
+                        svn_fs_x__noderev_t *noderev,
                         svn_checksum_kind_t kind,
-                        apr_pool_t *pool)
+                        apr_pool_t *result_pool)
 {
   *checksum = NULL;
 
@@ -804,26 +827,20 @@ svn_fs_x__file_checksum(svn_checksum_t *
             return SVN_NO_ERROR;
         }
 
-      *checksum = svn_checksum_dup(&temp, pool);
+      *checksum = svn_checksum_dup(&temp, result_pool);
     }
 
   return SVN_NO_ERROR;
 }
 
-representation_t *
-svn_fs_x__rep_copy(representation_t *rep,
-                   apr_pool_t *pool)
+svn_fs_x__representation_t *
+svn_fs_x__rep_copy(svn_fs_x__representation_t *rep,
+                   apr_pool_t *result_pool)
 {
-  representation_t *rep_new;
-
   if (rep == NULL)
     return NULL;
 
-  rep_new = apr_palloc(pool, sizeof(*rep_new));
-
-  memcpy(rep_new, rep, sizeof(*rep_new));
-
-  return rep_new;
+  return apr_pmemdup(result_pool, rep, sizeof(*rep));
 }
 
 
@@ -845,41 +862,31 @@ write_revision_zero(svn_fs_t *fs,
   svn_fs_x__revision_file_t *rev_file;
   const char *l2p_proto_index, *p2l_proto_index;
 
-  /* Write a skeleton r0 with no indexes. */
-  SVN_ERR(svn_io_file_create_binary
-              (path_revision_zero,
-               "DELTA\nSVN\1" /* txdelta v1 */
-                 "\0\0\4\2\5" /* sview offset, sview len,
-                                 tview len, instr len, newlen */
-                 "\1\x84"     /* 1 instr byte, new 4 bytes */
-                 "\4END\n"    /* 4 new bytes, E, N, D, \n */
-                 "ENDREP\n"
-               "id: 0+0.0+0.2+0\n"
-               "type: dir\n"
-               "count: 0\n"
-               "text: 0 3 16 4 "
-               "2d2977d1c96f487abe4a1e202dd03b4e\n"
-               "cpath: /\n"
-               "\n\n",
-               0x7b, subpool));
+  /* Construct a skeleton r0 with no indexes. */
+  svn_string_t *noderev_str = svn_string_create("id: 2+0\n"
+                                                "node: 0+0\n"
+                                                "copy: 0+0\n"
+                                                "type: dir\n"
+                                                "count: 0\n"
+                                                "cpath: /\n"
+                                                "\n",
+                                                subpool);
+  svn_string_t *changes_str = svn_string_create("\n",
+                                                subpool);
+  svn_string_t *r0 = svn_string_createf(subpool, "%s%s",
+                                        noderev_str->data,
+                                        changes_str->data);
+
+  /* Write skeleton r0 to disk. */
+  SVN_ERR(svn_io_file_create(path_revision_zero, r0->data, subpool));
 
-  /* Construct the index P2L contents: describe the 3 items we have.
+  /* Construct the index P2L contents: describe the 2 items we have.
      Be sure to create them in on-disk order. */
-  index_entries = apr_array_make(subpool, 3, sizeof(entry));
+  index_entries = apr_array_make(subpool, 2, sizeof(entry));
 
   entry = apr_pcalloc(subpool, sizeof(*entry));
   entry->offset = 0;
-  entry->size = 0x1d;
-  entry->type = SVN_FS_X__ITEM_TYPE_DIR_REP;
-  entry->item_count = 1;
-  entry->items = apr_pcalloc(subpool, sizeof(*entry->items));
-  entry->items[0].change_set = 0;
-  entry->items[0].number = SVN_FS_X__ITEM_INDEX_FIRST_USER;
-  APR_ARRAY_PUSH(index_entries, svn_fs_x__p2l_entry_t *) = entry;
-
-  entry = apr_pcalloc(subpool, sizeof(*entry));
-  entry->offset = 0x1d;
-  entry->size = 0x5d;
+  entry->size = (apr_off_t)noderev_str->len;
   entry->type = SVN_FS_X__ITEM_TYPE_NODEREV;
   entry->item_count = 1;
   entry->items = apr_pcalloc(subpool, sizeof(*entry->items));
@@ -888,8 +895,8 @@ write_revision_zero(svn_fs_t *fs,
   APR_ARRAY_PUSH(index_entries, svn_fs_x__p2l_entry_t *) = entry;
 
   entry = apr_pcalloc(subpool, sizeof(*entry));
-  entry->offset = 0x1d + 0x5d;
-  entry->size = 1;
+  entry->offset = (apr_off_t)noderev_str->len;
+  entry->size = (apr_off_t)changes_str->len;
   entry->type = SVN_FS_X__ITEM_TYPE_CHANGES;
   entry->item_count = 1;
   entry->items = apr_pcalloc(subpool, sizeof(*entry->items));
@@ -926,9 +933,9 @@ svn_fs_x__create_file_tree(svn_fs_t *fs,
                            const char *path,
                            int format,
                            int shard_size,
-                           apr_pool_t *pool)
+                           apr_pool_t *scratch_pool)
 {
-  fs_x_data_t *ffd = fs->fsap_data;
+  svn_fs_x__data_t *ffd = fs->fsap_data;
 
   fs->path = apr_pstrdup(fs->pool, path);
   ffd->format = format;
@@ -937,50 +944,57 @@ svn_fs_x__create_file_tree(svn_fs_t *fs,
   ffd->max_files_per_dir = shard_size;
 
   /* Create the revision data directories. */
-  SVN_ERR(svn_io_make_dir_recursively(svn_fs_x__path_rev_shard(fs, 0, pool),
-                                      pool));
+  SVN_ERR(svn_io_make_dir_recursively(
+                              svn_fs_x__path_rev_shard(fs, 0, scratch_pool),
+                              scratch_pool));
 
   /* Create the revprops directory. */
-  SVN_ERR(svn_io_make_dir_recursively(svn_fs_x__path_revprops_shard(fs, 0,
-                                                                    pool),
-                                      pool));
+  SVN_ERR(svn_io_make_dir_recursively(
+                         svn_fs_x__path_revprops_shard(fs, 0, scratch_pool),
+                         scratch_pool));
 
   /* Create the transaction directory. */
-  SVN_ERR(svn_io_make_dir_recursively(svn_fs_x__path_txns_dir(fs, pool),
-                                      pool));
+  SVN_ERR(svn_io_make_dir_recursively(
+                                  svn_fs_x__path_txns_dir(fs, scratch_pool),
+                                  scratch_pool));
 
   /* Create the protorevs directory. */
-  SVN_ERR(svn_io_make_dir_recursively(svn_fs_x__path_txn_proto_revs(fs, pool),
-                                      pool));
+  SVN_ERR(svn_io_make_dir_recursively(
+                            svn_fs_x__path_txn_proto_revs(fs, scratch_pool),
+                            scratch_pool));
 
   /* Create the 'current' file. */
-  SVN_ERR(svn_io_file_create_empty(svn_fs_x__path_current(fs, pool), pool));
-  SVN_ERR(svn_fs_x__write_current(fs, 0, pool));
+  SVN_ERR(svn_io_file_create_empty(svn_fs_x__path_current(fs, scratch_pool),
+                                   scratch_pool));
+  SVN_ERR(svn_fs_x__write_current(fs, 0, scratch_pool));
 
   /* Create the 'uuid' file. */
-  SVN_ERR(svn_io_file_create_empty(svn_fs_x__path_lock(fs, pool), pool));
-  SVN_ERR(svn_fs_x__set_uuid(fs, NULL, NULL, pool));
+  SVN_ERR(svn_io_file_create_empty(svn_fs_x__path_lock(fs, scratch_pool),
+                                   scratch_pool));
+  SVN_ERR(svn_fs_x__set_uuid(fs, NULL, NULL, scratch_pool));
 
   /* Create the fsfs.conf file. */
-  SVN_ERR(write_config(fs, pool));
-  SVN_ERR(read_config(ffd, fs->path, fs->pool, pool));
+  SVN_ERR(write_config(fs, scratch_pool));
+  SVN_ERR(read_config(ffd, fs->path, fs->pool, scratch_pool));
 
   /* Add revision 0. */
-  SVN_ERR(write_revision_zero(fs, pool));
+  SVN_ERR(write_revision_zero(fs, scratch_pool));
 
   /* Create the min unpacked rev file. */
-  SVN_ERR(svn_io_file_create(svn_fs_x__path_min_unpacked_rev(fs, pool),
-                             "0\n", pool));
+  SVN_ERR(svn_io_file_create(
+                          svn_fs_x__path_min_unpacked_rev(fs, scratch_pool),
+                          "0\n", scratch_pool));
 
   /* Create the txn-current file if the repository supports
      the transaction sequence file. */
-  SVN_ERR(svn_io_file_create(svn_fs_x__path_txn_current(fs, pool),
-                             "0\n", pool));
-  SVN_ERR(svn_io_file_create_empty(svn_fs_x__path_txn_current_lock(fs, pool),
-                                   pool));
+  SVN_ERR(svn_io_file_create(svn_fs_x__path_txn_current(fs, scratch_pool),
+                             "0\n", scratch_pool));
+  SVN_ERR(svn_io_file_create_empty(
+                          svn_fs_x__path_txn_current_lock(fs, scratch_pool),
+                          scratch_pool));
 
   /* Initialize the revprop caching info. */
-  SVN_ERR(svn_fs_x__reset_revprop_generation_file(fs, pool));
+  SVN_ERR(svn_fs_x__reset_revprop_generation_file(fs, scratch_pool));
 
   ffd->youngest_rev_cache = 0;
   return SVN_NO_ERROR;
@@ -989,10 +1003,10 @@ svn_fs_x__create_file_tree(svn_fs_t *fs,
 svn_error_t *
 svn_fs_x__create(svn_fs_t *fs,
                  const char *path,
-                 apr_pool_t *pool)
+                 apr_pool_t *scratch_pool)
 {
   int format = SVN_FS_X__FORMAT_NUMBER;
-  fs_x_data_t *ffd = fs->fsap_data;
+  svn_fs_x__data_t *ffd = fs->fsap_data;
 
   fs->path = apr_pstrdup(fs->pool, path);
   /* See if compatibility with older versions was explicitly requested. */
@@ -1000,7 +1014,7 @@ svn_fs_x__create(svn_fs_t *fs,
     {
       svn_version_t *compatible_version;
       SVN_ERR(svn_fs__compatible_version(&compatible_version, fs->config,
-                                         pool));
+                                         scratch_pool));
 
       /* select format number */
       switch(compatible_version->minor)
@@ -1023,10 +1037,10 @@ svn_fs_x__create(svn_fs_t *fs,
   /* Actual FS creation. */
   SVN_ERR(svn_fs_x__create_file_tree(fs, path, format,
                                      SVN_FS_X_DEFAULT_MAX_FILES_PER_DIR,
-                                     pool));
+                                     scratch_pool));
 
   /* This filesystem is ready.  Stamp it with a format number. */
-  SVN_ERR(svn_fs_x__write_format(fs, FALSE, pool));
+  SVN_ERR(svn_fs_x__write_format(fs, FALSE, scratch_pool));
 
   ffd->youngest_rev_cache = 0;
   return SVN_NO_ERROR;
@@ -1036,17 +1050,17 @@ svn_error_t *
 svn_fs_x__set_uuid(svn_fs_t *fs,
                    const char *uuid,
                    const char *instance_id,
-                   apr_pool_t *pool)
+                   apr_pool_t *scratch_pool)
 {
-  fs_x_data_t *ffd = fs->fsap_data;
-  const char *uuid_path = svn_fs_x__path_uuid(fs, pool);
-  svn_stringbuf_t *contents = svn_stringbuf_create_empty(pool);
+  svn_fs_x__data_t *ffd = fs->fsap_data;
+  const char *uuid_path = svn_fs_x__path_uuid(fs, scratch_pool);
+  svn_stringbuf_t *contents = svn_stringbuf_create_empty(scratch_pool);
 
   if (! uuid)
-    uuid = svn_uuid_generate(pool);
+    uuid = svn_uuid_generate(scratch_pool);
 
   if (! instance_id)
-    instance_id = svn_uuid_generate(pool);
+    instance_id = svn_uuid_generate(scratch_pool);
 
   svn_stringbuf_appendcstr(contents, uuid);
   svn_stringbuf_appendcstr(contents, "\n");
@@ -1056,8 +1070,9 @@ svn_fs_x__set_uuid(svn_fs_t *fs,
   /* We use the permissions of the 'current' file, because the 'uuid'
      file does not exist during repository creation. */
   SVN_ERR(svn_io_write_atomic(uuid_path, contents->data, contents->len,
-                              svn_fs_x__path_current(fs, pool) /* perms */,
-                              pool));
+                              /* perms */
+                              svn_fs_x__path_current(fs, scratch_pool),
+                              scratch_pool));
 
   fs->uuid = apr_pstrdup(fs->pool, uuid);
   ffd->instance_id = apr_pstrdup(fs->pool, instance_id);
@@ -1072,9 +1087,9 @@ svn_fs_x__set_uuid(svn_fs_t *fs,
 svn_error_t *
 svn_fs_x__ensure_dir_exists(const char *path,
                             const char *fs_path,
-                            apr_pool_t *pool)
+                            apr_pool_t *scratch_pool)
 {
-  svn_error_t *err = svn_io_dir_make(path, APR_OS_DEFAULT, pool);
+  svn_error_t *err = svn_io_dir_make(path, APR_OS_DEFAULT, scratch_pool);
   if (err && APR_STATUS_IS_EEXIST(err->apr_err))
     {
       svn_error_clear(err);
@@ -1084,7 +1099,7 @@ svn_fs_x__ensure_dir_exists(const char *
 
   /* We successfully created a new directory.  Dup the permissions
      from FS->path. */
-  return svn_io_copy_perms(fs_path, path, pool);
+  return svn_io_copy_perms(fs_path, path, scratch_pool);
 }
 
 
@@ -1121,12 +1136,13 @@ struct change_rev_prop_baton {
    write lock.  This implements the svn_fs_x__with_write_lock()
    'body' callback type.  BATON is a 'struct change_rev_prop_baton *'. */
 static svn_error_t *
-change_rev_prop_body(void *baton, apr_pool_t *pool)
+change_rev_prop_body(void *baton,
+                     apr_pool_t *scratch_pool)
 {
   struct change_rev_prop_baton *cb = baton;
   apr_hash_t *table;
 
-  SVN_ERR(svn_fs_x__revision_proplist(&table, cb->fs, cb->rev, pool));
+  SVN_ERR(svn_fs_x__revision_proplist(&table, cb->fs, cb->rev, scratch_pool));
 
   if (cb->old_value_p)
     {
@@ -1146,7 +1162,8 @@ change_rev_prop_body(void *baton, apr_po
     }
   svn_hash_sets(table, cb->name, cb->value);
 
-  return svn_fs_x__set_revision_proplist(cb->fs, cb->rev, table, pool);
+  return svn_fs_x__set_revision_proplist(cb->fs, cb->rev, table,
+                                         scratch_pool);
 }
 
 svn_error_t *
@@ -1155,7 +1172,7 @@ svn_fs_x__change_rev_prop(svn_fs_t *fs,
                           const char *name,
                           const svn_string_t *const *old_value_p,
                           const svn_string_t *value,
-                          apr_pool_t *pool)
+                          apr_pool_t *scratch_pool)
 {
   struct change_rev_prop_baton cb;
 
@@ -1167,7 +1184,8 @@ svn_fs_x__change_rev_prop(svn_fs_t *fs,
   cb.old_value_p = old_value_p;
   cb.value = value;
 
-  return svn_fs_x__with_write_lock(fs, change_rev_prop_body, &cb, pool);
+  return svn_fs_x__with_write_lock(fs, change_rev_prop_body, &cb,
+                                   scratch_pool);
 }
 
 
@@ -1178,7 +1196,7 @@ svn_fs_x__info_format(int *fs_format,
                       apr_pool_t *result_pool,
                       apr_pool_t *scratch_pool)
 {
-  fs_x_data_t *ffd = fs->fsap_data;
+  svn_fs_x__data_t *ffd = fs->fsap_data;
   *fs_format = ffd->format;
   *supports_version = apr_palloc(result_pool, sizeof(svn_version_t));
 

Modified: subversion/branches/svn-auth-x509/subversion/libsvn_fs_x/fs_x.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/subversion/libsvn_fs_x/fs_x.h?rev=1652409&r1=1652408&r2=1652409&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/subversion/libsvn_fs_x/fs_x.h (original)
+++ subversion/branches/svn-auth-x509/subversion/libsvn_fs_x/fs_x.h Fri Jan 16 
14:01:35 2015
@@ -28,91 +28,95 @@
 /* Read the 'format' file of fsx filesystem FS and store its info in FS.
  * Use SCRATCH_POOL for temporary allocations. */
 svn_error_t *
-svn_fs_x__read_format_file(svn_fs_t *fs, apr_pool_t *scratch_pool);
+svn_fs_x__read_format_file(svn_fs_t *fs,
+                           apr_pool_t *scratch_pool);
 
 /* Open the fsx filesystem pointed to by PATH and associate it with
-   filesystem object FS.  Use POOL for temporary allocations.
+   filesystem object FS.  Use SCRATCH_POOL for temporary allocations.
 
    ### Some parts of *FS must have been initialized beforehand; some parts
        (including FS->path) are initialized by this function. */
-svn_error_t *svn_fs_x__open(svn_fs_t *fs,
-                            const char *path,
-                            apr_pool_t *pool);
+svn_error_t *
+svn_fs_x__open(svn_fs_t *fs,
+               const char *path,
+               apr_pool_t *scratch_pool);
 
 /* Upgrade the fsx filesystem FS.  Indicate progress via the optional
  * NOTIFY_FUNC callback using NOTIFY_BATON.  The optional CANCEL_FUNC
  * will periodically be called with CANCEL_BATON to allow for preemption.
- * Use POOL for temporary allocations. */
-svn_error_t *svn_fs_x__upgrade(svn_fs_t *fs,
-                               svn_fs_upgrade_notify_t notify_func,
-                               void *notify_baton,
-                               svn_cancel_func_t cancel_func,
-                               void *cancel_baton,
-                               apr_pool_t *pool);
+ * Use SCRATCH_POOL for temporary allocations. */
+svn_error_t *
+svn_fs_x__upgrade(svn_fs_t *fs,
+                  svn_fs_upgrade_notify_t notify_func,
+                  void *notify_baton,
+                  svn_cancel_func_t cancel_func,
+                  void *cancel_baton,
+                  apr_pool_t *scratch_pool);
 
 /* Set *YOUNGEST to the youngest revision in filesystem FS.  Do any
-   temporary allocation in POOL. */
-svn_error_t *svn_fs_x__youngest_rev(svn_revnum_t *youngest,
-                                    svn_fs_t *fs,
-                                    apr_pool_t *pool);
+   temporary allocation in SCRATCH_POOL. */
+svn_error_t *
+svn_fs_x__youngest_rev(svn_revnum_t *youngest,
+                       svn_fs_t *fs,
+                       apr_pool_t *scratch_pool);
 
 /* Return SVN_ERR_FS_NO_SUCH_REVISION if the given revision REV is newer
    than the current youngest revision in FS or is simply not a valid
-   revision number, else return success. */
+   revision number, else return success.  Use SCRATCH_POOL for temporary
+   allocations. */
 svn_error_t *
 svn_fs_x__ensure_revision_exists(svn_revnum_t rev,
                                  svn_fs_t *fs,
-                                 apr_pool_t *pool);
-
-/* Return an error iff REV does not exist in FS. */
-svn_error_t *
-svn_fs_x__revision_exists(svn_revnum_t rev,
-                          svn_fs_t *fs,
-                          apr_pool_t *pool);
+                                 apr_pool_t *scratch_pool);
 
 /* Set *PROPLIST to be an apr_hash_t containing the property list of
    revision REV as seen in filesystem FS.  Use POOL for temporary
    allocations. */
-svn_error_t *svn_fs_x__revision_proplist(apr_hash_t **proplist,
-                                         svn_fs_t *fs,
-                                         svn_revnum_t rev,
-                                         apr_pool_t *pool);
+svn_error_t *
+svn_fs_x__revision_proplist(apr_hash_t **proplist,
+                            svn_fs_t *fs,
+                            svn_revnum_t rev,
+                            apr_pool_t *pool);
 
 /* Set *LENGTH to the be fulltext length of the node revision
-   specified by NODEREV.  Use POOL for temporary allocations. */
-svn_error_t *svn_fs_x__file_length(svn_filesize_t *length,
-                                   node_revision_t *noderev,
-                                   apr_pool_t *pool);
+   specified by NODEREV. */
+svn_error_t *
+svn_fs_x__file_length(svn_filesize_t *length,
+                      svn_fs_x__noderev_t *noderev);
 
 /* Return TRUE if the representations in A and B have equal contents, else
    return FALSE. */
-svn_boolean_t svn_fs_x__file_text_rep_equal(representation_t *a,
-                                            representation_t *b);
+svn_boolean_t
+svn_fs_x__file_text_rep_equal(svn_fs_x__representation_t *a,
+                              svn_fs_x__representation_t *b);
 
 /* Set *EQUAL to TRUE if the property representations in A and B within FS
    have equal contents, else set it to FALSE.  If STRICT is not set, allow
    for false negatives.
    Use SCRATCH_POOL for temporary allocations. */
-svn_error_t *svn_fs_x__prop_rep_equal(svn_boolean_t *equal,
-                                      svn_fs_t *fs,
-                                      node_revision_t *a,
-                                      node_revision_t *b,
-                                      svn_boolean_t strict,
-                                      apr_pool_t *scratch_pool);
+svn_error_t *
+svn_fs_x__prop_rep_equal(svn_boolean_t *equal,
+                         svn_fs_t *fs,
+                         svn_fs_x__noderev_t *a,
+                         svn_fs_x__noderev_t *b,
+                         svn_boolean_t strict,
+                         apr_pool_t *scratch_pool);
 
 
-/* Return a copy of the representation REP allocated from POOL. */
-representation_t *svn_fs_x__rep_copy(representation_t *rep,
-                                     apr_pool_t *pool);
+/* Return a copy of the representation REP allocated from RESULT_POOL. */
+svn_fs_x__representation_t *
+svn_fs_x__rep_copy(svn_fs_x__representation_t *rep,
+                   apr_pool_t *result_pool);
 
 
 /* Return the recorded checksum of type KIND for the text representation
-   of NODREV into CHECKSUM, allocating from POOL.  If no stored checksum is
-   available, put all NULL into CHECKSUM. */
-svn_error_t *svn_fs_x__file_checksum(svn_checksum_t **checksum,
-                                     node_revision_t *noderev,
-                                     svn_checksum_kind_t kind,
-                                     apr_pool_t *pool);
+   of NODREV into CHECKSUM, allocating from RESULT_POOL.  If no stored
+   checksum is available, put all NULL into CHECKSUM. */
+svn_error_t *
+svn_fs_x__file_checksum(svn_checksum_t **checksum,
+                        svn_fs_x__noderev_t *noderev,
+                        svn_checksum_kind_t kind,
+                        apr_pool_t *result_pool);
 
 /* Under the repository db PATH, create a FSFS repository with FORMAT,
  * the given SHARD_SIZE.  If not supported by the respective format,
@@ -122,49 +126,33 @@ svn_error_t *svn_fs_x__file_checksum(svn
  * callers such as hotcopy to modify the contents before turning the
  * tree into an accessible repository.
  *
- * Use POOL for temporary allocations.
+ * Use SCRATCH_POOL for temporary allocations.
  */
 svn_error_t *
 svn_fs_x__create_file_tree(svn_fs_t *fs,
                            const char *path,
                            int format,
                            int shard_size,
-                           apr_pool_t *pool);
+                           apr_pool_t *scratch_pool);
 
 /* Create a fs_x fileysystem referenced by FS at path PATH.  Get any
-   temporary allocations from POOL.
+   temporary allocations from SCRATCH_POOL.
 
    ### Some parts of *FS must have been initialized beforehand; some parts
        (including FS->path) are initialized by this function. */
-svn_error_t *svn_fs_x__create(svn_fs_t *fs,
-                              const char *path,
-                              apr_pool_t *pool);
+svn_error_t *
+svn_fs_x__create(svn_fs_t *fs,
+                 const char *path,
+                 apr_pool_t *scratch_pool);
 
 /* Set the uuid of repository FS to UUID and the instance ID to INSTANCE_ID.
    If any of them is NULL, use a newly generated UUID / ID instead.
-   Perform temporary allocations in POOL. */
-svn_error_t *svn_fs_x__set_uuid(svn_fs_t *fs,
-                                const char *uuid,
-                                const char *instance_id,
-                                apr_pool_t *pool);
-
-/* Set *PATH to the path of REV in FS, whether in a pack file or not.
-   Allocate *PATH in POOL.
-
-   Note: If the caller does not have the write lock on FS, then the path is
-   not guaranteed to be correct or to remain correct after the function
-   returns, because the revision might become packed before or after this
-   call.  If a file exists at that path, then it is correct; if not, then
-   the caller should call update_min_unpacked_rev() and re-try once. */
-const char *
-svn_fs_x__path_rev_absolute(svn_fs_t *fs,
-                            svn_revnum_t rev,
-                            apr_pool_t *pool);
-
-/* Return the path to the 'current' file in FS.
-   Perform allocation in POOL. */
-const char *
-svn_fs_x__path_current(svn_fs_t *fs, apr_pool_t *pool);
+   Perform temporary allocations in SCRATCH_POOL. */
+svn_error_t *
+svn_fs_x__set_uuid(svn_fs_t *fs,
+                   const char *uuid,
+                   const char *instance_id,
+                   apr_pool_t *scratch_pool);
 
 /* Read the format number and maximum number of files per directory
    from PATH and return them in *PFORMAT and *MAX_FILES_PER_DIR
@@ -173,43 +161,50 @@ svn_fs_x__path_current(svn_fs_t *fs, apr
    *MAX_FILES_PER_DIR is obtained from the 'layout' format option, and
    will be set to zero if a linear scheme should be used.
 
-   Use POOL for temporary allocation. */
+   Use SCRATCH_POOL for temporary allocation. */
 svn_error_t *
 svn_fs_x__write_format(svn_fs_t *fs,
                        svn_boolean_t overwrite,
-                       apr_pool_t *pool);
+                       apr_pool_t *scratch_pool);
 
 /* Find the value of the property named PROPNAME in transaction TXN.
    Return the contents in *VALUE_P.  The contents will be allocated
    from POOL. */
-svn_error_t *svn_fs_x__revision_prop(svn_string_t **value_p, svn_fs_t *fs,
-                                     svn_revnum_t rev,
-                                     const char *propname,
-                                     apr_pool_t *pool);
+svn_error_t *
+svn_fs_x__revision_prop(svn_string_t **value_p,
+                        svn_fs_t *fs,
+                        svn_revnum_t rev,
+                        const char *propname,
+                        apr_pool_t *pool);
 
 /* Change, add, or delete a property on a revision REV in filesystem
    FS.  NAME gives the name of the property, and value, if non-NULL,
    gives the new contents of the property.  If value is NULL, then the
-   property will be deleted.  If OLD_VALUE_P is not NULL, do nothing unless the
-   preexisting value is *OLD_VALUE_P.  Do any temporary allocation in POOL.  */
-svn_error_t *svn_fs_x__change_rev_prop(svn_fs_t *fs, svn_revnum_t rev,
-                                       const char *name,
-                                       const svn_string_t *const *old_value_p,
-                                       const svn_string_t *value,
-                                       apr_pool_t *pool);
+   property will be deleted.  If OLD_VALUE_P is not NULL, do nothing unless
+   the preexisting value is *OLD_VALUE_P.
+   Do any temporary allocation in SCRATCH_POOL.  */
+svn_error_t *
+svn_fs_x__change_rev_prop(svn_fs_t *fs,
+                          svn_revnum_t rev,
+                          const char *name,
+                          const svn_string_t *const *old_value_p,
+                          const svn_string_t *value,
+                          apr_pool_t *scratch_pool);
 
 /* If directory PATH does not exist, create it and give it the same
-   permissions as FS_PATH.*/
-svn_error_t *svn_fs_x__ensure_dir_exists(const char *path,
-                                         const char *fs_path,
-                                         apr_pool_t *pool);
+   permissions as FS_PATH.  Do any temporary allocation in SCRATCH_POOL. */
+svn_error_t *
+svn_fs_x__ensure_dir_exists(const char *path,
+                            const char *fs_path,
+                            apr_pool_t *scratch_pool);
 
 /* Initialize all session-local caches in FS according to the global
-   cache settings. Use POOL for temporary allocations.
+   cache settings. Use SCRATCH_POOL for temporary allocations.
 
    Please note that it is permissible for this function to set some
    or all of these caches to NULL, regardless of any setting. */
 svn_error_t *
-svn_fs_x__initialize_caches(svn_fs_t *fs, apr_pool_t *pool);
+svn_fs_x__initialize_caches(svn_fs_t *fs,
+                            apr_pool_t *scratch_pool);
 
 #endif

Modified: subversion/branches/svn-auth-x509/subversion/libsvn_fs_x/hotcopy.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/subversion/libsvn_fs_x/hotcopy.c?rev=1652409&r1=1652408&r2=1652409&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/subversion/libsvn_fs_x/hotcopy.c 
(original)
+++ subversion/branches/svn-auth-x509/subversion/libsvn_fs_x/hotcopy.c Fri Jan 
16 14:01:35 2015
@@ -125,7 +125,7 @@ hotcopy_io_copy_dir_recursively(svn_bool
                                 svn_boolean_t copy_perms,
                                 svn_cancel_func_t cancel_func,
                                 void *cancel_baton,
-                                apr_pool_t *pool)
+                                apr_pool_t *scratch_pool)
 {
   svn_node_kind_t kind;
   apr_status_t status;
@@ -135,10 +135,10 @@ hotcopy_io_copy_dir_recursively(svn_bool
   apr_int32_t flags = APR_FINFO_TYPE | APR_FINFO_NAME;
 
   /* Make a subpool for recursion */
-  apr_pool_t *subpool = svn_pool_create(pool);
+  apr_pool_t *subpool = svn_pool_create(scratch_pool);
 
   /* The 'dst_path' is simply dst_parent/dst_basename */
-  dst_path = svn_dirent_join(dst_parent, dst_basename, pool);
+  dst_path = svn_dirent_join(dst_parent, dst_basename, scratch_pool);
 
   /* Sanity checks:  SRC and DST_PARENT are directories, and
      DST_BASENAME doesn't already exist in DST_PARENT. */
@@ -146,19 +146,20 @@ hotcopy_io_copy_dir_recursively(svn_bool
   if (kind != svn_node_dir)
     return svn_error_createf(SVN_ERR_NODE_UNEXPECTED_KIND, NULL,
                              _("Source '%s' is not a directory"),
-                             svn_dirent_local_style(src, pool));
+                             svn_dirent_local_style(src, scratch_pool));
 
   SVN_ERR(svn_io_check_path(dst_parent, &kind, subpool));
   if (kind != svn_node_dir)
     return svn_error_createf(SVN_ERR_NODE_UNEXPECTED_KIND, NULL,
                              _("Destination '%s' is not a directory"),
-                             svn_dirent_local_style(dst_parent, pool));
+                             svn_dirent_local_style(dst_parent,
+                                                    scratch_pool));
 
   SVN_ERR(svn_io_check_path(dst_path, &kind, subpool));
 
   /* Create the new directory. */
   /* ### TODO: copy permissions (needs apr_file_attrs_get()) */
-  SVN_ERR(svn_io_make_dir_recursively(dst_path, pool));
+  SVN_ERR(svn_io_make_dir_recursively(dst_path, scratch_pool));
 
   /* Loop over the dirents in SRC.  ('.' and '..' are auto-excluded) */
   SVN_ERR(svn_io_dir_open(&this_dir, src, subpool));
@@ -225,12 +226,12 @@ hotcopy_io_copy_dir_recursively(svn_bool
 
   if (! (APR_STATUS_IS_ENOENT(status)))
     return svn_error_wrap_apr(status, _("Can't read directory '%s'"),
-                              svn_dirent_local_style(src, pool));
+                              svn_dirent_local_style(src, scratch_pool));
 
   status = apr_dir_close(this_dir);
   if (status)
     return svn_error_wrap_apr(status, _("Error closing directory '%s'"),
-                              svn_dirent_local_style(src, pool));
+                              svn_dirent_local_style(src, scratch_pool));
 
   /* Free any memory used by recursion */
   svn_pool_destroy(subpool);
@@ -297,7 +298,7 @@ hotcopy_copy_packed_shard(svn_boolean_t
   const char *src_subdir_packed_shard;
   svn_revnum_t revprop_rev;
   apr_pool_t *iterpool;
-  fs_x_data_t *src_ffd = src_fs->fsap_data;
+  svn_fs_x__data_t *src_ffd = src_fs->fsap_data;
 
   /* Copy the packed shard. */
   src_subdir = svn_dirent_join(src_fs->path, PATH_REVS_DIR, scratch_pool);
@@ -366,14 +367,14 @@ hotcopy_copy_packed_shard(svn_boolean_t
 }
 
 /* Remove file PATH, if it exists - even if it is read-only. 
- * Use POOL for temporary allocations. */
+ * Use SCRATCH_POOL for temporary allocations. */
 static svn_error_t *
 hotcopy_remove_file(const char *path,
-                    apr_pool_t *pool)
+                    apr_pool_t *scratch_pool)
 {
   /* Make the rev file writable and remove it. */
-  SVN_ERR(svn_io_set_file_read_write(path, TRUE, pool));
-  SVN_ERR(svn_io_remove_file2(path, TRUE, pool));
+  SVN_ERR(svn_io_set_file_read_write(path, TRUE, scratch_pool));
+  SVN_ERR(svn_io_remove_file2(path, TRUE, scratch_pool));
 
   return SVN_NO_ERROR;
 }
@@ -474,11 +475,10 @@ hotcopy_remove_revprop_files(svn_fs_t *d
  * hotcopy from SRC_FS. */
 static svn_error_t *
 hotcopy_incremental_check_preconditions(svn_fs_t *src_fs,
-                                        svn_fs_t *dst_fs,
-                                        apr_pool_t *pool)
+                                        svn_fs_t *dst_fs)
 {
-  fs_x_data_t *src_ffd = src_fs->fsap_data;
-  fs_x_data_t *dst_ffd = dst_fs->fsap_data;
+  svn_fs_x__data_t *src_ffd = src_fs->fsap_data;
+  svn_fs_x__data_t *dst_ffd = dst_fs->fsap_data;
 
   /* We only support incremental hotcopy between the same format. */
   if (src_ffd->format != dst_ffd->format)
@@ -508,16 +508,17 @@ hotcopy_incremental_check_preconditions(
 
 /* Remove folder PATH.  Ignore errors due to the sub-tree not being empty.
  * CANCEL_FUNC and CANCEL_BATON do the usual thing.
- * Use POOL for temporary allocations.
+ * Use SCRATCH_POOL for temporary allocations.
  */
 static svn_error_t *
 remove_folder(const char *path,
               svn_cancel_func_t cancel_func,
               void *cancel_baton,
-              apr_pool_t *pool)
+              apr_pool_t *scratch_pool)
 {
   svn_error_t *err = svn_io_remove_dir2(path, TRUE,
-                                        cancel_func, cancel_baton, pool);
+                                        cancel_func, cancel_baton,
+                                        scratch_pool);
 
   if (err && APR_STATUS_IS_ENOTEMPTY(err->apr_err))
     {
@@ -534,7 +535,7 @@ remove_folder(const char *path,
  * for every shard by updating the 'current' file if necessary.  Assume
  * the >= SVN_FS_FS__MIN_NO_GLOBAL_IDS_FORMAT filesystem format without
  * global next-ID counters.  Indicate progress via the optional NOTIFY_FUNC
- * callback using NOTIFY_BATON.  Use POOL for temporary allocations.
+ * callback using NOTIFY_BATON.  Use SCRATCH_POOL for temporary allocations.
  */
 static svn_error_t *
 hotcopy_revisions(svn_fs_t *src_fs,
@@ -550,9 +551,9 @@ hotcopy_revisions(svn_fs_t *src_fs,
                   void* notify_baton,
                   svn_cancel_func_t cancel_func,
                   void* cancel_baton,
-                  apr_pool_t *pool)
+                  apr_pool_t *scratch_pool)
 {
-  fs_x_data_t *src_ffd = src_fs->fsap_data;
+  svn_fs_x__data_t *src_ffd = src_fs->fsap_data;
   int max_files_per_dir = src_ffd->max_files_per_dir;
   svn_revnum_t src_min_unpacked_rev;
   svn_revnum_t dst_min_unpacked_rev;
@@ -561,9 +562,9 @@ hotcopy_revisions(svn_fs_t *src_fs,
 
   /* Copy the min unpacked rev, and read its value. */
   SVN_ERR(svn_fs_x__read_min_unpacked_rev(&src_min_unpacked_rev, src_fs,
-                                          pool));
+                                          scratch_pool));
   SVN_ERR(svn_fs_x__read_min_unpacked_rev(&dst_min_unpacked_rev, dst_fs,
-                                          pool));
+                                          scratch_pool));
 
   /* We only support packs coming from the hotcopy source.
     * The destination should not be packed independently from
@@ -578,7 +579,7 @@ hotcopy_revisions(svn_fs_t *src_fs,
                              src_min_unpacked_rev - 1);
 
   SVN_ERR(svn_io_dir_file_copy(src_fs->path, dst_fs->path,
-                               PATH_MIN_UNPACKED_REV, pool));
+                               PATH_MIN_UNPACKED_REV, scratch_pool));
 
   if (cancel_func)
     SVN_ERR(cancel_func(cancel_baton));
@@ -587,7 +588,7 @@ hotcopy_revisions(svn_fs_t *src_fs,
    * Copy the necessary rev files.
    */
 
-  iterpool = svn_pool_create(pool);
+  iterpool = svn_pool_create(scratch_pool);
   /* First, copy packed shards. */
   for (rev = 0; rev < src_min_unpacked_rev; rev += max_files_per_dir)
     {
@@ -738,7 +739,8 @@ struct hotcopy_body_baton {
  * write-lock is held.
  */
 static svn_error_t *
-hotcopy_body(void *baton, apr_pool_t *pool)
+hotcopy_body(void *baton,
+             apr_pool_t *scratch_pool)
 {
   struct hotcopy_body_baton *hbb = baton;
   svn_fs_t *src_fs = hbb->src_fs;
@@ -765,7 +767,7 @@ hotcopy_body(void *baton, apr_pool_t *po
    * ### an error from this function, and that renders the hotcopy
    * ### unusable anyway. */
   SVN_ERR(svn_io_dir_file_copy(src_fs->path, dst_fs->path, PATH_CONFIG,
-                               pool));
+                               scratch_pool));
 
   if (cancel_func)
     SVN_ERR(cancel_func(cancel_baton));
@@ -775,10 +777,10 @@ hotcopy_body(void *baton, apr_pool_t *po
    * of revisions than the destination.
    * This also catches the case where users accidentally swap the
    * source and destination arguments. */
-  SVN_ERR(svn_fs_x__read_current(&src_youngest, src_fs, pool));
+  SVN_ERR(svn_fs_x__read_current(&src_youngest, src_fs, scratch_pool));
   if (incremental)
     {
-      SVN_ERR(svn_fs_x__youngest_rev(&dst_youngest, dst_fs, pool));
+      SVN_ERR(svn_fs_x__youngest_rev(&dst_youngest, dst_fs, scratch_pool));
       if (src_youngest < dst_youngest)
         return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
                  _("The hotcopy destination already contains more revisions "
@@ -789,15 +791,17 @@ hotcopy_body(void *baton, apr_pool_t *po
   else
     dst_youngest = 0;
 
-  src_revs_dir = svn_dirent_join(src_fs->path, PATH_REVS_DIR, pool);
-  dst_revs_dir = svn_dirent_join(dst_fs->path, PATH_REVS_DIR, pool);
-  src_revprops_dir = svn_dirent_join(src_fs->path, PATH_REVPROPS_DIR, pool);
-  dst_revprops_dir = svn_dirent_join(dst_fs->path, PATH_REVPROPS_DIR, pool);
+  src_revs_dir = svn_dirent_join(src_fs->path, PATH_REVS_DIR, scratch_pool);
+  dst_revs_dir = svn_dirent_join(dst_fs->path, PATH_REVS_DIR, scratch_pool);
+  src_revprops_dir = svn_dirent_join(src_fs->path, PATH_REVPROPS_DIR,
+                                     scratch_pool);
+  dst_revprops_dir = svn_dirent_join(dst_fs->path, PATH_REVPROPS_DIR,
+                                     scratch_pool);
 
   /* Ensure that the required folders exist in the destination
    * before actually copying the revisions and revprops. */
-  SVN_ERR(svn_io_make_dir_recursively(dst_revs_dir, pool));
-  SVN_ERR(svn_io_make_dir_recursively(dst_revprops_dir, pool));
+  SVN_ERR(svn_io_make_dir_recursively(dst_revs_dir, scratch_pool));
+  SVN_ERR(svn_io_make_dir_recursively(dst_revprops_dir, scratch_pool));
 
   if (cancel_func)
     SVN_ERR(cancel_func(cancel_baton));
@@ -810,30 +814,33 @@ hotcopy_body(void *baton, apr_pool_t *po
                             incremental, src_revs_dir, dst_revs_dir,
                             src_revprops_dir, dst_revprops_dir,
                             notify_func, notify_baton,
-                            cancel_func, cancel_baton, pool));
-  SVN_ERR(svn_fs_x__write_current(dst_fs, src_youngest, pool));
+                            cancel_func, cancel_baton, scratch_pool));
+  SVN_ERR(svn_fs_x__write_current(dst_fs, src_youngest, scratch_pool));
 
   /* Replace the locks tree.
    * This is racy in case readers are currently trying to list locks in
    * the destination. However, we need to get rid of stale locks.
    * This is the simplest way of doing this, so we accept this small race. */
-  dst_subdir = svn_dirent_join(dst_fs->path, PATH_LOCKS_DIR, pool);
+  dst_subdir = svn_dirent_join(dst_fs->path, PATH_LOCKS_DIR, scratch_pool);
   SVN_ERR(svn_io_remove_dir2(dst_subdir, TRUE, cancel_func, cancel_baton,
-                             pool));
-  src_subdir = svn_dirent_join(src_fs->path, PATH_LOCKS_DIR, pool);
-  SVN_ERR(svn_io_check_path(src_subdir, &kind, pool));
+                             scratch_pool));
+  src_subdir = svn_dirent_join(src_fs->path, PATH_LOCKS_DIR, scratch_pool);
+  SVN_ERR(svn_io_check_path(src_subdir, &kind, scratch_pool));
   if (kind == svn_node_dir)
     SVN_ERR(svn_io_copy_dir_recursively(src_subdir, dst_fs->path,
                                         PATH_LOCKS_DIR, TRUE,
-                                        cancel_func, cancel_baton, pool));
+                                        cancel_func, cancel_baton,
+                                        scratch_pool));
 
   /* Now copy the node-origins cache tree. */
-  src_subdir = svn_dirent_join(src_fs->path, PATH_NODE_ORIGINS_DIR, pool);
-  SVN_ERR(svn_io_check_path(src_subdir, &kind, pool));
+  src_subdir = svn_dirent_join(src_fs->path, PATH_NODE_ORIGINS_DIR,
+                               scratch_pool);
+  SVN_ERR(svn_io_check_path(src_subdir, &kind, scratch_pool));
   if (kind == svn_node_dir)
     SVN_ERR(hotcopy_io_copy_dir_recursively(NULL, src_subdir, dst_fs->path,
                                             PATH_NODE_ORIGINS_DIR, TRUE,
-                                            cancel_func, cancel_baton, pool));
+                                            cancel_func, cancel_baton,
+                                            scratch_pool));
 
   /*
    * NB: Data copied below is only read by writers, not readers.
@@ -842,32 +849,27 @@ hotcopy_body(void *baton, apr_pool_t *po
 
   /* Copy the rep cache and then remove entries for revisions
    * younger than the destination's youngest revision. */
-  src_subdir = svn_dirent_join(src_fs->path, REP_CACHE_DB_NAME, pool);
-  dst_subdir = svn_dirent_join(dst_fs->path, REP_CACHE_DB_NAME, pool);
-  SVN_ERR(svn_io_check_path(src_subdir, &kind, pool));
+  src_subdir = svn_dirent_join(src_fs->path, REP_CACHE_DB_NAME, scratch_pool);
+  dst_subdir = svn_dirent_join(dst_fs->path, REP_CACHE_DB_NAME, scratch_pool);
+  SVN_ERR(svn_io_check_path(src_subdir, &kind, scratch_pool));
   if (kind == svn_node_file)
     {
       /* Copy the rep cache and then remove entries for revisions
        * that did not make it into the destination. */
-      src_subdir = svn_dirent_join(src_fs->path, REP_CACHE_DB_NAME, pool);
-      dst_subdir = svn_dirent_join(dst_fs->path, REP_CACHE_DB_NAME, pool);
-      SVN_ERR(svn_io_check_path(src_subdir, &kind, pool));
-      if (kind == svn_node_file)
-        {
-          SVN_ERR(svn_sqlite__hotcopy(src_subdir, dst_subdir, pool));
-          SVN_ERR(svn_fs_x__del_rep_reference(dst_fs, src_youngest, pool));
-        }
+      SVN_ERR(svn_sqlite__hotcopy(src_subdir, dst_subdir, scratch_pool));
+      SVN_ERR(svn_fs_x__del_rep_reference(dst_fs, src_youngest,
+                                          scratch_pool));
     }
 
   /* Copy the txn-current file. */
   SVN_ERR(svn_io_dir_file_copy(src_fs->path, dst_fs->path,
-                                PATH_TXN_CURRENT, pool));
+                                PATH_TXN_CURRENT, scratch_pool));
 
   /* If a revprop generation file exists in the source filesystem,
    * reset it to zero (since this is on a different path, it will not
    * overlap with data already in cache).  Also, clean up stale files
    * used for the named atomics implementation. */
-  SVN_ERR(svn_fs_x__reset_revprop_generation_file(dst_fs, pool));
+  SVN_ERR(svn_fs_x__reset_revprop_generation_file(dst_fs, scratch_pool));
 
   return SVN_NO_ERROR;
 }
@@ -876,12 +878,13 @@ hotcopy_body(void *baton, apr_pool_t *po
  * locks.
  */
 static svn_error_t *
-hotcopy_locking_src_body(void *baton, apr_pool_t *pool)
+hotcopy_locking_src_body(void *baton,
+                         apr_pool_t *scratch_pool)
 {
   struct hotcopy_body_baton *hbb = baton;
 
   return svn_error_trace(svn_fs_x__with_pack_lock(hbb->src_fs, hotcopy_body,
-                                                  baton, pool));
+                                                  baton, scratch_pool));
 }
 
 /* Create an empty filesystem at DST_FS at DST_PATH with the same
@@ -891,27 +894,30 @@ static svn_error_t *
 hotcopy_create_empty_dest(svn_fs_t *src_fs,
                           svn_fs_t *dst_fs,
                           const char *dst_path,
-                          apr_pool_t *pool)
+                          apr_pool_t *scratch_pool)
 {
-  fs_x_data_t *src_ffd = src_fs->fsap_data;
+  svn_fs_x__data_t *src_ffd = src_fs->fsap_data;
 
   /* Create the DST_FS repository with the same layout as SRC_FS. */
   SVN_ERR(svn_fs_x__create_file_tree(dst_fs, dst_path, src_ffd->format,
-                                     src_ffd->max_files_per_dir, pool));
+                                     src_ffd->max_files_per_dir,
+                                     scratch_pool));
 
   /* Copy the UUID.  Hotcopy destination receives a new instance ID, but
    * has the same filesystem UUID as the source. */
-  SVN_ERR(svn_fs_x__set_uuid(dst_fs, src_fs->uuid, NULL, pool));
+  SVN_ERR(svn_fs_x__set_uuid(dst_fs, src_fs->uuid, NULL, scratch_pool));
 
   /* Remove revision 0 contents.  Otherwise, it may not get overwritten
    * due to having a newer timestamp. */
-  SVN_ERR(hotcopy_remove_file(svn_fs_x__path_rev(dst_fs, 0, pool), pool));
-  SVN_ERR(hotcopy_remove_file(svn_fs_x__path_revprops(dst_fs, 0, pool),
-                              pool));
+  SVN_ERR(hotcopy_remove_file(svn_fs_x__path_rev(dst_fs, 0, scratch_pool),
+                              scratch_pool));
+  SVN_ERR(hotcopy_remove_file(svn_fs_x__path_revprops(dst_fs, 0,
+                                                      scratch_pool),
+                              scratch_pool));
 
   /* This filesystem is ready.  Stamp it with a format number.  Fail if
    * the 'format' file should already exist. */
-  SVN_ERR(svn_fs_x__write_format(dst_fs, FALSE, pool));
+  SVN_ERR(svn_fs_x__write_format(dst_fs, FALSE, scratch_pool));
 
   return SVN_NO_ERROR;
 }
@@ -921,7 +927,7 @@ svn_fs_x__hotcopy_prepare_target(svn_fs_
                                  svn_fs_t *dst_fs,
                                  const char *dst_path,
                                  svn_boolean_t incremental,
-                                 apr_pool_t *pool)
+                                 apr_pool_t *scratch_pool)
 {
   if (incremental)
     {
@@ -930,27 +936,30 @@ svn_fs_x__hotcopy_prepare_target(svn_fs_
 
       /* Check destination format to be sure we know how to incrementally
        * hotcopy to the destination FS. */
-      dst_format_abspath = svn_dirent_join(dst_path, PATH_FORMAT, pool);
-      SVN_ERR(svn_io_check_path(dst_format_abspath, &dst_format_kind, pool));
+      dst_format_abspath = svn_dirent_join(dst_path, PATH_FORMAT,
+                                           scratch_pool);
+      SVN_ERR(svn_io_check_path(dst_format_abspath, &dst_format_kind,
+                                scratch_pool));
       if (dst_format_kind == svn_node_none)
         {
           /* Destination doesn't exist yet. Perform a normal hotcopy to a
            * empty destination using the same configuration as the source. */
-          SVN_ERR(hotcopy_create_empty_dest(src_fs, dst_fs, dst_path, pool));
+          SVN_ERR(hotcopy_create_empty_dest(src_fs, dst_fs, dst_path,
+                                            scratch_pool));
         }
       else
         {
           /* Check the existing repository. */
-          SVN_ERR(svn_fs_x__open(dst_fs, dst_path, pool));
-          SVN_ERR(hotcopy_incremental_check_preconditions(src_fs, dst_fs,
-                                                          pool));
+          SVN_ERR(svn_fs_x__open(dst_fs, dst_path, scratch_pool));
+          SVN_ERR(hotcopy_incremental_check_preconditions(src_fs, dst_fs));
         }
     }
   else
     {
       /* Start out with an empty destination using the same configuration
        * as the source. */
-      SVN_ERR(hotcopy_create_empty_dest(src_fs, dst_fs, dst_path, pool));
+      SVN_ERR(hotcopy_create_empty_dest(src_fs, dst_fs, dst_path,
+                                        scratch_pool));
     }
 
   return SVN_NO_ERROR;
@@ -964,7 +973,7 @@ svn_fs_x__hotcopy(svn_fs_t *src_fs,
                   void *notify_baton,
                   svn_cancel_func_t cancel_func,
                   void *cancel_baton,
-                  apr_pool_t *pool)
+                  apr_pool_t *scratch_pool)
 {
   struct hotcopy_body_baton hbb;
 
@@ -976,7 +985,7 @@ svn_fs_x__hotcopy(svn_fs_t *src_fs,
   hbb.cancel_func = cancel_func;
   hbb.cancel_baton = cancel_baton;
   SVN_ERR(svn_fs_x__with_all_locks(dst_fs, hotcopy_locking_src_body, &hbb,
-                                   pool));
+                                   scratch_pool));
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/svn-auth-x509/subversion/libsvn_fs_x/hotcopy.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/subversion/libsvn_fs_x/hotcopy.h?rev=1652409&r1=1652408&r2=1652409&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/subversion/libsvn_fs_x/hotcopy.h 
(original)
+++ subversion/branches/svn-auth-x509/subversion/libsvn_fs_x/hotcopy.h Fri Jan 
16 14:01:35 2015
@@ -27,25 +27,27 @@
 
 /* Create an empty copy of the fsfs filesystem SRC_FS into a new DST_FS at
  * DST_PATH.  If INCREMENTAL is TRUE, perform a few pre-checks only if
- * a repo already exists at DST_PATH. Use POOL for temporary allocations. */
+ * a repo already exists at DST_PATH.
+ * Use SCRATCH_POOL for temporary allocations. */
 svn_error_t *
 svn_fs_x__hotcopy_prepare_target(svn_fs_t *src_fs,
                                  svn_fs_t *dst_fs,
                                  const char *dst_path,
                                  svn_boolean_t incremental,
-                                 apr_pool_t *pool);
+                                 apr_pool_t *scratch_pool);
 
 /* Copy the fsfs filesystem SRC_FS into DST_FS. If INCREMENTAL is TRUE, do
  * not re-copy data which already exists in DST_FS.  Indicate progress via
- * the optional NOTIFY_FUNC callback using NOTIFY_BATON.  Use POOL for
- * temporary allocations. */
-svn_error_t * svn_fs_x__hotcopy(svn_fs_t *src_fs,
-                                svn_fs_t *dst_fs,
-                                svn_boolean_t incremental,
-                                svn_fs_hotcopy_notify_t notify_func,
-                                void *notify_baton,
-                                svn_cancel_func_t cancel_func,
-                                void *cancel_baton,
-                                apr_pool_t *pool);
+ * the optional NOTIFY_FUNC callback using NOTIFY_BATON.
+ * Use SCRATCH_POOL for temporary allocations. */
+svn_error_t * 
+svn_fs_x__hotcopy(svn_fs_t *src_fs,
+                  svn_fs_t *dst_fs,
+                  svn_boolean_t incremental,
+                  svn_fs_hotcopy_notify_t notify_func,
+                  void *notify_baton,
+                  svn_cancel_func_t cancel_func,
+                  void *cancel_baton,
+                  apr_pool_t *scratch_pool);
 
 #endif


Reply via email to