subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From svn-r...@apache.org
Subject svn commit: r1355699 - in /subversion/branches/1.7.x: ./ STATUS subversion/svn/propget-cmd.c
Date Sat, 30 Jun 2012 11:14:56 GMT
Author: svn-role
Date: Sat Jun 30 11:14:56 2012
New Revision: 1355699

URL: http://svn.apache.org/viewvc?rev=1355699&view=rev
Log:
Merge r1341034 from trunk:

 * r1341034
   Sort output of 'svn propget -R' to avoid randomness 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.
   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/svn/propget-cmd.c

Propchange: subversion/branches/1.7.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1341034

Modified: subversion/branches/1.7.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1355699&r1=1355698&r2=1355699&view=diff
==============================================================================
--- subversion/branches/1.7.x/STATUS (original)
+++ subversion/branches/1.7.x/STATUS Sat Jun 30 11:14:56 2012
@@ -125,14 +125,6 @@ Veto-blocked changes:
 Approved changes:
 =================
 
- * r1341034
-   Sort output of 'svn propget -R' to avoid randomness 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.
-   Votes:
-     +1: stsp, gstein, rhuijben
-
  * r1349778
    For issue #3962, fix example output of 'svn status' shown in 'svn
    help status'.

Modified: subversion/branches/1.7.x/subversion/svn/propget-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/svn/propget-cmd.c?rev=1355699&r1=1355698&r2=1355699&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/svn/propget-cmd.c (original)
+++ subversion/branches/1.7.x/subversion/svn/propget-cmd.c Sat Jun 30 11:14:56 2012
@@ -34,6 +34,7 @@
 #include "svn_error_codes.h"
 #include "svn_error.h"
 #include "svn_utf.h"
+#include "svn_sorts.h"
 #include "svn_subst.h"
 #include "svn_dirent_uri.h"
 #include "svn_path.h"
@@ -71,13 +72,16 @@ print_properties_xml(const char *pname,
                      apr_hash_t *props,
                      apr_pool_t *pool)
 {
-  apr_hash_index_t *hi;
+  apr_array_header_t *sorted_props;
+  int i;
   apr_pool_t *iterpool = svn_pool_create(pool);
 
-  for (hi = apr_hash_first(pool, props); hi; hi = apr_hash_next(hi))
+  sorted_props = svn_sort__hash(props, svn_sort_compare_items_as_paths, pool);
+  for (i = 0; i < sorted_props->nelts; i++)
     {
-      const char *filename = svn__apr_hash_index_key(hi);
-      svn_string_t *propval = svn__apr_hash_index_val(hi);
+      svn_sort__item_t item = APR_ARRAY_IDX(sorted_props, i, svn_sort__item_t);
+      const char *filename = item.key;
+      svn_string_t *propval = item.value;
       svn_stringbuf_t *sb = NULL;
 
       svn_pool_clear(iterpool);
@@ -115,16 +119,19 @@ print_properties(svn_stream_t *out,
                  svn_boolean_t like_proplist,
                  apr_pool_t *pool)
 {
-  apr_hash_index_t *hi;
+  apr_array_header_t *sorted_props;
+  int i;
   apr_pool_t *iterpool = svn_pool_create(pool);
   const char *path_prefix;
 
   SVN_ERR(svn_dirent_get_absolute(&path_prefix, "", pool));
 
-  for (hi = apr_hash_first(pool, props); hi; hi = apr_hash_next(hi))
+  sorted_props = svn_sort__hash(props, svn_sort_compare_items_as_paths, pool);
+  for (i = 0; i < sorted_props->nelts; i++)
     {
-      const char *filename = svn__apr_hash_index_key(hi);
-      svn_string_t *propval = svn__apr_hash_index_val(hi);
+      svn_sort__item_t item = APR_ARRAY_IDX(sorted_props, i, svn_sort__item_t);
+      const char *filename = item.key;
+      svn_string_t *propval = item.value;
 
       svn_pool_clear(iterpool);
 



Mime
View raw message