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/12/17 10:35:03 UTC

svn commit: r1646183 - in /subversion/branches/fsx-id/subversion/libsvn_fs_x: dag.c transaction.c transaction.h

Author: stefan2
Date: Wed Dec 17 09:35:03 2014
New Revision: 1646183

URL: http://svn.apache.org/r1646183
Log:
On the fsx-id branch:

* subversion/libsvn_fs_x/transaction.h
  (svn_fs_x__set_contents): Require a previously optional COPY_ID parameter.

* subversion/libsvn_fs_x/transaction.c
  (svn_fs_x__create_successor): Simplify as COPY_ID is now always given,
                                NODE_ID does never change and the NODEREV_ID
                                can be constructed directly.

* subversion/libsvn_fs_x/dag.c
  (svn_fs_x__dag_clone_child): Always provide the COPY_ID.

Modified:
    subversion/branches/fsx-id/subversion/libsvn_fs_x/dag.c
    subversion/branches/fsx-id/subversion/libsvn_fs_x/transaction.c
    subversion/branches/fsx-id/subversion/libsvn_fs_x/transaction.h

Modified: subversion/branches/fsx-id/subversion/libsvn_fs_x/dag.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-id/subversion/libsvn_fs_x/dag.c?rev=1646183&r1=1646182&r2=1646183&view=diff
==============================================================================
--- subversion/branches/fsx-id/subversion/libsvn_fs_x/dag.c (original)
+++ subversion/branches/fsx-id/subversion/libsvn_fs_x/dag.c Wed Dec 17 09:35:03 2014
@@ -771,6 +771,9 @@ svn_fs_x__dag_clone_child(dag_node_t **c
         noderev->predecessor_count++;
       noderev->created_path = svn_fspath__join(parent_path, name, pool);
 
+      if (copy_id == NULL)
+        copy_id = &noderev->copy_id;
+
       SVN_ERR(svn_fs_x__create_successor(&new_node_id, fs,
                                          noderev, copy_id, txn_id, pool));
 

Modified: subversion/branches/fsx-id/subversion/libsvn_fs_x/transaction.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-id/subversion/libsvn_fs_x/transaction.c?rev=1646183&r1=1646182&r2=1646183&view=diff
==============================================================================
--- subversion/branches/fsx-id/subversion/libsvn_fs_x/transaction.c (original)
+++ subversion/branches/fsx-id/subversion/libsvn_fs_x/transaction.c Wed Dec 17 09:35:03 2014
@@ -2465,22 +2465,13 @@ svn_fs_x__create_successor(const svn_fs_
                            svn_fs_x__txn_id_t txn_id,
                            apr_pool_t *pool)
 {
-  const svn_fs_id_t *id;
-  apr_uint64_t number;
-  const svn_fs_x__id_part_t *node_id
-    = svn_fs_x__id_node_id(new_noderev->predecessor_id);
-
-  if (! copy_id)
-    copy_id = svn_fs_x__id_copy_id(new_noderev->predecessor_id);
-
-  SVN_ERR(allocate_item_index(&number, fs, txn_id, pool));
-  id = svn_fs_x__id_txn_create(node_id, copy_id, txn_id, number, pool);
-
-  new_noderev->id = id;
-  new_noderev->noderev_id = *svn_fs_x__id_noderev_id(id);
-  new_noderev->node_id = *node_id;
   new_noderev->copy_id = *copy_id;
+  new_noderev->noderev_id.change_set = svn_fs_x__change_set_by_txn(txn_id);
+  SVN_ERR(allocate_item_index(&new_noderev->noderev_id.number, fs, txn_id,
+                              pool));
 
+  new_noderev->id = svn_fs_x__id_create(&new_noderev->node_id, copy_id,
+                                        &new_noderev->noderev_id, pool);
   if (! new_noderev->copyroot_path)
     {
       new_noderev->copyroot_path
@@ -2491,7 +2482,7 @@ svn_fs_x__create_successor(const svn_fs_
 
   SVN_ERR(svn_fs_x__put_node_revision(fs, new_noderev, FALSE, pool));
 
-  *new_id_p = id;
+  *new_id_p = new_noderev->id;
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/fsx-id/subversion/libsvn_fs_x/transaction.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-id/subversion/libsvn_fs_x/transaction.h?rev=1646183&r1=1646182&r2=1646183&view=diff
==============================================================================
--- subversion/branches/fsx-id/subversion/libsvn_fs_x/transaction.h (original)
+++ subversion/branches/fsx-id/subversion/libsvn_fs_x/transaction.h Wed Dec 17 09:35:03 2014
@@ -212,10 +212,9 @@ svn_fs_x__set_contents(svn_stream_t **st
    NEW_NODEREV's predecessor.  Set *NEW_ID_P to the new node
    revision's ID.  Use POOL for any temporary allocation.
 
-   COPY_ID, if non-NULL, is a key into the `copies' table, and
+   COPY_ID, is a key into the `copies' table, and
    indicates that this new node is being created as the result of a
-   copy operation, and specifically which operation that was.  If
-   COPY_ID is NULL, then re-use the copy ID from the predecessor node.
+   copy operation, and specifically which operation that was.
 
    TXN_ID is the Subversion transaction under which this occurs.