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 2015/03/16 19:28:39 UTC

svn commit: r1667101 - in /subversion/trunk/subversion: libsvn_fs_fs/tree.c libsvn_fs_x/tree.c

Author: stefan2
Date: Mon Mar 16 18:28:38 2015
New Revision: 1667101

URL: http://svn.apache.org/r1667101
Log:
Follow-up to r1665894:  Don't falsly report transaction roots noderevs
to be the same as the root noderev of their base revision.

* subversion/libsvn_fs_fs/tree.c
  (fs_node_relation): As it turns out, txn root objects report their base
                      revisions instead of "-1" in REV.

* subversion/libsvn_fs_x/tree.c
  (x_node_relation): Same.

Modified:
    subversion/trunk/subversion/libsvn_fs_fs/tree.c
    subversion/trunk/subversion/libsvn_fs_x/tree.c

Modified: subversion/trunk/subversion/libsvn_fs_fs/tree.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/tree.c?rev=1667101&r1=1667100&r2=1667101&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/tree.c Mon Mar 16 18:28:38 2015
@@ -1353,7 +1353,10 @@ fs_node_relation(svn_fs_node_relation_t
    * direct the relation is. */
   if (a_is_root_dir && b_is_root_dir)
     {
-      *relation = ((root_a->rev == root_b->rev) && !different_txn)
+      /* For txn roots, root->REV is the base revision of that TXN. */
+      *relation = (   (root_a->rev == root_b->rev)
+                   && (root_a->is_txn_root == root_b->is_txn_root)
+                   && !different_txn)
                 ? svn_fs_node_same
                 : svn_fs_node_common_ancestor;
       return SVN_NO_ERROR;

Modified: subversion/trunk/subversion/libsvn_fs_x/tree.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/tree.c?rev=1667101&r1=1667100&r2=1667101&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/tree.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/tree.c Mon Mar 16 18:28:38 2015
@@ -1350,7 +1350,10 @@ x_node_relation(svn_fs_node_relation_t *
         = root_a->is_txn_root && root_b->is_txn_root
             && strcmp(root_a->txn, root_b->txn);
 
-      *relation = ((root_a->rev == root_b->rev) && !different_txn)
+      /* For txn roots, root->REV is the base revision of that TXN. */
+      *relation = (   (root_a->rev == root_b->rev)
+                   && (root_a->is_txn_root == root_b->is_txn_root)
+                   && !different_txn)
                 ? svn_fs_node_same
                 : svn_fs_node_common_ancestor;
       return SVN_NO_ERROR;