subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From svn-r...@apache.org
Subject svn commit: r1330648 - in /subversion/branches/1.7.x: ./ STATUS subversion/libsvn_wc/wc_db.c
Date Thu, 26 Apr 2012 04:02:02 GMT
Author: svn-role
Date: Thu Apr 26 04:02:02 2012
New Revision: 1330648

URL: http://svn.apache.org/viewvc?rev=1330648&view=rev
Log:
Merge the r1328846 group from trunk:

 * r1328846, r1328847, r1328852
   Reset some sqlite statements before returning.
   Justification:
     This avoids a bug in sqlite 3.7.11  and might fix problems for third
     party api users that call this function multiple times.
   Notes:
     r1328846 and r1328852 are the actual fix.
     r1328847 avoids fixes (and introduces) some whitepace inconsistencies.
   Votes:
     +1: rhuijben, danielsh, stsp

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

Propchange: subversion/branches/1.7.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1328846-1328847,1328852

Modified: subversion/branches/1.7.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1330648&r1=1330647&r2=1330648&view=diff
==============================================================================
--- subversion/branches/1.7.x/STATUS (original)
+++ subversion/branches/1.7.x/STATUS Thu Apr 26 04:02:02 2012
@@ -135,17 +135,6 @@ Veto-blocked changes:
 Approved changes:
 =================
 
- * r1328846, r1328847, r1328852
-   Reset some sqlite statements before returning.
-   Justification:
-     This avoids a bug in sqlite 3.7.11  and might fix problems for third
-     party api users that call this function multiple times.
-   Notes:
-     r1328846 and r1328852 are the actual fix.
-     r1328847 avoids fixes (and introduces) some whitepace inconsistencies.
-   Votes:
-     +1: rhuijben, danielsh, stsp
-
  * r1330258
    Fix issue #4161 "Assertion failed with svn diff -r BASE:HEAD ^/trunk"
    Justification:

Modified: subversion/branches/1.7.x/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_wc/wc_db.c?rev=1330648&r1=1330647&r2=1330648&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_wc/wc_db.c Thu Apr 26 04:02:02 2012
@@ -392,7 +392,7 @@ wclock_owns_lock(svn_boolean_t *own_lock
                  apr_pool_t *scratch_pool);
 
 
-
+ 
 /* Return the absolute path, in local path style, of LOCAL_RELPATH
    in WCROOT.  */
 static const char *
@@ -11684,35 +11684,25 @@ get_min_max_revisions(svn_revnum_t *min_
                       apr_pool_t *scratch_pool)
 {
   svn_sqlite__stmt_t *stmt;
-  svn_boolean_t have_row;
   svn_revnum_t min_rev, max_rev;
 
   SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
                                     STMT_SELECT_MIN_MAX_REVISIONS));
   SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
-  SVN_ERR(svn_sqlite__step(&have_row, stmt));
-  if (have_row)
+  SVN_ERR(svn_sqlite__step_row(stmt));
+
+  if (committed)
     {
-      if (committed)
-        {
-          min_rev = svn_sqlite__column_revnum(stmt, 2);
-          max_rev = svn_sqlite__column_revnum(stmt, 3);
-        }
-      else
-        {
-          min_rev = svn_sqlite__column_revnum(stmt, 0);
-          max_rev = svn_sqlite__column_revnum(stmt, 1);
-        }
+      min_rev = svn_sqlite__column_revnum(stmt, 2);
+      max_rev = svn_sqlite__column_revnum(stmt, 3);
     }
   else
     {
-      min_rev = SVN_INVALID_REVNUM;
-      max_rev = SVN_INVALID_REVNUM;
+      min_rev = svn_sqlite__column_revnum(stmt, 0);
+      max_rev = svn_sqlite__column_revnum(stmt, 1);
     }
 
-  /* The statement should only return at most one row. */
-  SVN_ERR(svn_sqlite__step(&have_row, stmt));
-  SVN_ERR_ASSERT(! have_row);
+  /* The statement returns exactly one row. */
   SVN_ERR(svn_sqlite__reset(stmt));
 
   if (min_revision)
@@ -12006,9 +11996,16 @@ has_local_mods(svn_boolean_t *is_modifie
           svn_filesize_t recorded_size;
           apr_time_t recorded_mod_time;
           svn_boolean_t skip_check = FALSE;
+          svn_error_t *err;
 
           if (cancel_func)
-            SVN_ERR(cancel_func(cancel_baton));
+            {
+              err = cancel_func(cancel_baton);
+              if (err)
+                return svn_error_trace(svn_error_compose_create(
+                                                    err,
+                                                    svn_sqlite__reset(stmt)));
+            }
 
           svn_pool_clear(iterpool);
 
@@ -12025,8 +12022,12 @@ has_local_mods(svn_boolean_t *is_modifie
             {
               const svn_io_dirent2_t *dirent;
 
-              SVN_ERR(svn_io_stat_dirent(&dirent, node_abspath, TRUE,
-                                         iterpool, iterpool));
+              err = svn_io_stat_dirent(&dirent, node_abspath, TRUE,
+                                       iterpool, iterpool);
+              if (err)
+                return svn_error_trace(svn_error_compose_create(
+                                                    err,
+                                                    svn_sqlite__reset(stmt)));
 
               if (dirent->kind != svn_node_file)
                 {
@@ -12043,9 +12044,15 @@ has_local_mods(svn_boolean_t *is_modifie
 
           if (! skip_check)
             {
-              SVN_ERR(svn_wc__internal_file_modified_p(is_modified,
-                                                       db, node_abspath,
-                                                       FALSE, iterpool));
+              err = svn_wc__internal_file_modified_p(is_modified,
+                                                     db, node_abspath,
+                                                     FALSE, iterpool);
+
+              if (err)
+                return svn_error_trace(svn_error_compose_create(
+                                                    err,
+                                                    svn_sqlite__reset(stmt)));
+
               if (*is_modified)
                 break;
             }



Mime
View raw message