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 2012/12/13 18:44:38 UTC
svn commit: r1421405 -
/subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c
Author: stsp
Date: Thu Dec 13 17:44:37 2012
New Revision: 1421405
URL: http://svn.apache.org/viewvc?rev=1421405&view=rev
Log:
* subversion/libsvn_wc/wc_db_update_move.c
(check_shadowed_node): Move further up in the file so we can get rid of
a forward declaration of this function. No functional change.
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=1421405&r1=1421404&r2=1421405&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c Thu Dec 13 17:44:37 2012
@@ -220,12 +220,43 @@ update_working_props(svn_wc_notify_state
}
-/* ### forward declaration */
+/* Check whether the node at LOCAL_RELPATH in the working copy at WCROOT
+ * is shadowed by some node at a higher op depth than EXPECTED_OP_DEPTH. */
static svn_error_t *
check_shadowed_node(svn_boolean_t *is_shadowed,
int expected_op_depth,
const char *local_relpath,
- svn_wc__db_wcroot_t *wcroot);
+ svn_wc__db_wcroot_t *wcroot)
+{
+ svn_sqlite__stmt_t *stmt;
+ 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));
+ 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));
+
+ return SVN_NO_ERROR;
+}
+
static svn_error_t *
tc_editor_alter_directory(void *baton,
@@ -323,43 +354,6 @@ tc_editor_alter_directory(void *baton,
}
-/* Check whether the node at LOCAL_RELPATH in the working copy at WCROOT
- * is shadowed by some node at a higher op depth than EXPECTED_OP_DEPTH. */
-static svn_error_t *
-check_shadowed_node(svn_boolean_t *is_shadowed,
- int expected_op_depth,
- const char *local_relpath,
- svn_wc__db_wcroot_t *wcroot)
-{
- svn_sqlite__stmt_t *stmt;
- 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));
- 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));
-
- return SVN_NO_ERROR;
-}
-
/* Merge the difference between OLD_VERSION and NEW_VERSION into
* the working file at LOCAL_RELPATH.
*