You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/10/20 20:40:36 UTC

svn commit: r1025668 - in /subversion/trunk: ./ subversion/libsvn_subr/io.c

Author: hwright
Date: Wed Oct 20 18:40:36 2010
New Revision: 1025668

URL: http://svn.apache.org/viewvc?rev=1025668&view=rev
Log:
Merge r1025660 from the performance branch, addressing some of the issues
raised by the merge of r985472 in r1022707.

Modified:
    subversion/trunk/   (props changed)
    subversion/trunk/subversion/libsvn_subr/io.c

Propchange: subversion/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Oct 20 18:40:36 2010
@@ -23,7 +23,7 @@
 /subversion/branches/log-g-performance:870941-871032
 /subversion/branches/merge-skips-obstructions:874525-874615
 /subversion/branches/nfc-nfd-aware-client:870276,870376
-/subversion/branches/performance:982355,983764,983766,984927,985014,985037,985046,985472,985477,985669,987888,987893,995507,995603,1001413
+/subversion/branches/performance:982355,983764,983766,984927,985014,985037,985046,985472,985477,985669,987888,987893,995507,995603,1001413,1025660
 /subversion/branches/ra_serf-digest-authn:875693-876404
 /subversion/branches/reintegrate-improvements:873853-874164
 /subversion/branches/subtree-mergeinfo:876734-878766

Modified: subversion/trunk/subversion/libsvn_subr/io.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/io.c?rev=1025668&r1=1025667&r2=1025668&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/io.c (original)
+++ subversion/trunk/subversion/libsvn_subr/io.c Wed Oct 20 18:40:36 2010
@@ -378,11 +378,6 @@ svn_io_open_uniquely_named(apr_file_t **
       if (delete_when == svn_io_file_del_on_close)
         flag |= APR_DELONCLOSE;
 
-      /* Increase the chance that rand() will return something truely
-         independent from what others get or do. */
-      if (i == 2)
-        srand(apr_time_now());
-
       /* Special case the first attempt -- if we can avoid having a
          generated numeric portion at all, that's best.  So first we
          try with just the suffix; then future tries add a number
@@ -393,16 +388,11 @@ svn_io_open_uniquely_named(apr_file_t **
          This is good, since "1" would misleadingly imply that
          the second attempt was actually the first... and if someone's
          got conflicts on their conflicts, we probably don't want to
-         add to their confusion :-). 
-
-         Also, the randomization used to minimize the number of re-try 
-         cycles will interfere with certain tests that compare working
-         copies etc.
-       */
+         add to their confusion :-). */
       if (i == 1)
         unique_name = apr_psprintf(scratch_pool, "%s%s", path, suffix);
       else
-        unique_name = apr_psprintf(scratch_pool, "%s.%u_%x%s", path, i, rand(), suffix);
+        unique_name = apr_psprintf(scratch_pool, "%s.%u_%s", path, i, suffix);
 
       /* Hmmm.  Ideally, we would append to a native-encoding buf
          before starting iteration, then convert back to UTF-8 for