You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2011/08/17 23:42:21 UTC

svn commit: r1158924 - /subversion/trunk/subversion/libsvn_wc/adm_ops.c

Author: stsp
Date: Wed Aug 17 21:42:20 2011
New Revision: 1158924

URL: http://svn.apache.org/viewvc?rev=1158924&view=rev
Log:
* subversion/libsvn_wc/adm_ops.c
  (revert_restore): Do not use uninitialised variables if read_info() throws
   a path-not-found error and we are dealing with the revert of a copy.
   Should fix random failures of revert_test 19 on various buildbots.
   (Thanks for testing, danielsh!)

Modified:
    subversion/trunk/subversion/libsvn_wc/adm_ops.c

Modified: subversion/trunk/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_ops.c?rev=1158924&r1=1158923&r2=1158924&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_ops.c Wed Aug 17 21:42:20 2011
@@ -1491,6 +1491,16 @@ revert_restore(svn_wc__db_t *db,
                                                   scratch_pool));
           return SVN_NO_ERROR;
         }
+      else
+        {
+          /* ### Initialise to values which prevent the code below from
+           * ### trying to restore anything to disk.
+           * ### 'status' should be status_unknown but that doesn't exist. */
+          status = svn_wc__db_status_normal;
+          kind = svn_wc__db_kind_unknown;
+          recorded_size = SVN_INVALID_FILESIZE;
+          recorded_mod_time = 0;
+        }
     }
   else if (err)
     return svn_error_trace(err);