You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by sv...@apache.org on 2013/06/26 06:00:47 UTC

svn commit: r1496724 - in /subversion/branches/1.8.x: ./ STATUS subversion/libsvn_fs_base/tree.c subversion/libsvn_fs_fs/tree.c

Author: svn-role
Date: Wed Jun 26 04:00:46 2013
New Revision: 1496724

URL: http://svn.apache.org/r1496724
Log:
Merge the r1494913 group from trunk:

 * r1494913, r1494967
   Fix performance regression in 'svn log' on repository roots.
   Justification:
     In 1.8.0, 'svn log' is unusably slow on FSFS repo roots.
     BDB most likely has the same issue.
   Note:
     r1494913 fixes FSFS
     r1494967 fixes BDB
   Votes:
     +1: stefan2, danielsh, stsp

Modified:
    subversion/branches/1.8.x/   (props changed)
    subversion/branches/1.8.x/STATUS
    subversion/branches/1.8.x/subversion/libsvn_fs_base/tree.c
    subversion/branches/1.8.x/subversion/libsvn_fs_fs/tree.c

Propchange: subversion/branches/1.8.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1494913,1494967

Modified: subversion/branches/1.8.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/STATUS?rev=1496724&r1=1496723&r2=1496724&view=diff
==============================================================================
--- subversion/branches/1.8.x/STATUS (original)
+++ subversion/branches/1.8.x/STATUS Wed Jun 26 04:00:46 2013
@@ -160,17 +160,6 @@ Veto-blocked changes:
 Approved changes:
 =================
 
- * r1494913, r1494967
-   Fix performance regression in 'svn log' on repository roots.
-   Justification:
-     In 1.8.0, 'svn log' is unusably slow on FSFS repo roots.
-     BDB most likely has the same issue.
-   Note:
-     r1494913 fixes FSFS
-     r1494967 fixes BDB
-   Votes:
-     +1: stefan2, danielsh, stsp
-
  * r1495428
    Improve BDB error codes.
    Justification:

Modified: subversion/branches/1.8.x/subversion/libsvn_fs_base/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/libsvn_fs_base/tree.c?rev=1496724&r1=1496723&r2=1496724&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/libsvn_fs_base/tree.c (original)
+++ subversion/branches/1.8.x/subversion/libsvn_fs_base/tree.c Wed Jun 26 04:00:46 2013
@@ -4811,6 +4811,13 @@ base_node_origin_rev(svn_revnum_t *revis
      prev_location() does below will work. */
   path = svn_fs__canonicalize_abspath(path, pool);
 
+  /* Special-case the root node (for performance reasons) */
+  if (strcmp(path, "/") == 0)
+    {
+      *revision = 0;
+      return SVN_NO_ERROR;
+    }
+
   /* If we have support for the node-origins table, we'll try to use
      it. */
   if (bfd->format >= SVN_FS_BASE__MIN_NODE_ORIGINS_FORMAT)

Modified: subversion/branches/1.8.x/subversion/libsvn_fs_fs/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/libsvn_fs_fs/tree.c?rev=1496724&r1=1496723&r2=1496724&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/branches/1.8.x/subversion/libsvn_fs_fs/tree.c Wed Jun 26 04:00:46 2013
@@ -3364,6 +3364,14 @@ fs_node_origin_rev(svn_revnum_t *revisio
       return SVN_NO_ERROR;
     }
 
+  /* The root node always has ID 0, created in revision 0 and will never
+     use the new-style ID format. */
+  if (strcmp(node_id, "0") == 0)
+    {
+      *revision = 0;
+      return SVN_NO_ERROR;
+    }
+
   /* OK, it's an old-style ID?  Maybe it's cached. */
   SVN_ERR(svn_fs_fs__get_node_origin(&cached_origin_id,
                                      fs,