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 2013/05/12 00:07:36 UTC

svn commit: r1481431 - /subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/cached_data.c

Author: stefan2
Date: Sat May 11 22:07:36 2013
New Revision: 1481431

URL: http://svn.apache.org/r1481431
Log:
On the fsfs-format7 branch: Make access log feature work again.

* subversion/libsvn_fs_fs/cached_data.c
  (dgb__log_access): show sub-item for data in containers as well

Modified:
    subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/cached_data.c

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/cached_data.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/cached_data.c?rev=1481431&r1=1481430&r2=1481431&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/cached_data.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/cached_data.c Sat May 11 22:07:36 2013
@@ -81,7 +81,7 @@ dgb__log_access(svn_fs_t *fs,
   svn_fs_fs__p2l_entry_t *entry = NULL;
   int i;
   static const char *types[] = {"<n/a>", "frep ", "drep ", "fprop", "dprop",
-                                "node ", "chgs ", "rep  "};
+                                "node ", "chgs ", "rep  ", "c:", "n:"};
   const char *description = "";
   const char *type = types[item_type];
   const char *pack = "";
@@ -150,22 +150,18 @@ dgb__log_access(svn_fs_t *fs,
   if (ffd->format >= SVN_FS_FS__MIN_LOG_ADDRESSING_FORMAT)
     {
       /* reverse index lookup: get item description in ENTRY */
-      SVN_ERR(svn_fs_fs__p2l_index_lookup(&entries, fs, revision, offset,
+      SVN_ERR(svn_fs_fs__p2l_entry_lookup(&entry, fs, revision, offset,
                                           scratch_pool));
-      for (i = 0; !entry && i < entries->nelts; ++i)
-        {
-          svn_fs_fs__p2l_entry_t *current
-            = &APR_ARRAY_IDX(entries, i, svn_fs_fs__p2l_entry_t);
-          if (   current->revision == revision
-              && current->item_index == item_index)
-            entry = current;
-        }
-
       if (entry)
         {
           /* more details */
           end_offset = offset + entry->size;
           type = types[entry->type];
+
+          /* merge the sub-item number with the container type */
+          if (   entry->type == SVN_FS_FS__ITEM_TYPE_CHANGES_CONT
+              || entry->type == SVN_FS_FS__ITEM_TYPE_NODEREVS_CONT)
+            type = apr_psprintf(scratch_pool, "%s%-3d", type, sub_item);
         }
 
       /* line output */