subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From svn-r...@apache.org
Subject svn commit: r1355630 - in /subversion/branches/1.7.x: ./ STATUS subversion/libsvn_wc/status.c
Date Sat, 30 Jun 2012 04:01:56 GMT
Author: svn-role
Date: Sat Jun 30 04:01:54 2012
New Revision: 1355630

URL: http://svn.apache.org/viewvc?rev=1355630&view=rev
Log:
Reintegrate the 1.7.x-r1341012 branch:

 * r1341012, r1341076
   Sort 'svn status' output to avoid randomness in output with APR-1.4.6.
   Justification:
     Sorted output is nicer for users. Some users even perceive random output
     order with APR-1.4.6 as a regression.
   Branch:
     ^/subversion/branches/1.7.x-r1341012
   Votes:
     +1: stsp, gstein, rhuijben

Modified:
    subversion/branches/1.7.x/   (props changed)
    subversion/branches/1.7.x/STATUS
    subversion/branches/1.7.x/subversion/libsvn_wc/status.c

Propchange: subversion/branches/1.7.x/
------------------------------------------------------------------------------
  Merged /subversion/branches/1.7.x-r1341012:r1341013-1355629
  Merged /subversion/trunk:r1341012,1341076

Modified: subversion/branches/1.7.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1355630&r1=1355629&r2=1355630&view=diff
==============================================================================
--- subversion/branches/1.7.x/STATUS (original)
+++ subversion/branches/1.7.x/STATUS Sat Jun 30 04:01:54 2012
@@ -125,16 +125,6 @@ Veto-blocked changes:
 Approved changes:
 =================
 
- * r1341012, r1341076
-   Sort 'svn status' output to avoid randomness in output with APR-1.4.6.
-   Justification:
-     Sorted output is nicer for users. Some users even perceive random output
-     order with APR-1.4.6 as a regression.
-   Branch:
-     ^/subversion/branches/1.7.x-r1341012
-   Votes:
-     +1: stsp, gstein, rhuijben
-
  * 1341031
    Sort output of 'svn proplist' to avoid randomness with APR-1.4.6
    Justification:

Modified: subversion/branches/1.7.x/subversion/libsvn_wc/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_wc/status.c?rev=1355630&r1=1355629&r2=1355630&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_wc/status.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_wc/status.c Sat Jun 30 04:01:54 2012
@@ -41,6 +41,7 @@
 #include "svn_config.h"
 #include "svn_time.h"
 #include "svn_hash.h"
+#include "svn_sorts.h"
 
 #include "svn_private_config.h"
 
@@ -1019,14 +1020,15 @@ get_dir_status(const struct walk_status_
                void *cancel_baton,
                apr_pool_t *scratch_pool)
 {
-  apr_hash_index_t *hi;
   const char *dir_repos_root_url;
   const char *dir_repos_relpath;
   const char *dir_repos_uuid;
   apr_hash_t *dirents, *nodes, *conflicts, *all_children;
   apr_array_header_t *patterns = NULL;
+  apr_array_header_t *sorted_children;
   apr_pool_t *iterpool, *subpool = svn_pool_create(scratch_pool);
   svn_error_t *err;
+  int i;
 
   if (cancel_func)
     SVN_ERR(cancel_func(cancel_baton));
@@ -1125,20 +1127,25 @@ get_dir_status(const struct walk_status_
     }
 
   /* Walk all the children of this directory. */
-  for (hi = apr_hash_first(subpool, all_children); hi; hi = apr_hash_next(hi))
+  sorted_children = svn_sort__hash(all_children,
+                                   svn_sort_compare_items_lexically,
+                                   subpool);
+  for (i = 0; i < sorted_children->nelts; i++)
     {
       const void *key;
       apr_ssize_t klen;
       const char *node_abspath;
       svn_io_dirent2_t *dirent_p;
       const struct svn_wc__db_info_t *info;
+      svn_sort__item_t item;
 
       svn_pool_clear(iterpool);
 
-      apr_hash_this(hi, &key, &klen, NULL);
+      item = APR_ARRAY_IDX(sorted_children, i, svn_sort__item_t);
+      key = item.key;
+      klen = item.klen;
 
       node_abspath = svn_dirent_join(local_abspath, key, iterpool);
-
       dirent_p = apr_hash_get(dirents, key, klen);
 
       info = apr_hash_get(nodes, key, klen);



Mime
View raw message