subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bre...@apache.org
Subject svn commit: r1482444 - in /subversion/branches/1.8.x: ./ STATUS subversion/svnlook/svnlook.c
Date Tue, 14 May 2013 16:44:31 GMT
Author: breser
Date: Tue May 14 16:44:31 2013
New Revision: 1482444

URL: http://svn.apache.org/r1482444
Log:
Merge r1479896 from trunk:

 * r1479896
   Sort directory entries in output of 'svnlook tree'.
   Justification:
     Unstable APR hash order causes unstable output.
   Votes:
     +1: stsp, rhuijben, danielsh


Modified:
    subversion/branches/1.8.x/   (props changed)
    subversion/branches/1.8.x/STATUS
    subversion/branches/1.8.x/subversion/svnlook/svnlook.c

Propchange: subversion/branches/1.8.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1479896

Modified: subversion/branches/1.8.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/STATUS?rev=1482444&r1=1482443&r2=1482444&view=diff
==============================================================================
--- subversion/branches/1.8.x/STATUS (original)
+++ subversion/branches/1.8.x/STATUS Tue May 14 16:44:31 2013
@@ -85,13 +85,6 @@ Approved changes:
 # blocking issues.  If in doubt see this link for details:
 # http://subversion.apache.org/docs/community-guide/releasing.html#release-stabilization
 
- * r1479896
-   Sort directory entries in output of 'svnlook tree'.
-   Justification:
-     Unstable APR hash order causes unstable output.
-   Votes:
-     +1: stsp, rhuijben, danielsh
-
  * r1482350, r1482354
    If we are going to reroll I would like to reorganize the arguments of the
    new in 1.8 function svn_utf_initialize2() (svn_utf.h) to properly have the

Modified: subversion/branches/1.8.x/subversion/svnlook/svnlook.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/svnlook/svnlook.c?rev=1482444&r1=1482443&r2=1482444&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/svnlook/svnlook.c (original)
+++ subversion/branches/1.8.x/subversion/svnlook/svnlook.c Tue May 14 16:44:31 2013
@@ -47,6 +47,7 @@
 #include "svn_time.h"
 #include "svn_utf.h"
 #include "svn_subst.h"
+#include "svn_sorts.h"
 #include "svn_opt.h"
 #include "svn_props.h"
 #include "svn_diff.h"
@@ -1167,7 +1168,6 @@ print_tree(svn_fs_root_t *root,
 {
   apr_pool_t *subpool;
   apr_hash_t *entries;
-  apr_hash_index_t *hi;
   const char* name;
 
   SVN_ERR(check_cancel(NULL));
@@ -1215,11 +1215,18 @@ print_tree(svn_fs_root_t *root,
   /* Recursively handle the node's children. */
   if (recurse || (indentation == 0))
     {
+      apr_array_header_t *sorted_entries;
+      int i;
+
       SVN_ERR(svn_fs_dir_entries(&entries, root, path, pool));
       subpool = svn_pool_create(pool);
-      for (hi = apr_hash_first(pool, entries); hi; hi = apr_hash_next(hi))
-        {
-          svn_fs_dirent_t *entry = svn__apr_hash_index_val(hi);
+      sorted_entries = svn_sort__hash(entries,
+                                      svn_sort_compare_items_lexically, pool);
+      for (i = 0; i < sorted_entries->nelts; i++)
+        {
+          svn_sort__item_t item = APR_ARRAY_IDX(sorted_entries, i,
+                                                svn_sort__item_t);
+          svn_fs_dirent_t *entry = item.value;
 
           svn_pool_clear(subpool);
           SVN_ERR(print_tree(root,



Mime
View raw message