subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1451169 - /subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/pack.c
Date Thu, 28 Feb 2013 10:37:57 GMT
Author: stefan2
Date: Thu Feb 28 10:37:56 2013
New Revision: 1451169

URL: http://svn.apache.org/r1451169
Log:
On the fsfs-format7 branch:  Since "trunk" is usually the one receiving
the most commits (even if it's only merges from other branches).

* subversion/libsvn_fs_fs/pack.c
  (compare_dir_entries_format7): being the now first in the list, "trunk"
   is now most likely to find all its data in one place and branches to
   diff against just this one place.

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

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/pack.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/pack.c?rev=1451169&r1=1451168&r2=1451169&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/pack.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/pack.c Thu Feb 28 10:37:56 2013
@@ -527,10 +527,12 @@ copy_rep_to_temp(pack_context_t *context
   return SVN_NO_ERROR;
 }
 
-/* Directories first, dirs / files sorted by name.  This maximizes the
- * chance of two items being located close to one another in *all* pack
- * files independent of their change order.  It also groups multi-project
- * repos nicely according to their sub-projects.
+/* Directories first, dirs / files sorted by name in reverse lexical order.
+ * This maximizes the chance of two items being located close to one another
+ * in *all* pack files independent of their change order.  It also groups
+ * multi-project repos nicely according to their sub-projects.  The reverse
+ * order aspect gives "trunk" preference over "tags" and "branches", so
+ * trunk-related items are more likely to be contiguous.
  */
 static int
 compare_dir_entries_format7(const svn_sort__item_t *a,
@@ -542,7 +544,7 @@ compare_dir_entries_format7(const svn_so
   if (lhs->kind != rhs->kind)
     return lhs->kind == svn_node_dir ? -1 : 1;
 
-  return strcmp(lhs->name, rhs->name);
+  return 0 - strcmp(lhs->name, rhs->name);
 }
 
 /* Directories entries sorted by revision (decreasing - to max cache hits)



Mime
View raw message