Author: philip
Date: Fri Dec 14 13:48:34 2012
New Revision: 1421862

URL: http://svn.apache.org/viewvc?rev=1421862&view=rev
Log:
* subversion/libsvn_wc/wc_db_update_move.c
  (check_shadowed_node): Use a query that handles op-depth rather than
   using C code.

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

Modified: subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c?rev=1421862&r1=1421861&r2=1421862&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c Fri Dec 14 
13:48:34 2012
@@ -232,28 +232,14 @@ check_shadowed_node(svn_boolean_t *is_sh
   svn_boolean_t have_row;
 
   SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
-                                    STMT_SELECT_WORKING_NODE));
-  SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
+                                    STMT_SELECT_LOWEST_WORKING_NODE));
+  SVN_ERR(svn_sqlite__bindf(stmt, "isi", wcroot->wc_id, local_relpath,
+                            expected_op_depth));
   SVN_ERR(svn_sqlite__step(&have_row, stmt));
-
-  while (have_row)
-    {
-      int op_depth = svn_sqlite__column_int(stmt, 0);
-
-      if (op_depth > expected_op_depth)
-        {
-          *is_shadowed = TRUE;
-          SVN_ERR(svn_sqlite__reset(stmt));
-
-          return SVN_NO_ERROR;
-        }
-
-      SVN_ERR(svn_sqlite__step(&have_row, stmt));
-    }
-
-  *is_shadowed = FALSE;
   SVN_ERR(svn_sqlite__reset(stmt));
 
+  *is_shadowed = have_row;
+
   return SVN_NO_ERROR;
 }
 


Reply via email to