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

svn commit: r1567023 [1/2] - in /subversion/trunk/subversion/libsvn_fs_x: cached_data.c changes.c dag.c dag.h fs.h id.c id.h index.c index.h low_level.c noderevs.c reps.c transaction.c transaction.h tree.c util.c util.h verify.c

Author: stefan2
Date: Tue Feb 11 10:09:57 2014
New Revision: 1567023

URL: http://svn.apache.org/r1567023
Log:
For TXN IDs in FSX, use a single integer instead of a two-part struct.
This allows for packing the TXN ID into the same struct that holds
the revision info for committed data.

Most of this commit is code churn replacing (pointers to) structs with
the new integer value.  Similarly, NULL values cannot be used anymore
and must be replaced by the new SVN_FS_X__INVALID_TXN_ID constant.

* subversion/libsvn_fs_x/id.h
  (svn_fs_x__txn_id_t): Define the new data type for TXN IDs. 
  (SVN_FS_X__INVALID_TXN_ID): Define the corresponding NULL constant.
  (svn_fs_x__id_txn_parse,
   svn_fs_x__id_txn_unparse): Drop.  These will be replaced by new
                              private API functions in utils.h
  (svn_fs_x__id_txn_used,
   svn_fs_x__id_txn_reset, 
   svn_fs_x__txn_id_t svn_fs_x__id_txn_id,
   svn_fs_x__id_txn_create_root,
   svn_fs_x__id_txn_create): Switch TXN_ID type in these APIs
                             from struct to integer type.

* subversion/libsvn_fs_x/id.c
  (fs_x__id_t): Use the new data type to store the TXN_ID member.
  (txn_id_parse): Simplify calling the new utils API function.
  (svn_fs_x__id_txn_used,
   svn_fs_x__id_txn_reset): Update function signature and "no value" handling.
  (svn_fs_x__id_txn_parse,
   svn_fs_x__id_txn_unparse): Drop.
  (svn_fs_x__id_txn_id,
   svn_fs_x__id_is_txn): Update function signatures and TXN_ID references. 
  (svn_fs_x__id_unparse): Update serializer to write the TXN_ID as a single
                          value instead of a value pair.
  (svn_fs_x__id_eq): The struct has become smaller. 
  (svn_fs_x__id_check_related): TXN_ID-based checks are now simple.
  (svn_fs_x__id_txn_create_root,
   svn_fs_id_t *svn_fs_x__id_create_root): Update function signatures and
                                           TXN_ID references.

  (svn_fs_x__id_create_root,
   svn_fs_x__id_rev_create,
   svn_fs_x__id_parse): Update TXN_ID references and "no value" handling.


* subversion/libsvn_fs_x/util.h
  (svn_fs_x__txn_name,
   svn_fs_x__txn_by_name): Declare new utility API functions that
                           convert TXN IDs from / to string.
  (svn_fs_x__path_txn_dir,
   svn_fs_x__path_txn_sha1,
   svn_fs_x__path_txn_changes,
   svn_fs_x__path_l2p_proto_index,
   svn_fs_x__path_p2l_proto_index,
   svn_fs_x__path_txn_props,
   svn_fs_x__path_txn_props_final,
   svn_fs_x__path_txn_next_ids,
   svn_fs_x__path_txn_item_index,
   svn_fs_x__path_txn_proto_rev,
   svn_fs_x__path_txn_proto_rev_lock): Switch TXN_ID type in these APIs
                                       from struct to integer type.

* subversion/libsvn_fs_x/util.c
  (svn_fs_x__txn_name,
   svn_fs_x__txn_by_name): Implement these new conversion functions using
                           out base36 converters.
  (combine_txn_id_string): Call the new TXN_ID -> string conversion API.
  (svn_fs_x__path_txn_dir,
   svn_fs_x__path_txn_sha1,
   svn_fs_x__path_txn_changes,
   svn_fs_x__path_l2p_proto_index,
   svn_fs_x__path_p2l_proto_index,
   svn_fs_x__path_txn_props,
   svn_fs_x__path_txn_props_final,
   svn_fs_x__path_txn_next_ids,
   svn_fs_x__path_txn_item_index,
   svn_fs_x__path_txn_proto_rev,
   svn_fs_x__path_txn_proto_rev_lock): Switch TXN_ID types in function
                                       signatures.

* subversion/libsvn_fs_x/cached_data.c
  (open_and_seek_revision,
   open_and_seek_transaction,
   open_and_seek_representation,
   get_node_revision_body,
   svn_fs_x__get_mergeinfo_count,
   create_rep_state_body,
   build_rep_list,
   auto_set_start_offset,
   get_dir_contents,
   svn_fs_x__get_proplist,
   svn_fs_x__get_changes,
   block_read): Update function callers to use numbers instead of
                pointers for txn_ids.

* subversion/libsvn_fs_x/verify.c
  (compare_l2p_to_p2l_index,
   compare_p2l_to_l2p_index): Ditto.

* subversion/libsvn_fs_x/changes.c
  (binary_change_t): Document mapping of TXN_IDs onto ID part structs.
  (append_change,
   svn_fs_x__changes_get_list,
   svn_fs_x__changes_get_list_func): Change storage and retrieval of
                                     TXN IDs accordingly.

* subversion/libsvn_fs_x/dag.h
  (svn_fs_x__dag_set_entry,
   svn_fs_x__dag_txn_root,
   svn_fs_x__dag_txn_base_root,
   svn_fs_x__dag_clone_child,
   svn_fs_x__dag_clone_root,
   svn_fs_x__dag_delete,
   svn_fs_x__dag_make_file,
   svn_fs_x__dag_make_dir,
   svn_fs_x__dag_copy):
   svn_fs_x__path_txn_proto_rev_lock): Switch TXN_ID type in these APIs
                                       from struct to integer type.
* subversion/libsvn_fs_x/dag.c
  (set_entry,
   make_entry,
   svn_fs_x__dag_set_entry,
   svn_fs_x__dag_txn_root,
   svn_fs_x__dag_txn_base_root,
   svn_fs_x__dag_clone_child,
   svn_fs_x__dag_clone_root,
   svn_fs_x__dag_delete,
   svn_fs_x__dag_make_file,
   svn_fs_x__dag_make_dir,
   svn_fs_x__dag_copy):
   svn_fs_x__path_txn_proto_rev_lock): Switch TXN_ID types in function
                                       signatures; they are all pass-
                                       through values.

* subversion/libsvn_fs_x/fs.h
  (fs_x_shared_txn_data_t,
   representation_t): Use the new TXN_ID type instead of the old structs.

* subversion/libsvn_fs_x/index.h
  (svn_fs_x__item_offset): Switch TXN_ID type from struct to integer type.
 
* subversion/libsvn_fs_x/index.c
  (l2p_proto_index_lookup): Switch TXN_ID type in function signature; it is
                            a simple pass-through value.
  (svn_fs_x__item_offset): Switch TXN_ID type in function signature and
                           update "no value" handling.

* subversion/libsvn_fs_x/low_level.c
  (svn_fs_x__parse_representation,
   read_rep_offsets,
   svn_fs_x__unparse_representation,
   svn_fs_x__unparse_representation): Adapt to TXN ID API changes.

* subversion/libsvn_fs_x/noderevs.c
  (shared_representation_t): Use the new data type for the TXN ID member.
  (svn_fs_x__write_noderevs_container,
   svn_fs_x__read_noderevs_container): Simplify as we only need to write
                                       and read single values instead of
                                       structs for TXN IDs.
 
* subversion/libsvn_fs_x/transaction.h
  (svn_fs_x__txn_get_id,
   svn_fs_x__txn_changes_fetch,
   svn_fs_x__get_txn,
   svn_fs_x__reserve_copy_id,
   svn_fs_x__create_node,
   svn_fs_x__set_entry,
   svn_fs_x__add_change,
   svn_fs_x__create_successor,
   svn_fs_x__get_txn_ids): Switch TXN_ID type from struct to integer type.

* subversion/libsvn_fs_x/transaction.c
  (fs_txn_data_t): Use the new data type for the TXN ID member.
  (svn_fs_x__txn_get_id): Update signature and TXN_ID reference.
  (get_shared_txn,
   free_shared_txn): Update signature, TXN_ID references and comparison.

  (unlock_proto_rev_baton): Use the new data type for the TXN ID member.
  (unlock_proto_rev_body): Update references to TXN_ID and use the new
                           utlis API to convert TXN_IDs into strings.
  (unlock_proto_rev,
   unlock_proto_rev_list_locked): Update signature and TXN_ID reference.

  (get_writable_proto_rev_baton): Use the new data type for the TXN ID member.
  (get_writable_proto_rev_body): Update references to TXN_ID and use the new
                                 utlis API to convert TXN_IDs into strings.
  (get_writable_proto_rev): Update signature and TXN_ID reference.

  (purge_shared_txn_body,
   purge_shared_txn): Switch baton from struct to pointer the new TXN_ID.

  (store_sha1_rep_mapping):  Update TXN_ID reference.
  (svn_fs_x__txn_changes_fetch,
   create_new_txn_noderev_from_rev): Update signatures.
  (create_txn_dir): Update signatures as well as TXN_ID references and
                    use the new utlis API to convert a TXN_ID into string.
  (svn_fs_x__create_txn): Update TXN_ID references.
  (get_txn_proplist): Use new TXN_ID type in signature and update
                      TXN_ID value check.
  (change_txn_props): Update TXN_ID references.
  (svn_fs_x__get_txn,
   write_next_ids,
   read_next_ids,
   get_new_txn_node_id,
   svn_fs_x__reserve_copy_id,
   svn_fs_x__create_node): Use new TXN_ID type in signature - pass-through
                           parameters only. 

  (svn_fs_x__purge_txn): Update TXN_ID references and types and use the new
                         utlis API to convert TXN_IDs into strings.
  (set_uniquifier): Update TXN_ID reference.
  (svn_fs_x__set_entry): Update signature and TXN_ID references.
  (svn_fs_x__add_change,
   store_l2p_index_entry,
   store_p2l_index_entry,
   allocate_item_index,
   svn_fs_x__create_successor,
   write_hash_delta_rep): Use new TXN_ID type in signature --
                          they are pass-through parameters only.
  (get_shared_rep,
   rep_write_contents_close,
   svn_fs_x__set_proplist): Update TXN_ID references.
  (write_hash_delta_rep): Use new TXN_ID type in signature --
                          they are pass-through parameters only
  (write_final_rev): Use the new TXN_ID type internally and udapte
                     all TXN_ID references.
  (write_final_changed_path_info,
   verify_locks): Use new TXN_ID type in signature.
  (verify_moves): Switch the signature to using the full TXN object
                  and get the base revision from that since TXN_IDs
                  don't provide this info anymore.
  (write_final_revprop): Use new TXN_ID type in signature and adapt
                         to signature changes in called functions.
  (svn_fs_x__open_txn,
   svn_fs_x__delete_node_revision): Update references to TXN_IDs.
  (svn_fs_x__get_txn_ids): Use new TXN_ID type in signature.

* subversion/libsvn_fs_x/tree.c
  (fs_txn_root_data_t): Use the new data type for the TXN_ID member.
  (make_txn_root): Use new TXN_ID type in signature.
  (svn_fs_x__txn_id_t): Same and update TXN_ID reference.

  (add_change,
   merge): Use new TXN_ID type in signature.
  (make_path_mutable,
   x_change_node_prop,
   x_make_dir,
   x_delete_node): Use the correct TXN_ID type internally.
  (copy_helper): Same and use the root objects to access the TXN
                 base revision because the TXN_ID does no longer
                 provide that information.
  (x_make_file,
   apply_textdelta,
   apply_text): Use the correct TXN_ID type internally.
  (make_txn_root): Update TXN_ID type in signature, update TXN_ID
                   references and call the new string conversion API.

Modified:
    subversion/trunk/subversion/libsvn_fs_x/cached_data.c
    subversion/trunk/subversion/libsvn_fs_x/changes.c
    subversion/trunk/subversion/libsvn_fs_x/dag.c
    subversion/trunk/subversion/libsvn_fs_x/dag.h
    subversion/trunk/subversion/libsvn_fs_x/fs.h
    subversion/trunk/subversion/libsvn_fs_x/id.c
    subversion/trunk/subversion/libsvn_fs_x/id.h
    subversion/trunk/subversion/libsvn_fs_x/index.c
    subversion/trunk/subversion/libsvn_fs_x/index.h
    subversion/trunk/subversion/libsvn_fs_x/low_level.c
    subversion/trunk/subversion/libsvn_fs_x/noderevs.c
    subversion/trunk/subversion/libsvn_fs_x/reps.c
    subversion/trunk/subversion/libsvn_fs_x/transaction.c
    subversion/trunk/subversion/libsvn_fs_x/transaction.h
    subversion/trunk/subversion/libsvn_fs_x/tree.c
    subversion/trunk/subversion/libsvn_fs_x/util.c
    subversion/trunk/subversion/libsvn_fs_x/util.h
    subversion/trunk/subversion/libsvn_fs_x/verify.c

Modified: subversion/trunk/subversion/libsvn_fs_x/cached_data.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/cached_data.c?rev=1567023&r1=1567022&r2=1567023&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/cached_data.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/cached_data.c Tue Feb 11 10:09:57 2014
@@ -219,7 +219,8 @@ open_and_seek_revision(apr_file_t **file
   SVN_ERR(svn_fs_x__ensure_revision_exists(rev, fs, pool));
 
   SVN_ERR(svn_fs_x__open_pack_or_rev_file(&rev_file, fs, rev, pool));
-  SVN_ERR(svn_fs_x__item_offset(&offset, &sub_item, fs, rev, NULL, item,
+  SVN_ERR(svn_fs_x__item_offset(&offset, &sub_item, fs, rev,
+                                SVN_FS_X__INVALID_TXN_ID, item,
                                 pool));
   SVN_ERR(aligned_seek(fs, rev_file, NULL, offset, pool));
 
@@ -242,12 +243,12 @@ open_and_seek_transaction(apr_file_t **f
   apr_uint32_t sub_item = 0;
 
   SVN_ERR(svn_io_file_open(&rev_file,
-                           svn_fs_x__path_txn_proto_rev(fs, &rep->txn_id,
+                           svn_fs_x__path_txn_proto_rev(fs, rep->txn_id,
                                                         pool),
                            APR_READ | APR_BUFFERED, APR_OS_DEFAULT, pool));
 
   SVN_ERR(svn_fs_x__item_offset(&offset, &sub_item, fs, SVN_INVALID_REVNUM,
-                                &rep->txn_id, rep->item_index, pool));
+                                rep->txn_id, rep->item_index, pool));
   SVN_ERR(aligned_seek(fs, rev_file, NULL, offset, pool));
 
   *file = rev_file;
@@ -264,7 +265,7 @@ open_and_seek_representation(apr_file_t 
                              representation_t *rep,
                              apr_pool_t *pool)
 {
-  if (! svn_fs_x__id_txn_used(&rep->txn_id))
+  if (! svn_fs_x__id_txn_used(rep->txn_id))
     return open_and_seek_revision(file_p, fs, rep->revision, rep->item_index,
                                   pool);
   else
@@ -335,7 +336,8 @@ get_node_revision_body(node_revision_t *
           apr_off_t offset;
           apr_uint32_t sub_item;
           SVN_ERR(svn_fs_x__item_offset(&offset, &sub_item, fs,
-                                        rev_item->revision, NULL,
+                                        rev_item->revision,
+                                        SVN_FS_X__INVALID_TXN_ID,
                                         rev_item->number, pool));
           key.revision = svn_fs_x__packed_base_rev(fs, rev_item->revision);
           key.second = offset;
@@ -440,7 +442,8 @@ svn_fs_x__get_mergeinfo_count(apr_int64_
           svn_boolean_t is_cached;
 
           SVN_ERR(svn_fs_x__item_offset(&offset, &sub_item, fs,
-                                        rev_item->revision, NULL,
+                                        rev_item->revision,
+                                        SVN_FS_X__INVALID_TXN_ID,
                                         rev_item->number, pool));
           key.revision = svn_fs_x__packed_base_rev(fs, rev_item->revision);
           key.second = offset;
@@ -571,7 +574,7 @@ create_rep_state_body(rep_state_t **rep_
   rs->ver = -1;
   rs->start = -1;
 
-  if (ffd->rep_header_cache && !svn_fs_x__id_txn_used(&rep->txn_id))
+  if (ffd->rep_header_cache && !svn_fs_x__id_txn_used(rep->txn_id))
     SVN_ERR(svn_cache__get((void **) &rh, &is_cached,
                            ffd->rep_header_cache, &key, pool));
 
@@ -599,13 +602,14 @@ create_rep_state_body(rep_state_t **rep_
       /* we will need the on-disk location for non-txn reps */
       apr_off_t offset;
       apr_uint32_t sub_item;
-      if (! svn_fs_x__id_txn_used(&rep->txn_id))
+      if (! svn_fs_x__id_txn_used(rep->txn_id))
         SVN_ERR(svn_fs_x__item_offset(&offset, &sub_item,
-                                      fs, rep->revision, NULL,
+                                      fs, rep->revision,
+                                      SVN_FS_X__INVALID_TXN_ID,
                                       rep->item_index, pool));
 
       /* is rep stored in some star-deltified container? */
-      if (! svn_fs_x__id_txn_used(&rep->txn_id))
+      if (! svn_fs_x__id_txn_used(rep->txn_id))
         {
           svn_boolean_t in_container = TRUE;
           if (sub_item == 0)
@@ -665,7 +669,7 @@ create_rep_state_body(rep_state_t **rep_
       SVN_ERR(svn_fs_x__read_rep_header(&rh, rs->file->stream, pool));
       SVN_ERR(svn_fs_x__get_file_offset(&rs->start, rs->file->file, pool));
 
-      if (! svn_fs_x__id_txn_used(&rep->txn_id))
+      if (! svn_fs_x__id_txn_used(rep->txn_id))
         {
           SVN_ERR(block_read(NULL, fs, rep->revision, rep->item_index,
                               rs->file->file, pool, pool));
@@ -1105,7 +1109,7 @@ build_rep_list(apr_array_header_t **list
 
       /* for txn reps and containered reps, there won't be a cached
        * combined window */
-      if (!svn_fs_x__id_txn_used(&rep.txn_id)
+      if (!svn_fs_x__id_txn_used(rep.txn_id)
           && rep_header->type != svn_fs_x__rep_container)
         SVN_ERR(get_cached_combined_window(window_p, rs, &is_cached, pool));
 
@@ -1211,7 +1215,8 @@ auto_set_start_offset(rep_state_t *rs, a
   if (rs->start == -1)
     {
       SVN_ERR(svn_fs_x__item_offset(&rs->start, &rs->sub_item,
-                                    rs->file->fs, rs->revision, NULL,
+                                    rs->file->fs, rs->revision,
+                                    SVN_FS_X__INVALID_TXN_ID,
                                     rs->item_index, pool));
       rs->start += rs->header_size;
     }
@@ -1502,7 +1507,7 @@ init_rep_state(rep_state_t *rs,
   SVN_ERR_ASSERT(entry->type >= SVN_FS_X__ITEM_TYPE_FILE_REP
                  && entry->type <= SVN_FS_X__ITEM_TYPE_DIR_PROPS);
   SVN_ERR_ASSERT(entry->item_count == 1);
-  
+
   shared_file->file = file;
   shared_file->stream = stream;
   shared_file->fs = fs;
@@ -1960,7 +1965,7 @@ get_dir_contents(apr_hash_t *entries,
 {
   svn_stream_t *contents;
 
-  if (noderev->data_rep && svn_fs_x__id_txn_used(&noderev->data_rep->txn_id))
+  if (noderev->data_rep && svn_fs_x__id_txn_used(noderev->data_rep->txn_id))
     {
       const char *filename
         = svn_fs_x__path_txn_node_children(fs, noderev->id, pool);
@@ -2094,7 +2099,7 @@ locate_dir_cache(svn_fs_t *fs,
              A NULL key causes a cache miss. */
           *key = NULL;
         }
-      
+
       return ffd->dir_cache;
     }
 }
@@ -2198,7 +2203,7 @@ svn_fs_x__get_proplist(apr_hash_t **prop
   apr_hash_t *proplist;
   svn_stream_t *stream;
 
-  if (noderev->prop_rep && svn_fs_x__id_txn_used(&noderev->prop_rep->txn_id))
+  if (noderev->prop_rep && svn_fs_x__id_txn_used(noderev->prop_rep->txn_id))
     {
       const char *filename
         = svn_fs_x__path_txn_node_props(fs, noderev->id, pool);
@@ -2264,7 +2269,8 @@ svn_fs_x__get_changes(apr_array_header_t
       apr_uint32_t sub_item;
       pair_cache_key_t key;
 
-      SVN_ERR(svn_fs_x__item_offset(&offset, &sub_item, fs, rev, NULL,
+      SVN_ERR(svn_fs_x__item_offset(&offset, &sub_item, fs, rev,
+                                    SVN_FS_X__INVALID_TXN_ID,
                                     SVN_FS_X__ITEM_INDEX_CHANGES, pool));
       key.revision = svn_fs_x__packed_base_rev(fs, rev);
       key.second = offset;
@@ -2621,11 +2627,12 @@ block_read(void **result,
 
   /* don't try this on transaction protorev files */
   SVN_ERR_ASSERT(SVN_IS_VALID_REVNUM(revision));
-  
+
   /* index lookup: find the OFFSET of the item we *must* read plus (in the
    * "do-while" block) the list of items in the same block. */
   SVN_ERR(svn_fs_x__item_offset(&wanted_offset, &wanted_sub_item, fs,
-                                revision, NULL, item_index, iterpool));
+                                revision, SVN_FS_X__INVALID_TXN_ID,
+                                item_index, iterpool));
 
   offset = wanted_offset;
   do

Modified: subversion/trunk/subversion/libsvn_fs_x/changes.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/changes.c?rev=1567023&r1=1567022&r2=1567023&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/changes.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/changes.c Tue Feb 11 10:09:57 2014
@@ -81,7 +81,9 @@ typedef struct binary_change_t
    * Empty, if REV_ID is not "used". */
   svn_fs_x__id_part_t node_id;
   svn_fs_x__id_part_t copy_id;
-  svn_fs_x__id_part_t rev_id;  /* txn ID if CHANGE_TXN_NODE set in FLAGS */
+  svn_fs_x__id_part_t rev_id;  /* if CHANGE_TXN_NODE set in FLAGS:
+                                  revision = SVN_INVALID_REVNUM
+                                  number = TXN_ID */
 
 } binary_change_t;
 
@@ -181,13 +183,20 @@ append_change(svn_fs_x__changes_t *chang
     {
       binary_change.node_id = *svn_fs_x__id_node_id(info->node_rev_id);
       binary_change.copy_id = *svn_fs_x__id_copy_id(info->node_rev_id);
-      binary_change.rev_id = is_txn_id
-                           ? *svn_fs_x__id_txn_id(info->node_rev_id)
-                           : *svn_fs_x__id_rev_item(info->node_rev_id);
+      if (is_txn_id)
+        {
+          binary_change.rev_id.revision = SVN_INVALID_REVNUM;
+          binary_change.rev_id.number = svn_fs_x__id_txn_id(info->node_rev_id);
+        }
+      else
+        {
+          binary_change.rev_id = *svn_fs_x__id_rev_item(info->node_rev_id);
+        }
     }
   else
     {
-      svn_fs_x__id_txn_reset(&binary_change.rev_id);
+      binary_change.rev_id.revision = SVN_INVALID_REVNUM;
+      svn_fs_x__id_txn_reset((svn_fs_x__txn_id_t *)&binary_change.rev_id.number);
     }
 
   APR_ARRAY_PUSH(changes->changes, binary_change_t) = binary_change;
@@ -274,14 +283,15 @@ svn_fs_x__changes_get_list(apr_array_hea
                                                      &change->path.len,
                                                      pool);
 
-      if (svn_fs_x__id_txn_used(&binary_change->rev_id))
+      if (binary_change->flags & CHANGE_TXN_NODE)
         info->node_rev_id
-          = (binary_change->flags & CHANGE_TXN_NODE)
-          ? svn_fs_x__id_txn_create(&binary_change->node_id,
+          = svn_fs_x__id_txn_create(&binary_change->node_id,
                                     &binary_change->copy_id,
-                                    &binary_change->rev_id,
-                                    pool)
-          : svn_fs_x__id_rev_create(&binary_change->node_id,
+                                    binary_change->rev_id.number,
+                                    pool);
+      else if (binary_change->rev_id.revision != SVN_INVALID_REVNUM)
+        info->node_rev_id
+          = svn_fs_x__id_rev_create(&binary_change->node_id,
                                     &binary_change->copy_id,
                                     &binary_change->rev_id,
                                     pool);
@@ -545,14 +555,15 @@ svn_fs_x__changes_get_list_func(void **o
         = svn_fs_x__string_table_get_func(paths, binary_change->path,
                                           &change->path.len, pool);
 
-      if (svn_fs_x__id_txn_used(&binary_change->rev_id))
+      if (binary_change->flags & CHANGE_TXN_NODE)
         info->node_rev_id
-          = (binary_change->flags & CHANGE_TXN_NODE)
-          ? svn_fs_x__id_txn_create(&binary_change->node_id,
+          = svn_fs_x__id_txn_create(&binary_change->node_id,
                                     &binary_change->copy_id,
-                                    &binary_change->rev_id,
-                                    pool)
-          : svn_fs_x__id_rev_create(&binary_change->node_id,
+                                    binary_change->rev_id.number,
+                                    pool);
+      else if (binary_change->rev_id.revision != SVN_INVALID_REVNUM)
+        info->node_rev_id
+          = svn_fs_x__id_rev_create(&binary_change->node_id,
                                     &binary_change->copy_id,
                                     &binary_change->rev_id,
                                     pool);

Modified: subversion/trunk/subversion/libsvn_fs_x/dag.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/dag.c?rev=1567023&r1=1567022&r2=1567023&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/dag.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/dag.c Tue Feb 11 10:09:57 2014
@@ -334,7 +334,7 @@ set_entry(dag_node_t *parent,
           const char *name,
           const svn_fs_id_t *id,
           svn_node_kind_t kind,
-          const svn_fs_x__id_part_t *txn_id,
+          svn_fs_x__txn_id_t txn_id,
           apr_pool_t *pool)
 {
   node_revision_t *parent_noderev;
@@ -361,7 +361,7 @@ make_entry(dag_node_t **child_p,
            const char *parent_path,
            const char *name,
            svn_boolean_t is_dir,
-           const svn_fs_x__id_part_t *txn_id,
+           svn_fs_x__txn_id_t txn_id,
            apr_pool_t *pool)
 {
   const svn_fs_id_t *new_node_id;
@@ -455,7 +455,7 @@ svn_fs_x__dag_set_entry(dag_node_t *node
                         const char *entry_name,
                         const svn_fs_id_t *id,
                         svn_node_kind_t kind,
-                        const svn_fs_x__id_part_t *txn_id,
+                        svn_fs_x__txn_id_t txn_id,
                         apr_pool_t *pool)
 {
   /* Check it's a directory. */
@@ -632,7 +632,7 @@ svn_fs_x__dag_revision_root(dag_node_t *
 svn_error_t *
 svn_fs_x__dag_txn_root(dag_node_t **node_p,
                        svn_fs_t *fs,
-                       const svn_fs_x__id_part_t *txn_id,
+                       svn_fs_x__txn_id_t txn_id,
                        apr_pool_t *pool)
 {
   const svn_fs_id_t *root_id, *ignored;
@@ -645,8 +645,8 @@ svn_fs_x__dag_txn_root(dag_node_t **node
 svn_error_t *
 svn_fs_x__dag_txn_base_root(dag_node_t **node_p,
                             svn_fs_t *fs,
-                            const svn_fs_x__id_part_t *txn_id,
-                             apr_pool_t *pool)
+                            svn_fs_x__txn_id_t txn_id,
+                            apr_pool_t *pool)
 {
   const svn_fs_id_t *base_root_id, *ignored;
 
@@ -661,7 +661,7 @@ svn_fs_x__dag_clone_child(dag_node_t **c
                           const char *parent_path,
                           const char *name,
                           const svn_fs_x__id_part_t *copy_id,
-                          const svn_fs_x__id_part_t *txn_id,
+                          svn_fs_x__txn_id_t txn_id,
                           svn_boolean_t is_parent_copyroot,
                           apr_pool_t *pool)
 {
@@ -734,7 +734,7 @@ svn_fs_x__dag_clone_child(dag_node_t **c
 svn_error_t *
 svn_fs_x__dag_clone_root(dag_node_t **root_p,
                          svn_fs_t *fs,
-                         const svn_fs_x__id_part_t *txn_id,
+                         svn_fs_x__txn_id_t txn_id,
                          apr_pool_t *pool)
 {
   const svn_fs_id_t *base_root_id, *root_id;
@@ -761,7 +761,7 @@ svn_fs_x__dag_clone_root(dag_node_t **ro
 svn_error_t *
 svn_fs_x__dag_delete(dag_node_t *parent,
                      const char *name,
-                     const svn_fs_x__id_part_t *txn_id,
+                     svn_fs_x__txn_id_t txn_id,
                      apr_pool_t *pool)
 {
   node_revision_t *parent_noderev;
@@ -884,7 +884,7 @@ svn_fs_x__dag_make_file(dag_node_t **chi
                         dag_node_t *parent,
                         const char *parent_path,
                         const char *name,
-                        const svn_fs_x__id_part_t *txn_id,
+                        svn_fs_x__txn_id_t txn_id,
                         apr_pool_t *pool)
 {
   /* Call our little helper function */
@@ -897,7 +897,7 @@ svn_fs_x__dag_make_dir(dag_node_t **chil
                        dag_node_t *parent,
                        const char *parent_path,
                        const char *name,
-                       const svn_fs_x__id_part_t *txn_id,
+                       svn_fs_x__txn_id_t txn_id,
                        apr_pool_t *pool)
 {
   /* Call our little helper function */
@@ -1203,7 +1203,7 @@ svn_fs_x__dag_copy(dag_node_t *to_node,
                    svn_boolean_t preserve_history,
                    svn_revnum_t from_rev,
                    const char *from_path,
-                   const svn_fs_x__id_part_t *txn_id,
+                   svn_fs_x__txn_id_t txn_id,
                    apr_pool_t *pool)
 {
   const svn_fs_id_t *id;

Modified: subversion/trunk/subversion/libsvn_fs_x/dag.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/dag.h?rev=1567023&r1=1567022&r2=1567023&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/dag.h (original)
+++ subversion/trunk/subversion/libsvn_fs_x/dag.h Tue Feb 11 10:09:57 2014
@@ -226,7 +226,7 @@ svn_error_t *svn_fs_x__dag_revision_root
    for a transaction, call svn_fs_x__dag_clone_root.  */
 svn_error_t *svn_fs_x__dag_txn_root(dag_node_t **node_p,
                                     svn_fs_t *fs,
-                                    const svn_fs_x__id_part_t *txn_id,
+                                    svn_fs_x__txn_id_t txn_id,
                                     apr_pool_t *pool);
 
 
@@ -234,7 +234,7 @@ svn_error_t *svn_fs_x__dag_txn_root(dag_
    allocating from POOL.  Allocate the node in TRAIL->pool.  */
 svn_error_t *svn_fs_x__dag_txn_base_root(dag_node_t **node_p,
                                          svn_fs_t *fs,
-                                         const svn_fs_x__id_part_t *txn_id,
+                                         svn_fs_x__txn_id_t txn_id,
                                          apr_pool_t *pool);
 
 
@@ -244,7 +244,7 @@ svn_error_t *svn_fs_x__dag_txn_base_root
    root directory clone.  Allocate *ROOT_P in POOL.  */
 svn_error_t *svn_fs_x__dag_clone_root(dag_node_t **root_p,
                                       svn_fs_t *fs,
-                                      const svn_fs_x__id_part_t *txn_id,
+                                      svn_fs_x__txn_id_t txn_id,
                                       apr_pool_t *pool);
 
 
@@ -298,7 +298,7 @@ svn_error_t *svn_fs_x__dag_set_entry(dag
                                      const char *entry_name,
                                      const svn_fs_id_t *id,
                                      svn_node_kind_t kind,
-                                     const svn_fs_x__id_part_t *txn_id,
+                                     svn_fs_x__txn_id_t txn_id,
                                      apr_pool_t *pool);
 
 
@@ -326,7 +326,7 @@ svn_error_t *svn_fs_x__dag_clone_child(d
                                        const char *parent_path,
                                        const char *name,
                                        const svn_fs_x__id_part_t *copy_id,
-                                       const svn_fs_x__id_part_t *txn_id,
+                                       svn_fs_x__txn_id_t txn_id,
                                        svn_boolean_t is_parent_copyroot,
                                        apr_pool_t *pool);
 
@@ -345,7 +345,7 @@ svn_error_t *svn_fs_x__dag_clone_child(d
  */
 svn_error_t *svn_fs_x__dag_delete(dag_node_t *parent,
                                   const char *name,
-                                  const svn_fs_x__id_part_t *txn_id,
+                                  svn_fs_x__txn_id_t txn_id,
                                   apr_pool_t *pool);
 
 
@@ -388,7 +388,7 @@ svn_error_t *svn_fs_x__dag_make_dir(dag_
                                     dag_node_t *parent,
                                     const char *parent_path,
                                     const char *name,
-                                    const svn_fs_x__id_part_t *txn_id,
+                                    svn_fs_x__txn_id_t txn_id,
                                     apr_pool_t *pool);
 
 
@@ -499,7 +499,7 @@ svn_error_t *svn_fs_x__dag_make_file(dag
                                      dag_node_t *parent,
                                      const char *parent_path,
                                      const char *name,
-                                     const svn_fs_x__id_part_t *txn_id,
+                                     svn_fs_x__txn_id_t txn_id,
                                      apr_pool_t *pool);
 
 
@@ -526,7 +526,7 @@ svn_error_t *svn_fs_x__dag_copy(dag_node
                                 svn_boolean_t preserve_history,
                                 svn_revnum_t from_rev,
                                 const char *from_path,
-                                const svn_fs_x__id_part_t *txn_id,
+                                svn_fs_x__txn_id_t txn_id,
                                 apr_pool_t *pool);
 
 

Modified: subversion/trunk/subversion/libsvn_fs_x/fs.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/fs.h?rev=1567023&r1=1567022&r2=1567023&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/fs.h (original)
+++ subversion/trunk/subversion/libsvn_fs_x/fs.h Tue Feb 11 10:09:57 2014
@@ -134,7 +134,7 @@ typedef struct fs_x_shared_txn_data_t
   struct fs_x_shared_txn_data_t *next;
 
   /* ID of this transaction. */
-  svn_fs_x__id_part_t txn_id;
+  svn_fs_x__txn_id_t txn_id;
 
   /* Whether the transaction's prototype revision file is locked for
      writing by any thread in this process (including the current
@@ -462,7 +462,7 @@ typedef struct representation_t
   svn_filesize_t expanded_size;
 
   /* Is this representation a transaction? */
-  svn_fs_x__id_part_t txn_id;
+  svn_fs_x__txn_id_t txn_id;
 
   /* For rep-sharing, we need a way of uniquifying node-revs which share the
      same representation (see svn_fs_x__noderev_same_rep_key() ).  So, we
@@ -470,7 +470,7 @@ typedef struct representation_t
      intra-node uniqification content. */
   struct
   {
-    svn_fs_x__id_part_t txn_id;
+    svn_fs_x__txn_id_t txn_id;
     apr_uint64_t number;
   } uniquifier;
 } representation_t;

Modified: subversion/trunk/subversion/libsvn_fs_x/id.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/id.c?rev=1567023&r1=1567022&r2=1567023&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/id.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/id.c Tue Feb 11 10:09:57 2014
@@ -25,6 +25,7 @@
 
 #include "id.h"
 #include "index.h"
+#include "util.h"
 
 #include "../libsvn_fs/fs-loader.h"
 #include "private/svn_temp_serializer.h"
@@ -39,8 +40,8 @@ typedef struct fs_x__id_t
   /* private members */
   svn_fs_x__id_part_t node_id;
   svn_fs_x__id_part_t copy_id;
-  svn_fs_x__id_part_t txn_id;
   svn_fs_x__id_part_t rev_item;
+  svn_fs_x__txn_id_t txn_id;
 
   apr_pool_t *pool; /* pool that was used to allocate this struct */
 } fs_x__id_t;
@@ -86,15 +87,10 @@ part_parse(svn_fs_x__id_part_t *part,
  * Return FALSE if there was some problem.
  */
 static svn_boolean_t
-txn_id_parse(svn_fs_x__id_part_t *txn_id,
+txn_id_parse(svn_fs_x__txn_id_t *txn_id,
              const char *data)
 {
-  txn_id->revision = SVN_STR_TO_REV(data);
-  data = strchr(data, '-');
-  if (data == NULL)
-    return FALSE;
-  
-  txn_id->number = svn__base36toui64(&data, ++data);
+  *txn_id = svn__base36toui64(&data, data);
   return *data == '\0';
 }
 
@@ -145,41 +141,15 @@ svn_fs_x__id_part_eq(const svn_fs_x__id_
 }
 
 svn_boolean_t
-svn_fs_x__id_txn_used(const svn_fs_x__id_part_t *txn_id)
+svn_fs_x__id_txn_used(svn_fs_x__txn_id_t txn_id)
 {
-  return SVN_IS_VALID_REVNUM(txn_id->revision) || (txn_id->number != 0);
+  return txn_id != SVN_FS_X__INVALID_TXN_ID;
 }
 
 void
-svn_fs_x__id_txn_reset(svn_fs_x__id_part_t *txn_id)
+svn_fs_x__id_txn_reset(svn_fs_x__txn_id_t *txn_id)
 {
-  txn_id->revision = SVN_INVALID_REVNUM;
-  txn_id->number = 0;
-}
-
-svn_error_t *
-svn_fs_x__id_txn_parse(svn_fs_x__id_part_t *txn_id,
-                       const char *data)
-{
-  if (! txn_id_parse(txn_id, data))
-    return svn_error_createf(SVN_ERR_FS_MALFORMED_TXN_ID, NULL,
-                             "malformed txn id '%s'", data);
-
-  return SVN_NO_ERROR;
-}
-
-const char *
-svn_fs_x__id_txn_unparse(const svn_fs_x__id_part_t *txn_id,
-                         apr_pool_t *pool)
-{
-  char string[2 * SVN_INT64_BUFFER_SIZE + 1];
-  char *p = string;
-  
-  p += svn__i64toa(p, txn_id->revision);
-  *(p++) = '-';
-  p += svn__ui64tobase36(p, txn_id->number);
-
-  return apr_pstrmemdup(pool, string, p - string);
+  *txn_id = SVN_FS_X__INVALID_TXN_ID;
 }
 
 
@@ -204,12 +174,12 @@ svn_fs_x__id_copy_id(const svn_fs_id_t *
 }
 
 
-const svn_fs_x__id_part_t *
+svn_fs_x__txn_id_t
 svn_fs_x__id_txn_id(const svn_fs_id_t *fs_id)
 {
   fs_x__id_t *id = (fs_x__id_t *)fs_id;
 
-  return &id->txn_id;
+  return id->txn_id;
 }
 
 
@@ -243,7 +213,7 @@ svn_fs_x__id_is_txn(const svn_fs_id_t *f
 {
   fs_x__id_t *id = (fs_x__id_t *)fs_id;
 
-  return svn_fs_x__id_txn_used(&id->txn_id);
+  return svn_fs_x__id_txn_used(id->txn_id);
 }
 
 svn_string_t *
@@ -256,12 +226,10 @@ svn_fs_x__id_unparse(const svn_fs_id_t *
   char *p = unparse_id_part(string, &id->node_id);
   p = unparse_id_part(p, &id->copy_id);
 
-  if (svn_fs_x__id_txn_used(&id->txn_id))
+  if (svn_fs_x__id_txn_used(id->txn_id))
     {
       *(p++) = 't';
-      p += svn__i64toa(p, id->txn_id.revision);
-      *(p++) = '-';
-      p += svn__ui64tobase36(p, id->txn_id.number);
+      p += svn__ui64tobase36(p, id->txn_id);
     }
   else
     {
@@ -287,8 +255,9 @@ svn_fs_x__id_eq(const svn_fs_id_t *a,
   if (a == b)
     return TRUE;
 
-  return memcmp(&id_a->node_id, &id_b->node_id,
-                4 * sizeof(svn_fs_x__id_part_t)) == 0;
+  return id_a->txn_id == id_b->txn_id
+      && memcmp(&id_a->node_id, &id_b->node_id,
+                3 * sizeof(svn_fs_x__id_part_t)) == 0;
 }
 
 
@@ -305,11 +274,8 @@ svn_fs_x__id_check_related(const svn_fs_
   /* If both node_ids start with _ and they have differing transaction
      IDs, then it is impossible for them to be related. */
   if (id_a->node_id.revision == SVN_INVALID_REVNUM)
-    {
-      if (   !svn_fs_x__id_part_eq(&id_a->txn_id, &id_b->txn_id)
-          || !svn_fs_x__id_txn_used(&id_a->txn_id))
-        return FALSE;
-    }
+    if (id_a->txn_id != id_b->txn_id || !svn_fs_x__id_txn_used(id_a->txn_id))
+      return FALSE;
 
   return svn_fs_x__id_part_eq(&id_a->node_id, &id_b->node_id);
 }
@@ -346,14 +312,14 @@ static id_vtable_t id_vtable = {
 };
 
 svn_fs_id_t *
-svn_fs_x__id_txn_create_root(const svn_fs_x__id_part_t *txn_id,
+svn_fs_x__id_txn_create_root(svn_fs_x__txn_id_t txn_id,
                              apr_pool_t *pool)
 {
   fs_x__id_t *id = apr_pcalloc(pool, sizeof(*id));
 
   /* node ID and copy ID are "0" */
 
-  id->txn_id = *txn_id;
+  id->txn_id = txn_id;
   id->rev_item.revision = SVN_INVALID_REVNUM;
 
   id->generic_id.vtable = &id_vtable;
@@ -368,7 +334,7 @@ svn_fs_id_t *svn_fs_x__id_create_root(co
 {
   fs_x__id_t *id = apr_pcalloc(pool, sizeof(*id));
 
-  id->txn_id.revision = SVN_INVALID_REVNUM;
+  id->txn_id = SVN_FS_X__INVALID_TXN_ID;
   id->rev_item.revision = revision;
   id->rev_item.number = SVN_FS_X__ITEM_INDEX_ROOT_NODE;
 
@@ -382,14 +348,14 @@ svn_fs_id_t *svn_fs_x__id_create_root(co
 svn_fs_id_t *
 svn_fs_x__id_txn_create(const svn_fs_x__id_part_t *node_id,
                         const svn_fs_x__id_part_t *copy_id,
-                        const svn_fs_x__id_part_t *txn_id,
+                        svn_fs_x__txn_id_t txn_id,
                         apr_pool_t *pool)
 {
   fs_x__id_t *id = apr_pcalloc(pool, sizeof(*id));
 
   id->node_id = *node_id;
   id->copy_id = *copy_id;
-  id->txn_id = *txn_id;
+  id->txn_id = txn_id;
   id->rev_item.revision = SVN_INVALID_REVNUM;
 
   id->generic_id.vtable = &id_vtable;
@@ -410,7 +376,7 @@ svn_fs_x__id_rev_create(const svn_fs_x__
 
   id->node_id = *node_id;
   id->copy_id = *copy_id;
-  id->txn_id.revision = SVN_INVALID_REVNUM;
+  id->txn_id = SVN_FS_X__INVALID_TXN_ID;
   id->rev_item = *rev_item;
 
   id->generic_id.vtable = &id_vtable;
@@ -483,8 +449,7 @@ svn_fs_x__id_parse(const char *data,
       svn_error_t *err;
 
       /* This is a revision type ID */
-      id->txn_id.revision = SVN_INVALID_REVNUM;
-      id->txn_id.number = 0;
+      id->txn_id = SVN_FS_X__INVALID_TXN_ID;
 
       data_copy = str + 1;
       str = svn_cstring_tokenize("/", &data_copy);
@@ -524,7 +489,7 @@ svn_fs_x__id_serialize(svn_temp_serializ
                        const svn_fs_id_t * const *in)
 {
   const fs_x__id_t *id = (const fs_x__id_t *)*in;
-  
+
   /* nothing to do for NULL ids */
   if (id == NULL)
     return;

Modified: subversion/trunk/subversion/libsvn_fs_x/id.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/id.h?rev=1567023&r1=1567022&r2=1567023&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/id.h (original)
+++ subversion/trunk/subversion/libsvn_fs_x/id.h Tue Feb 11 10:09:57 2014
@@ -29,6 +29,12 @@
 extern "C" {
 #endif /* __cplusplus */
 
+/* Unique identifier for a transaction within the given repository. */
+typedef apr_int64_t svn_fs_x__txn_id_t;
+
+/* svn_fs_x__txn_id_t value for everything that is not a transaction. */
+#define SVN_FS_X__INVALID_TXN_ID ((svn_fs_x__txn_id_t)(-1))
+
 /* A rev node ID in FSX consists of a 3 of sub-IDs ("parts") that consist
  * of a creation REVISION number and some revision-local counter value
  * (NUMBER).  Old-style ID parts use global counter values.
@@ -56,19 +62,10 @@ svn_boolean_t svn_fs_x__id_part_eq(const
                                    const svn_fs_x__id_part_t *rhs);
 
 /* Return TRUE, if TXN_ID is used, i.e. doesn't contain just the defaults. */
-svn_boolean_t svn_fs_x__id_txn_used(const svn_fs_x__id_part_t *txn_id);
+svn_boolean_t svn_fs_x__id_txn_used(svn_fs_x__txn_id_t txn_id);
 
 /* Reset TXN_ID to the defaults. */
-void svn_fs_x__id_txn_reset(svn_fs_x__id_part_t *txn_id);
-
-/* Parse the transaction id in DATA and store the result in *TXN_ID */
-svn_error_t *svn_fs_x__id_txn_parse(svn_fs_x__id_part_t *txn_id,
-                                    const char *data);
-
-/* Convert the transaction id in *TXN_ID into a textual representation
- * allocated in POOL. */
-const char *svn_fs_x__id_txn_unparse(const svn_fs_x__id_part_t *txn_id,
-                                     apr_pool_t *pool);
+void svn_fs_x__id_txn_reset(svn_fs_x__txn_id_t *txn_id);
 
 
 /*** ID accessor functions. ***/
@@ -80,7 +77,7 @@ const svn_fs_x__id_part_t *svn_fs_x__id_
 const svn_fs_x__id_part_t *svn_fs_x__id_copy_id(const svn_fs_id_t *id);
 
 /* Get the "txn id" portion of ID, or NULL if it is a permanent ID. */
-const svn_fs_x__id_part_t *svn_fs_x__id_txn_id(const svn_fs_id_t *id);
+svn_fs_x__txn_id_t svn_fs_x__id_txn_id(const svn_fs_id_t *id);
 
 /* Get the "rev,item" portion of ID. */
 const svn_fs_x__id_part_t *svn_fs_x__id_rev_item(const svn_fs_id_t *id);
@@ -117,7 +114,7 @@ int svn_fs_x__id_part_compare(const svn_
                               const svn_fs_x__id_part_t *b);
 
 /* Create the txn root ID for transaction TXN_ID.  Allocate it in POOL. */
-svn_fs_id_t *svn_fs_x__id_txn_create_root(const svn_fs_x__id_part_t *txn_id,
+svn_fs_id_t *svn_fs_x__id_txn_create_root(svn_fs_x__txn_id_t txnnum,
                                           apr_pool_t *pool);
 
 /* Create the root ID for REVISION.  Allocate it in POOL. */
@@ -128,7 +125,7 @@ svn_fs_id_t *svn_fs_x__id_create_root(co
    TXN_ID, allocated in POOL. */
 svn_fs_id_t *svn_fs_x__id_txn_create(const svn_fs_x__id_part_t *node_id,
                                      const svn_fs_x__id_part_t *copy_id,
-                                     const svn_fs_x__id_part_t *txn_id,
+                                     svn_fs_x__txn_id_t txn_id,
                                      apr_pool_t *pool);
 
 /* Create a permanent ID based on NODE_ID, COPY_ID and REV_ITEM,

Modified: subversion/trunk/subversion/libsvn_fs_x/index.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/index.c?rev=1567023&r1=1567022&r2=1567023&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/index.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/index.c Tue Feb 11 10:09:57 2014
@@ -1542,7 +1542,7 @@ static svn_error_t *
 l2p_proto_index_lookup(apr_off_t *offset,
                        apr_uint32_t *sub_item,
                        svn_fs_t *fs,
-                       const svn_fs_x__id_part_t *txn_id,
+                       svn_fs_x__txn_id_t txn_id,
                        apr_uint64_t item_index,
                        apr_pool_t *pool)
 {
@@ -1765,7 +1765,7 @@ svn_fs_x__p2l_index_create(svn_fs_t *fs,
       for (sub_item = 0; sub_item < entry.item_count; ++sub_item)
         if (entry.items[sub_item].revision == SVN_INVALID_REVNUM)
           entry.items[sub_item].revision = revision;
-      
+
       /* end pages if entry is extending beyond their boundaries */
       entry_end = entry.offset + entry.size;
       while (entry_end - last_page_end > page_size)
@@ -2672,11 +2672,11 @@ svn_fs_x__item_offset(apr_off_t *offset,
                       apr_uint32_t *sub_item,
                       svn_fs_t *fs,
                       svn_revnum_t revision,
-                      const svn_fs_x__id_part_t *txn_id,
+                      svn_fs_x__txn_id_t txn_id,
                       apr_uint64_t item_index,
                       apr_pool_t *pool)
 {
-  if (txn_id)
+  if (txn_id != SVN_FS_X__INVALID_TXN_ID)
     SVN_ERR(l2p_proto_index_lookup(offset, sub_item,
                                    fs, txn_id, item_index, pool));
   else

Modified: subversion/trunk/subversion/libsvn_fs_x/index.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/index.h?rev=1567023&r1=1567022&r2=1567023&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/index.h (original)
+++ subversion/trunk/subversion/libsvn_fs_x/index.h Tue Feb 11 10:09:57 2014
@@ -213,7 +213,7 @@ svn_fs_x__item_offset(apr_off_t *offset,
                       apr_uint32_t *sub_item,
                       svn_fs_t *fs,
                       svn_revnum_t revision,
-                      const svn_fs_x__id_part_t *txn_id,
+                      svn_fs_x__txn_id_t txn_id,
                       apr_uint64_t item_index,
                       apr_pool_t *pool);
 

Modified: subversion/trunk/subversion/libsvn_fs_x/low_level.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/low_level.c?rev=1567023&r1=1567022&r2=1567023&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/low_level.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/low_level.c Tue Feb 11 10:09:57 2014
@@ -253,7 +253,7 @@ svn_fs_x__parse_representation(represent
     {
       if (rep->revision == SVN_INVALID_REVNUM)
         return SVN_NO_ERROR;
-    
+
       return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
                               _("Malformed text representation offset line in node-rev"));
     }
@@ -306,7 +306,7 @@ svn_fs_x__parse_representation(represent
     return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
                             _("Malformed text representation offset line in node-rev"));
 
-  SVN_ERR(svn_fs_x__id_txn_parse(&rep->uniquifier.txn_id, str));
+  SVN_ERR(svn_fs_x__txn_by_name(&rep->uniquifier.txn_id, str));
 
   str = svn_cstring_tokenize(" ", &string);
   if (str == NULL)
@@ -344,7 +344,7 @@ read_rep_offsets(representation_t **rep_
 
   if ((*rep_p)->revision == SVN_INVALID_REVNUM)
     if (noderev_id)
-      (*rep_p)->txn_id = *svn_fs_x__id_txn_id(noderev_id);
+      (*rep_p)->txn_id = svn_fs_x__id_txn_id(noderev_id);
 
   return SVN_NO_ERROR;
 }
@@ -580,7 +580,7 @@ svn_fs_x__unparse_representation(represe
                                  apr_pool_t *pool)
 {
   char buffer[SVN_INT64_BUFFER_SIZE];
-  if (svn_fs_x__id_txn_used(&rep->txn_id) && mutable_rep_truncated)
+  if (svn_fs_x__id_txn_used(rep->txn_id) && mutable_rep_truncated)
     return svn_stringbuf_ncreate("-1", 2, pool);
 
   if (!rep->has_sha1)
@@ -600,7 +600,7 @@ svn_fs_x__unparse_representation(represe
            format_digest(rep->md5_digest, svn_checksum_md5, FALSE, pool),
            format_digest(rep->sha1_digest, svn_checksum_sha1,
                          !rep->has_sha1, pool),
-           svn_fs_x__id_txn_unparse(&rep->uniquifier.txn_id, pool),
+           svn_fs_x__txn_name(rep->uniquifier.txn_id, pool),
            buffer);
 
 #undef DISPLAY_MAYBE_NULL_CHECKSUM

Modified: subversion/trunk/subversion/libsvn_fs_x/noderevs.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/noderevs.c?rev=1567023&r1=1567022&r2=1567023&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/noderevs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/noderevs.c Tue Feb 11 10:09:57 2014
@@ -97,7 +97,7 @@ typedef struct shared_representation_t
      intra-node uniqification content. */
   struct
   {
-    svn_fs_x__id_part_t txn_id;
+    svn_fs_x__txn_id_t txn_id;
     apr_uint64_t number;
   } uniquifier;
 
@@ -584,7 +584,7 @@ write_reps(svn_packed__int_stream_t *rep
       svn_packed__add_uint(rep_stream, rep->item_index);
       svn_packed__add_uint(rep_stream, rep->size);
       svn_packed__add_uint(rep_stream, rep->expanded_size);
-      
+
       svn_packed__add_bytes(digest_stream,
                             (const char *)rep->md5_digest,
                             sizeof(rep->md5_digest));
@@ -656,11 +656,11 @@ svn_fs_x__write_noderevs_container(svn_s
         = &APR_ARRAY_IDX(container->noderevs, i, binary_noderev_t);
 
       svn_packed__add_uint(noderevs_stream, noderev->flags);
-      
+
       svn_packed__add_uint(noderevs_stream, noderev->id);
       svn_packed__add_uint(noderevs_stream, noderev->predecessor_id);
       svn_packed__add_uint(noderevs_stream, noderev->predecessor_count);
-      
+
       svn_packed__add_uint(noderevs_stream, noderev->copyfrom_path);
       svn_packed__add_int(noderevs_stream, noderev->copyfrom_rev);
       svn_packed__add_uint(noderevs_stream, noderev->copyroot_path);
@@ -670,9 +670,7 @@ svn_fs_x__write_noderevs_container(svn_s
       svn_packed__add_uint(noderevs_stream, noderev->data_rep.representation);
 
       svn_packed__add_int(noderevs_stream,
-                          noderev->data_rep.uniquifier.txn_id.revision);
-      svn_packed__add_uint(noderevs_stream,
-                           noderev->data_rep.uniquifier.txn_id.number);
+                          noderev->data_rep.uniquifier.txn_id);
       svn_packed__add_uint(noderevs_stream,
                            noderev->data_rep.uniquifier.number);
 
@@ -802,7 +800,7 @@ svn_fs_x__read_noderevs_container(svn_fs
 
       APR_ARRAY_PUSH(noderevs->ids, binary_id_t) = id;
     }
-    
+
   /* read rep arrays */
   SVN_ERR(read_reps(&noderevs->data_reps, data_reps_stream, digests_stream,
                     result_pool));
@@ -833,10 +831,8 @@ svn_fs_x__read_noderevs_container(svn_fs
       noderev.data_rep.representation
         = (int)svn_packed__get_uint(noderevs_stream);
 
-      noderev.data_rep.uniquifier.txn_id.revision
-        = (svn_revnum_t)svn_packed__get_int(noderevs_stream);
-      noderev.data_rep.uniquifier.txn_id.number
-        = svn_packed__get_uint(noderevs_stream);
+      noderev.data_rep.uniquifier.txn_id
+        = svn_packed__get_int(noderevs_stream);
       noderev.data_rep.uniquifier.number
         = svn_packed__get_uint(noderevs_stream);
 

Modified: subversion/trunk/subversion/libsvn_fs_x/reps.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/reps.c?rev=1567023&r1=1567022&r2=1567023&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/reps.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/reps.c Tue Feb 11 10:09:57 2014
@@ -401,12 +401,12 @@ svn_fs_x__reps_add_base(svn_fs_x__reps_b
   SVN_ERR(svn_fs_x__get_contents(&stream, builder->fs, rep, scratch_pool));
   SVN_ERR(svn_string_from_stream(&contents, stream, scratch_pool,
                                  scratch_pool));
-  
+
   base.revision = rep->revision;
   base.item_index = rep->item_index;
   base.priority = priority;
   base.rep = (apr_uint32_t)svn_fs_x__reps_add(builder, contents);
-  
+
   APR_ARRAY_PUSH(builder->bases, base_t) = base;
   builder->base_text_len += builder->text->len - text_start_offset;
 

Modified: subversion/trunk/subversion/libsvn_fs_x/transaction.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/transaction.c?rev=1567023&r1=1567022&r2=1567023&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/transaction.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/transaction.c Tue Feb 11 10:09:57 2014
@@ -66,14 +66,14 @@ static txn_vtable_t txn_vtable = {
 typedef struct fs_txn_data_t
 {
   /* Strongly typed representation of the TXN's ID member. */
-  svn_fs_x__id_part_t txn_id;
+  svn_fs_x__txn_id_t txn_id;
 } fs_txn_data_t;
 
-const svn_fs_x__id_part_t *
+svn_fs_x__txn_id_t
 svn_fs_x__txn_get_id(svn_fs_txn_t *txn)
 {
   fs_txn_data_t *ftd = txn->fsap_data;
-  return &ftd->txn_id;
+  return ftd->txn_id;
 }
 
 /* Functions for working with shared transaction data. */
@@ -85,7 +85,7 @@ svn_fs_x__txn_get_id(svn_fs_txn_t *txn)
    true) or return NULL (otherwise). */
 static fs_x_shared_txn_data_t *
 get_shared_txn(svn_fs_t *fs,
-               const svn_fs_x__id_part_t *txn_id,
+               svn_fs_x__txn_id_t txn_id,
                svn_boolean_t create_new)
 {
   fs_x_data_t *ffd = fs->fsap_data;
@@ -93,7 +93,7 @@ get_shared_txn(svn_fs_t *fs,
   fs_x_shared_txn_data_t *txn;
 
   for (txn = ffsd->txns; txn; txn = txn->next)
-    if (svn_fs_x__id_part_eq(&txn->txn_id, txn_id))
+    if (txn->txn_id == txn_id)
       break;
 
   if (txn || !create_new)
@@ -113,7 +113,7 @@ get_shared_txn(svn_fs_t *fs,
       txn->pool = subpool;
     }
 
-  txn->txn_id = *txn_id;
+  txn->txn_id = txn_id;
   txn->being_written = FALSE;
 
   /* Link this transaction into the head of the list.  We will typically
@@ -131,14 +131,14 @@ get_shared_txn(svn_fs_t *fs,
    locked via the txn_list_lock mutex).  Do nothing if the transaction
    does not exist. */
 static void
-free_shared_txn(svn_fs_t *fs, const svn_fs_x__id_part_t *txn_id)
+free_shared_txn(svn_fs_t *fs, svn_fs_x__txn_id_t txn_id)
 {
   fs_x_data_t *ffd = fs->fsap_data;
   fs_x_shared_data_t *ffsd = ffd->shared;
   fs_x_shared_txn_data_t *txn, *prev = NULL;
 
   for (txn = ffsd->txns; txn; prev = txn, txn = txn->next)
-    if (svn_fs_x__id_part_eq(&txn->txn_id, txn_id))
+    if (txn->txn_id == txn_id)
       break;
 
   if (!txn)
@@ -299,7 +299,7 @@ with_txn_current_lock(svn_fs_t *fs,
    which see. */
 struct unlock_proto_rev_baton
 {
-  svn_fs_x__id_part_t txn_id;
+  svn_fs_x__txn_id_t txn_id;
   void *lockcookie;
 };
 
@@ -309,30 +309,30 @@ unlock_proto_rev_body(svn_fs_t *fs, cons
 {
   const struct unlock_proto_rev_baton *b = baton;
   apr_file_t *lockfile = b->lockcookie;
-  fs_x_shared_txn_data_t *txn = get_shared_txn(fs, &b->txn_id, FALSE);
+  fs_x_shared_txn_data_t *txn = get_shared_txn(fs, b->txn_id, FALSE);
   apr_status_t apr_err;
 
   if (!txn)
     return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
                              _("Can't unlock unknown transaction '%s'"),
-                             svn_fs_x__id_txn_unparse(&b->txn_id, pool));
+                             svn_fs_x__txn_name(b->txn_id, pool));
   if (!txn->being_written)
     return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
                              _("Can't unlock nonlocked transaction '%s'"),
-                             svn_fs_x__id_txn_unparse(&b->txn_id, pool));
+                             svn_fs_x__txn_name(b->txn_id, pool));
 
   apr_err = apr_file_unlock(lockfile);
   if (apr_err)
     return svn_error_wrap_apr
       (apr_err,
        _("Can't unlock prototype revision lockfile for transaction '%s'"),
-       svn_fs_x__id_txn_unparse(&b->txn_id, pool));
+       svn_fs_x__txn_name(b->txn_id, pool));
   apr_err = apr_file_close(lockfile);
   if (apr_err)
     return svn_error_wrap_apr
       (apr_err,
        _("Can't close prototype revision lockfile for transaction '%s'"),
-       svn_fs_x__id_txn_unparse(&b->txn_id, pool));
+       svn_fs_x__txn_name(b->txn_id, pool));
 
   txn->being_written = FALSE;
 
@@ -346,13 +346,13 @@ unlock_proto_rev_body(svn_fs_t *fs, cons
    Perform temporary allocations in POOL. */
 static svn_error_t *
 unlock_proto_rev(svn_fs_t *fs,
-                 const svn_fs_x__id_part_t *txn_id,
+                 svn_fs_x__txn_id_t txn_id,
                  void *lockcookie,
                  apr_pool_t *pool)
 {
   struct unlock_proto_rev_baton b;
 
-  b.txn_id = *txn_id;
+  b.txn_id = txn_id;
   b.lockcookie = lockcookie;
   return with_txnlist_lock(fs, unlock_proto_rev_body, &b, pool);
 }
@@ -361,13 +361,13 @@ unlock_proto_rev(svn_fs_t *fs,
    lock is already held. */
 static svn_error_t *
 unlock_proto_rev_list_locked(svn_fs_t *fs,
-                             const svn_fs_x__id_part_t *txn_id,
+                             svn_fs_x__txn_id_t txn_id,
                              void *lockcookie,
                              apr_pool_t *pool)
 {
   struct unlock_proto_rev_baton b;
 
-  b.txn_id = *txn_id;
+  b.txn_id = txn_id;
   b.lockcookie = lockcookie;
   return unlock_proto_rev_body(fs, &b, pool);
 }
@@ -378,7 +378,7 @@ struct get_writable_proto_rev_baton
 {
   apr_file_t **file;
   void **lockcookie;
-  svn_fs_x__id_part_t txn_id;
+  svn_fs_x__txn_id_t txn_id;
 };
 
 /* Callback used in the implementation of get_writable_proto_rev(). */
@@ -389,7 +389,7 @@ get_writable_proto_rev_body(svn_fs_t *fs
   apr_file_t **file = b->file;
   void **lockcookie = b->lockcookie;
   svn_error_t *err;
-  fs_x_shared_txn_data_t *txn = get_shared_txn(fs, &b->txn_id, TRUE);
+  fs_x_shared_txn_data_t *txn = get_shared_txn(fs, b->txn_id, TRUE);
 
   /* First, ensure that no thread in this process (including this one)
      is currently writing to this transaction's proto-rev file. */
@@ -399,7 +399,7 @@ get_writable_proto_rev_body(svn_fs_t *fs
                                "of transaction '%s' because a previous "
                                "representation is currently being written by "
                                "this process"),
-                             svn_fs_x__id_txn_unparse(&b->txn_id, pool));
+                             svn_fs_x__txn_name(b->txn_id, pool));
 
 
   /* We know that no thread in this process is writing to the proto-rev
@@ -412,7 +412,7 @@ get_writable_proto_rev_body(svn_fs_t *fs
     apr_file_t *lockfile;
     apr_status_t apr_err;
     const char *lockfile_path
-      = svn_fs_x__path_txn_proto_rev_lock(fs, &b->txn_id, pool);
+      = svn_fs_x__path_txn_proto_rev_lock(fs, b->txn_id, pool);
 
     /* Open the proto-rev lockfile, creating it if necessary, as it may
        not exist if the transaction dates from before the lockfiles were
@@ -436,8 +436,7 @@ get_writable_proto_rev_body(svn_fs_t *fs
                                      "file of transaction '%s' because a "
                                      "previous representation is currently "
                                      "being written by another process"),
-                                   svn_fs_x__id_txn_unparse(&b->txn_id,
-                                                            pool));
+                                   svn_fs_x__txn_name(b->txn_id, pool));
 
         return svn_error_wrap_apr(apr_err,
                                   _("Can't get exclusive lock on file '%s'"),
@@ -453,7 +452,7 @@ get_writable_proto_rev_body(svn_fs_t *fs
 
   /* Now open the prototype revision file and seek to the end. */
   err = svn_io_file_open(file,
-                         svn_fs_x__path_txn_proto_rev(fs, &b->txn_id, pool),
+                         svn_fs_x__path_txn_proto_rev(fs, b->txn_id, pool),
                          APR_WRITE | APR_BUFFERED, APR_OS_DEFAULT, pool);
 
   /* You might expect that we could dispense with the following seek
@@ -473,7 +472,7 @@ get_writable_proto_rev_body(svn_fs_t *fs
     {
       err = svn_error_compose_create(
               err,
-              unlock_proto_rev_list_locked(fs, &b->txn_id, *lockcookie, pool));
+              unlock_proto_rev_list_locked(fs, b->txn_id, *lockcookie, pool));
 
       *lockcookie = NULL;
     }
@@ -495,14 +494,14 @@ static svn_error_t *
 get_writable_proto_rev(apr_file_t **file,
                        void **lockcookie,
                        svn_fs_t *fs,
-                       const svn_fs_x__id_part_t *txn_id,
+                       svn_fs_x__txn_id_t txn_id,
                        apr_pool_t *pool)
 {
   struct get_writable_proto_rev_baton b;
 
   b.file = file;
   b.lockcookie = lockcookie;
-  b.txn_id = *txn_id;
+  b.txn_id = txn_id;
 
   return with_txnlist_lock(fs, get_writable_proto_rev_body, &b, pool);
 }
@@ -511,7 +510,7 @@ get_writable_proto_rev(apr_file_t **file
 static svn_error_t *
 purge_shared_txn_body(svn_fs_t *fs, const void *baton, apr_pool_t *pool)
 {
-  const svn_fs_x__id_part_t *txn_id = baton;
+  svn_fs_x__txn_id_t txn_id = *(const svn_fs_x__txn_id_t *)baton;
 
   free_shared_txn(fs, txn_id);
   svn_fs_x__reset_txn_caches(fs);
@@ -523,10 +522,10 @@ purge_shared_txn_body(svn_fs_t *fs, cons
    Perform all allocations in POOL. */
 static svn_error_t *
 purge_shared_txn(svn_fs_t *fs,
-                 const svn_fs_x__id_part_t *txn_id,
+                 svn_fs_x__txn_id_t txn_id,
                  apr_pool_t *pool)
 {
-  return with_txnlist_lock(fs, purge_shared_txn_body, txn_id, pool);
+  return with_txnlist_lock(fs, purge_shared_txn_body, &txn_id, pool);
 }
 
 
@@ -580,7 +579,7 @@ store_sha1_rep_mapping(svn_fs_t *fs,
     {
       apr_file_t *rep_file;
       const char *file_name
-        = svn_fs_x__path_txn_sha1(fs,  &noderev->data_rep->txn_id,
+        = svn_fs_x__path_txn_sha1(fs,  noderev->data_rep->txn_id,
                                   noderev->data_rep->sha1_digest, pool);
       svn_stringbuf_t *rep_string
         = svn_fs_x__unparse_representation(noderev->data_rep,
@@ -893,7 +892,7 @@ process_changes(apr_hash_t *changed_path
 svn_error_t *
 svn_fs_x__txn_changes_fetch(apr_hash_t **changed_paths_p,
                             svn_fs_t *fs,
-                            const svn_fs_x__id_part_t *txn_id,
+                            svn_fs_x__txn_id_t txn_id,
                             apr_pool_t *pool)
 {
   apr_file_t *file;
@@ -949,7 +948,7 @@ svn_fs_x__paths_changed(apr_hash_t **cha
    Allocations are from POOL.  */
 static svn_error_t *
 create_new_txn_noderev_from_rev(svn_fs_t *fs,
-                                const svn_fs_x__id_part_t *txn_id,
+                                svn_fs_x__txn_id_t txn_id,
                                 svn_fs_id_t *src,
                                 apr_pool_t *pool)
 {
@@ -1018,9 +1017,8 @@ get_and_increment_txn_key_body(void *bat
    value in the transaction ID to prevent reuse of transaction IDs. */
 static svn_error_t *
 create_txn_dir(const char **id_p,
-               svn_fs_x__id_part_t *txn_id,
+               svn_fs_x__txn_id_t *txn_id,
                svn_fs_t *fs,
-               svn_revnum_t rev,
                apr_pool_t *pool)
 {
   struct get_and_increment_txn_key_baton cb;
@@ -1036,10 +1034,9 @@ create_txn_dir(const char **id_p,
                                 get_and_increment_txn_key_body,
                                 &cb,
                                 pool));
-  txn_id->revision = rev;
-  txn_id->number = cb.txn_number;
+  *txn_id = cb.txn_number;
 
-  *id_p = svn_fs_x__id_txn_unparse(txn_id, pool);
+  *id_p = svn_fs_x__txn_name(*txn_id, pool);
   txn_dir = svn_dirent_join_many(pool,
                                  fs->path,
                                  PATH_TXNS_DIR,
@@ -1064,7 +1061,7 @@ svn_fs_x__create_txn(svn_fs_txn_t **txn_
   ftd = apr_pcalloc(pool, sizeof(*ftd));
 
   /* Get the txn_id. */
-  SVN_ERR(create_txn_dir(&txn->id, &ftd->txn_id, fs, rev, pool));
+  SVN_ERR(create_txn_dir(&txn->id, &ftd->txn_id, fs, pool));
 
   txn->fs = fs;
   txn->base_rev = rev;
@@ -1075,26 +1072,26 @@ svn_fs_x__create_txn(svn_fs_txn_t **txn_
 
   /* Create a new root node for this transaction. */
   SVN_ERR(svn_fs_x__rev_get_root(&root_id, fs, rev, pool));
-  SVN_ERR(create_new_txn_noderev_from_rev(fs, &ftd->txn_id, root_id, pool));
+  SVN_ERR(create_new_txn_noderev_from_rev(fs, ftd->txn_id, root_id, pool));
 
   /* Create an empty rev file. */
   SVN_ERR(svn_io_file_create_empty(
-              svn_fs_x__path_txn_proto_rev(fs, &ftd->txn_id, pool),
+              svn_fs_x__path_txn_proto_rev(fs, ftd->txn_id, pool),
               pool));
 
   /* Create an empty rev-lock file. */
   SVN_ERR(svn_io_file_create_empty(
-              svn_fs_x__path_txn_proto_rev_lock(fs, &ftd->txn_id, pool),
+              svn_fs_x__path_txn_proto_rev_lock(fs, ftd->txn_id, pool),
               pool));
 
   /* Create an empty changes file. */
   SVN_ERR(svn_io_file_create_empty(
-              svn_fs_x__path_txn_changes(fs, &ftd->txn_id, pool),
+              svn_fs_x__path_txn_changes(fs, ftd->txn_id, pool),
               pool));
 
   /* Create the next-ids file. */
   return svn_io_file_create(
-              svn_fs_x__path_txn_next_ids(fs, &ftd->txn_id, pool),
+              svn_fs_x__path_txn_next_ids(fs, ftd->txn_id, pool),
               "0 0\n", pool);
 }
 
@@ -1103,14 +1100,14 @@ svn_fs_x__create_txn(svn_fs_txn_t **txn_
 static svn_error_t *
 get_txn_proplist(apr_hash_t *proplist,
                  svn_fs_t *fs,
-                 const svn_fs_x__id_part_t *txn_id,
+                 svn_fs_x__txn_id_t txn_id,
                  apr_pool_t *pool)
 {
   svn_stream_t *stream;
 
   /* Check for issue #3696. (When we find and fix the cause, we can change
    * this to an assertion.) */
-  if (!txn_id || !svn_fs_x__id_txn_used(txn_id))
+  if (txn_id == SVN_FS_X__INVALID_TXN_ID)
     return svn_error_create(SVN_ERR_INCORRECT_PARAMS, NULL,
                             _("Internal error: a null transaction id was "
                               "passed to get_txn_proplist()"));
@@ -1156,7 +1153,7 @@ change_txn_props(svn_fs_txn_t *txn,
   int i;
   svn_error_t *err;
 
-  err = get_txn_proplist(txn_prop, txn->fs, &ftd->txn_id, pool);
+  err = get_txn_proplist(txn_prop, txn->fs, ftd->txn_id, pool);
   /* Here - and here only - we need to deal with the possibility that the
      transaction property file doesn't yet exist.  The rest of the
      implementation assumes that the file exists, but we're called to set the
@@ -1185,15 +1182,15 @@ change_txn_props(svn_fs_txn_t *txn,
   SVN_ERR(svn_hash_write2(txn_prop, stream, SVN_HASH_TERMINATOR, pool));
   SVN_ERR(svn_stream_close(stream));
   SVN_ERR(svn_io_write_unique(&txn_prop_filename,
-                      svn_fs_x__path_txn_dir(txn->fs, &ftd->txn_id, pool),
+                      svn_fs_x__path_txn_dir(txn->fs, ftd->txn_id, pool),
                       buf->data,
                       buf->len,
                       svn_io_file_del_none,
                       pool));
   return svn_io_file_rename(txn_prop_filename,
                 (final 
-                 ? svn_fs_x__path_txn_props_final(txn->fs, &ftd->txn_id, pool)
-                 : svn_fs_x__path_txn_props(txn->fs, &ftd->txn_id, pool)),
+                 ? svn_fs_x__path_txn_props_final(txn->fs, ftd->txn_id, pool)
+                 : svn_fs_x__path_txn_props(txn->fs, ftd->txn_id, pool)),
                 pool);
 }
 
@@ -1210,7 +1207,7 @@ svn_fs_x__change_txn_props(svn_fs_txn_t 
 svn_error_t *
 svn_fs_x__get_txn(transaction_t **txn_p,
                   svn_fs_t *fs,
-                  const svn_fs_x__id_part_t *txn_id,
+                  svn_fs_x__txn_id_t txn_id,
                   apr_pool_t *pool)
 {
   transaction_t *txn;
@@ -1241,7 +1238,7 @@ svn_fs_x__get_txn(transaction_t **txn_p,
    POOL. */
 static svn_error_t *
 write_next_ids(svn_fs_t *fs,
-               const svn_fs_x__id_part_t *txn_id,
+               svn_fs_x__txn_id_t txn_id,
                apr_uint64_t node_id,
                apr_uint64_t copy_id,
                apr_pool_t *pool)
@@ -1273,7 +1270,7 @@ static svn_error_t *
 read_next_ids(apr_uint64_t *node_id,
               apr_uint64_t *copy_id,
               svn_fs_t *fs,
-              const svn_fs_x__id_part_t *txn_id,
+              svn_fs_x__txn_id_t txn_id,
               apr_pool_t *pool)
 {
   svn_stringbuf_t *buf;
@@ -1305,7 +1302,7 @@ read_next_ids(apr_uint64_t *node_id,
 static svn_error_t *
 get_new_txn_node_id(svn_fs_x__id_part_t *node_id_p,
                     svn_fs_t *fs,
-                    const svn_fs_x__id_part_t *txn_id,
+                    svn_fs_x__txn_id_t txn_id,
                     apr_pool_t *pool)
 {
   apr_uint64_t node_id, copy_id;
@@ -1324,7 +1321,7 @@ get_new_txn_node_id(svn_fs_x__id_part_t 
 svn_error_t *
 svn_fs_x__reserve_copy_id(svn_fs_x__id_part_t *copy_id_p,
                           svn_fs_t *fs,
-                          const svn_fs_x__id_part_t *txn_id,
+                          svn_fs_x__txn_id_t txn_id,
                           apr_pool_t *pool)
 {
   apr_uint64_t node_id, copy_id;
@@ -1345,7 +1342,7 @@ svn_fs_x__create_node(const svn_fs_id_t 
                       svn_fs_t *fs,
                       node_revision_t *noderev,
                       const svn_fs_x__id_part_t *copy_id,
-                      const svn_fs_x__id_part_t *txn_id,
+                      svn_fs_x__txn_id_t txn_id,
                       apr_pool_t *pool)
 {
   svn_fs_x__id_part_t node_id;
@@ -1370,13 +1367,13 @@ svn_fs_x__purge_txn(svn_fs_t *fs,
                     const char *txn_id_str,
                     apr_pool_t *pool)
 {
-  svn_fs_x__id_part_t txn_id;
-  SVN_ERR(svn_fs_x__id_txn_parse(&txn_id, txn_id_str));
+  svn_fs_x__txn_id_t txn_id;
+  SVN_ERR(svn_fs_x__txn_by_name(&txn_id, txn_id_str));
 
   /* Remove the shared transaction object associated with this transaction. */
-  SVN_ERR(purge_shared_txn(fs, &txn_id, pool));
+  SVN_ERR(purge_shared_txn(fs, txn_id, pool));
   /* Remove the directory associated with this transaction. */
-  SVN_ERR(svn_io_remove_dir2(svn_fs_x__path_txn_dir(fs, &txn_id, pool),
+  SVN_ERR(svn_io_remove_dir2(svn_fs_x__path_txn_dir(fs, txn_id, pool),
                              FALSE, NULL, NULL, pool));
 
   /* Delete protorev and its lock, which aren't in the txn
@@ -1384,10 +1381,10 @@ svn_fs_x__purge_txn(svn_fs_t *fs,
       is post-commit and the proto-rev has been moved into
       place). */
   SVN_ERR(svn_io_remove_file2(
-                  svn_fs_x__path_txn_proto_rev(fs, &txn_id, pool),
+                  svn_fs_x__path_txn_proto_rev(fs, txn_id, pool),
                   TRUE, pool));
   SVN_ERR(svn_io_remove_file2(
-                  svn_fs_x__path_txn_proto_rev_lock(fs, &txn_id, pool),
+                  svn_fs_x__path_txn_proto_rev_lock(fs, txn_id, pool),
                   TRUE, pool));
 
   return SVN_NO_ERROR;
@@ -1418,7 +1415,7 @@ set_uniquifier(svn_fs_t *fs,
 {
   svn_fs_x__id_part_t temp;
 
-  SVN_ERR(get_new_txn_node_id(&temp, fs, &rep->txn_id, pool));
+  SVN_ERR(get_new_txn_node_id(&temp, fs, rep->txn_id, pool));
   rep->uniquifier.txn_id = rep->txn_id;
   rep->uniquifier.number = temp.number;
 
@@ -1427,7 +1424,7 @@ set_uniquifier(svn_fs_t *fs,
 
 svn_error_t *
 svn_fs_x__set_entry(svn_fs_t *fs,
-                    const svn_fs_x__id_part_t *txn_id,
+                    svn_fs_x__txn_id_t txn_id,
                     node_revision_t *parent_noderev,
                     const char *name,
                     const svn_fs_id_t *id,
@@ -1442,7 +1439,7 @@ svn_fs_x__set_entry(svn_fs_t *fs,
   fs_x_data_t *ffd = fs->fsap_data;
   apr_pool_t *subpool = svn_pool_create(pool);
 
-  if (!rep || !svn_fs_x__id_txn_used(&rep->txn_id))
+  if (!rep || !svn_fs_x__id_txn_used(rep->txn_id))
     {
       apr_hash_t *entries;
 
@@ -1462,7 +1459,7 @@ svn_fs_x__set_entry(svn_fs_t *fs,
       /* Mark the node-rev's data rep as mutable. */
       rep = apr_pcalloc(pool, sizeof(*rep));
       rep->revision = SVN_INVALID_REVNUM;
-      rep->txn_id = *txn_id;
+      rep->txn_id = txn_id;
       SVN_ERR(set_uniquifier(fs, rep, pool));
       parent_noderev->data_rep = rep;
       SVN_ERR(svn_fs_x__put_node_revision(fs, parent_noderev->id,
@@ -1525,7 +1522,7 @@ svn_fs_x__set_entry(svn_fs_t *fs,
 
 svn_error_t *
 svn_fs_x__add_change(svn_fs_t *fs,
-                     const svn_fs_x__id_part_t *txn_id,
+                     svn_fs_x__txn_id_t txn_id,
                      const char *path,
                      const svn_fs_id_t *id,
                      svn_fs_path_change_kind_t change_kind,
@@ -1565,7 +1562,7 @@ svn_fs_x__add_change(svn_fs_t *fs,
  */
 static svn_error_t *
 store_l2p_index_entry(svn_fs_t *fs,
-                      const svn_fs_x__id_part_t *txn_id,
+                      svn_fs_x__txn_id_t txn_id,
                       apr_off_t offset,
                       apr_uint64_t item_index,
                       apr_pool_t *pool)
@@ -1586,7 +1583,7 @@ store_l2p_index_entry(svn_fs_t *fs,
  */
 static svn_error_t *
 store_p2l_index_entry(svn_fs_t *fs,
-                      const svn_fs_x__id_part_t *txn_id,
+                      svn_fs_x__txn_id_t txn_id,
                       svn_fs_x__p2l_entry_t *entry,
                       apr_pool_t *pool)
 {
@@ -1609,7 +1606,7 @@ store_p2l_index_entry(svn_fs_t *fs,
 static svn_error_t *
 allocate_item_index(apr_uint64_t *item_index,
                     svn_fs_t *fs,
-                    const svn_fs_x__id_part_t *txn_id,
+                    svn_fs_x__txn_id_t txn_id,
                     apr_off_t my_offset,
                     apr_pool_t *pool)
 {
@@ -1999,11 +1996,11 @@ get_shared_rep(representation_t **old_re
   /* look for intra-revision matches (usually data reps but not limited
      to them in case props happen to look like some data rep)
    */
-  if (*old_rep == NULL && svn_fs_x__id_txn_used(&rep->txn_id))
+  if (*old_rep == NULL && svn_fs_x__id_txn_used(rep->txn_id))
     {
       svn_node_kind_t kind;
       const char *file_name
-        = svn_fs_x__path_txn_sha1(fs, &rep->txn_id, rep->sha1_digest, pool);
+        = svn_fs_x__path_txn_sha1(fs, rep->txn_id, rep->sha1_digest, pool);
 
       /* in our txn, is there a rep file named with the wanted SHA1?
          If so, read it and use that rep.
@@ -2073,7 +2070,7 @@ rep_write_contents_close(void *baton)
 
   /* Fill in the rest of the representation field. */
   rep->expanded_size = b->rep_size;
-  rep->txn_id = *svn_fs_x__id_txn_id(b->noderev->id);
+  rep->txn_id = svn_fs_x__id_txn_id(b->noderev->id);
   SVN_ERR(set_uniquifier(b->fs, rep, b->pool));
   rep->revision = SVN_INVALID_REVNUM;
 
@@ -2097,7 +2094,7 @@ rep_write_contents_close(void *baton)
     {
       /* Write out our cosmetic end marker. */
       SVN_ERR(svn_stream_puts(b->rep_stream, "ENDREP\n"));
-      SVN_ERR(allocate_item_index(&rep->item_index, b->fs, &rep->txn_id,
+      SVN_ERR(allocate_item_index(&rep->item_index, b->fs, rep->txn_id,
                                   b->rep_offset, b->pool));
 
       b->noderev->data_rep = rep;
@@ -2124,11 +2121,11 @@ rep_write_contents_close(void *baton)
       entry.items = &rev_item;
 
       SVN_ERR(store_sha1_rep_mapping(b->fs, b->noderev, b->pool));
-      SVN_ERR(store_p2l_index_entry(b->fs, &rep->txn_id, &entry, b->pool));
+      SVN_ERR(store_p2l_index_entry(b->fs, rep->txn_id, &entry, b->pool));
     }
 
   SVN_ERR(svn_io_file_close(b->file, b->pool));
-  SVN_ERR(unlock_proto_rev(b->fs, &rep->txn_id, b->lockcookie, b->pool));
+  SVN_ERR(unlock_proto_rev(b->fs, rep->txn_id, b->lockcookie, b->pool));
   svn_pool_destroy(b->pool);
 
   return SVN_NO_ERROR;
@@ -2180,7 +2177,7 @@ svn_fs_x__create_successor(const svn_fs_
                            const svn_fs_id_t *old_idp,
                            node_revision_t *new_noderev,
                            const svn_fs_x__id_part_t *copy_id,
-                           const svn_fs_x__id_part_t *txn_id,
+                           svn_fs_x__txn_id_t txn_id,
                            apr_pool_t *pool)
 {
   const svn_fs_id_t *id;
@@ -2228,10 +2225,10 @@ svn_fs_x__set_proplist(svn_fs_t *fs,
 
   /* Mark the node-rev's prop rep as mutable, if not already done. */
   if (!noderev->prop_rep
-      || !svn_fs_x__id_txn_used(&noderev->prop_rep->txn_id))
+      || !svn_fs_x__id_txn_used(noderev->prop_rep->txn_id))
     {
       noderev->prop_rep = apr_pcalloc(pool, sizeof(*noderev->prop_rep));
-      noderev->prop_rep->txn_id = *svn_fs_x__id_txn_id(noderev->id);
+      noderev->prop_rep->txn_id = svn_fs_x__id_txn_id(noderev->id);
       SVN_ERR(svn_fs_x__put_node_revision(fs, noderev->id, noderev, FALSE,
                                           pool));
     }
@@ -2282,7 +2279,7 @@ write_hash_delta_rep(representation_t *r
                      apr_file_t *file,
                      apr_hash_t *hash,
                      svn_fs_t *fs,
-                     const svn_fs_x__id_part_t *txn_id,
+                     svn_fs_x__txn_id_t txn_id,
                      node_revision_t *noderev,
                      apr_hash_t *reps_hash,
                      int item_type,
@@ -2519,7 +2516,7 @@ write_final_rev(const svn_fs_id_t **new_
   const svn_fs_id_t *new_id;
   svn_fs_x__id_part_t node_id, copy_id, rev_item;
   fs_x_data_t *ffd = fs->fsap_data;
-  const svn_fs_x__id_part_t *txn_id = svn_fs_x__id_txn_id(id);
+  svn_fs_x__txn_id_t txn_id = svn_fs_x__id_txn_id(id);
   svn_fs_x__p2l_entry_t entry;
 
   *new_id_p = NULL;
@@ -2563,7 +2560,7 @@ write_final_rev(const svn_fs_id_t **new_
       svn_pool_destroy(subpool);
 
       if (noderev->data_rep
-          && svn_fs_x__id_txn_used(&noderev->data_rep->txn_id))
+          && svn_fs_x__id_txn_used(noderev->data_rep->txn_id))
         {
           /* Write out the contents of this directory as a text rep. */
           SVN_ERR(unparse_dir_entries(&str_entries, entries, pool));
@@ -2584,7 +2581,7 @@ write_final_rev(const svn_fs_id_t **new_
          num. */
 
       if (noderev->data_rep
-          && svn_fs_x__id_txn_used(&noderev->data_rep->txn_id))
+          && svn_fs_x__id_txn_used(noderev->data_rep->txn_id))
         {
           svn_fs_x__id_txn_reset(&noderev->data_rep->txn_id);
           noderev->data_rep->revision = rev;
@@ -2593,7 +2590,7 @@ write_final_rev(const svn_fs_id_t **new_
 
   /* Fix up the property reps. */
   if (noderev->prop_rep
-      && svn_fs_x__id_txn_used(&noderev->prop_rep->txn_id))
+      && svn_fs_x__id_txn_used(noderev->prop_rep->txn_id))
     {
       apr_hash_t *proplist;
       int item_type = noderev->kind == svn_node_dir
@@ -2706,7 +2703,7 @@ static svn_error_t *
 write_final_changed_path_info(apr_off_t *offset_p,
                               apr_file_t *file,
                               svn_fs_t *fs,
-                              const svn_fs_x__id_part_t *txn_id,
+                              svn_fs_x__txn_id_t txn_id,
                               apr_hash_t *changed_paths,
                               svn_revnum_t new_rev,
                               apr_pool_t *pool)
@@ -2799,7 +2796,7 @@ verify_as_revision_before_current_plus_p
    The FS write lock is assumed to be held by the caller. */
 static svn_error_t *
 verify_locks(svn_fs_t *fs,
-             const svn_fs_x__id_part_t *txn_id,
+             svn_fs_x__txn_id_t txn_id,
              apr_pool_t *pool)
 {
   apr_pool_t *subpool = svn_pool_create(pool);
@@ -2903,7 +2900,7 @@ check_for_duplicate_move_source(apr_hash
    txn.  Use POOL for temporary allocations. */
 static svn_error_t *
 verify_moves(svn_fs_t *fs,
-             const svn_fs_x__id_part_t *txn_id,
+             const svn_fs_txn_t *txn,
              svn_revnum_t old_rev,
              apr_hash_t *changed_paths,
              apr_pool_t *pool)
@@ -2988,7 +2985,7 @@ verify_moves(svn_fs_t *fs,
                           APR_ARRAY_IDX(moves, i, svn_sort__item_t).value,
                           pool));
 
-  for (revision = txn_id->revision + 1; revision <= old_rev; ++revision)
+  for (revision = txn->base_rev + 1; revision <= old_rev; ++revision)
     {
       apr_array_header_t *changes;
       change_t **changes_p;
@@ -3040,7 +3037,7 @@ verify_moves(svn_fs_t *fs,
 static svn_error_t *
 write_final_revprop(const char **path,
                     svn_fs_txn_t *txn,
-                    const svn_fs_x__id_part_t *txn_id,
+                    svn_fs_x__txn_id_t txn_id,
                     apr_pool_t *pool)
 {
   apr_hash_t *txnprops;
@@ -3131,7 +3128,7 @@ commit_body(void *baton, apr_pool_t *poo
   apr_file_t *proto_file;
   void *proto_file_lockcookie;
   apr_off_t initial_offset, changed_path_offset;
-  const svn_fs_x__id_part_t *txn_id = svn_fs_x__txn_get_id(cb->txn);
+  svn_fs_x__txn_id_t txn_id = svn_fs_x__txn_get_id(cb->txn);
   apr_hash_t *changed_paths;
 
   /* Get the current youngest revision. */
@@ -3154,7 +3151,7 @@ commit_body(void *baton, apr_pool_t *poo
   SVN_ERR(svn_fs_x__txn_changes_fetch(&changed_paths, cb->fs, txn_id,
                                       pool));
 
-  SVN_ERR(verify_moves(cb->fs, txn_id, old_rev, changed_paths, pool));
+  SVN_ERR(verify_moves(cb->fs, cb->txn, old_rev, changed_paths, pool));
 
   /* We are going to be one better than this puny old revision. */
   new_rev = old_rev + 1;
@@ -3393,12 +3390,12 @@ svn_fs_x__open_txn(svn_fs_txn_t **txn_p,
   fs_txn_data_t *ftd;
   svn_node_kind_t kind;
   transaction_t *local_txn;
-  svn_fs_x__id_part_t txn_id;
+  svn_fs_x__txn_id_t txn_id;
 
-  SVN_ERR(svn_fs_x__id_txn_parse(&txn_id, name));
+  SVN_ERR(svn_fs_x__txn_by_name(&txn_id, name));
 
   /* First check to see if the directory exists. */
-  SVN_ERR(svn_io_check_path(svn_fs_x__path_txn_dir(fs, &txn_id, pool),
+  SVN_ERR(svn_io_check_path(svn_fs_x__path_txn_dir(fs, txn_id, pool),
                             &kind, pool));
 
   /* Did we find it? */
@@ -3415,7 +3412,7 @@ svn_fs_x__open_txn(svn_fs_txn_t **txn_p,
   txn->id = apr_pstrdup(pool, name);
   txn->fs = fs;
 
-  SVN_ERR(svn_fs_x__get_txn(&local_txn, fs, &txn_id, pool));
+  SVN_ERR(svn_fs_x__get_txn(&local_txn, fs, txn_id, pool));
 
   txn->base_rev = svn_fs_x__id_rev(local_txn->base_id);
 
@@ -3450,13 +3447,13 @@ svn_fs_x__delete_node_revision(svn_fs_t 
 
   /* Delete any mutable property representation. */
   if (noderev->prop_rep
-      && svn_fs_x__id_txn_used(&noderev->prop_rep->txn_id))
+      && svn_fs_x__id_txn_used(noderev->prop_rep->txn_id))
     SVN_ERR(svn_io_remove_file2(svn_fs_x__path_txn_node_props(fs, id, pool),
                                 FALSE, pool));
 
   /* Delete any mutable data representation. */
   if (noderev->data_rep
-      && svn_fs_x__id_txn_used(&noderev->data_rep->txn_id)
+      && svn_fs_x__id_txn_used(noderev->data_rep->txn_id)
       && noderev->kind == svn_node_dir)
     {
       fs_x_data_t *ffd = fs->fsap_data;
@@ -3484,7 +3481,7 @@ svn_error_t *
 svn_fs_x__get_txn_ids(const svn_fs_id_t **root_id_p,
                       const svn_fs_id_t **base_root_id_p,
                       svn_fs_t *fs,
-                      const svn_fs_x__id_part_t *txn_id,
+                      svn_fs_x__txn_id_t txn_id,
                       apr_pool_t *pool)
 {
   transaction_t *txn;

Modified: subversion/trunk/subversion/libsvn_fs_x/transaction.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/transaction.h?rev=1567023&r1=1567022&r2=1567023&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/transaction.h (original)
+++ subversion/trunk/subversion/libsvn_fs_x/transaction.h Tue Feb 11 10:09:57 2014
@@ -27,7 +27,7 @@
 
 /* Return the transaction ID of TXN.
  */
-const svn_fs_x__id_part_t *
+svn_fs_x__txn_id_t
 svn_fs_x__txn_get_id(svn_fs_txn_t *txn);
 
 /* Obtain a write lock on the filesystem FS in a subpool of POOL, call
@@ -56,7 +56,7 @@ svn_fs_x__put_node_revision(svn_fs_t *fs
 svn_error_t *
 svn_fs_x__txn_changes_fetch(apr_hash_t **changed_paths_p,
                             svn_fs_t *fs,
-                            const svn_fs_x__id_part_t *txn_id,
+                            svn_fs_x__txn_id_t txn_id,
                             apr_pool_t *pool);
 
 /* Find the paths which were changed in revision REV of filesystem FS
@@ -97,7 +97,7 @@ svn_fs_x__change_txn_props(svn_fs_txn_t 
 svn_error_t *
 svn_fs_x__get_txn(transaction_t **txn_p,
                   svn_fs_t *fs,
-                  const svn_fs_x__id_part_t *txn_id,
+                  svn_fs_x__txn_id_t txn_id,
                   apr_pool_t *pool);
 
 /* Return the next available copy_id in *COPY_ID for the transaction
@@ -105,7 +105,7 @@ svn_fs_x__get_txn(transaction_t **txn_p,
 svn_error_t *
 svn_fs_x__reserve_copy_id(svn_fs_x__id_part_t *copy_id_p,
                           svn_fs_t *fs,
-                          const svn_fs_x__id_part_t *txn_id,
+                          svn_fs_x__txn_id_t txn_id,
                           apr_pool_t *pool);
 
 /* Create an entirely new mutable node in the filesystem FS, whose
@@ -118,7 +118,7 @@ svn_fs_x__create_node(const svn_fs_id_t 
                       svn_fs_t *fs,
                       node_revision_t *noderev,
                       const svn_fs_x__id_part_t *copy_id,
-                      const svn_fs_x__id_part_t *txn_id,
+                      svn_fs_x__txn_id_t txn_id,
                       apr_pool_t *pool);
 
 /* Remove all references to the transaction TXN_ID from filesystem FS.
@@ -139,7 +139,7 @@ svn_fs_x__abort_txn(svn_fs_txn_t *txn,
    KIND.  Allocations are done in POOL. */
 svn_error_t *
 svn_fs_x__set_entry(svn_fs_t *fs,
-                    const svn_fs_x__id_part_t *txn_id,
+                    svn_fs_x__txn_id_t txn_id,
                     node_revision_t *parent_noderev,
                     const char *name,
                     const svn_fs_id_t *id,
@@ -156,7 +156,7 @@ svn_fs_x__set_entry(svn_fs_t *fs,
    from POOL. */
 svn_error_t *
 svn_fs_x__add_change(svn_fs_t *fs,
-                     const svn_fs_x__id_part_t *txn_id,
+                     svn_fs_x__txn_id_t txn_id,
                      const char *path,
                      const svn_fs_id_t *id,
                      svn_fs_path_change_kind_t change_kind,
@@ -196,7 +196,7 @@ svn_fs_x__create_successor(const svn_fs_
                            const svn_fs_id_t *old_idp,
                            node_revision_t *new_noderev,
                            const svn_fs_x__id_part_t *copy_id,
-                           const svn_fs_x__id_part_t *txn_id,
+                           svn_fs_x__txn_id_t txn_id,
                            apr_pool_t *pool);
 
 /* Write a new property list PROPLIST for node-revision NODEREV in
@@ -266,7 +266,7 @@ svn_error_t *
 svn_fs_x__get_txn_ids(const svn_fs_id_t **root_id_p,
                       const svn_fs_id_t **base_root_id_p,
                       svn_fs_t *fs,
-                      const svn_fs_x__id_part_t *txn_name,
+                      svn_fs_x__txn_id_t txn_id,
                       apr_pool_t *pool);
 
 /* Find the value of the property named PROPNAME in transaction TXN.