Author: stsp Date: Fri Jul 29 16:28:11 2011 New Revision: 1152294 URL: http://svn.apache.org/viewvc?rev=1152294&view=rev Log: * subversion/libsvn_wc/wc_db.c (op_delete_txn): Add a debug assertion that fails if a move has been recorded incorrectly.
Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1152294&r1=1152293&r2=1152294&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_wc/wc_db.c (original) +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri Jul 29 16:28:11 2011 @@ -6134,6 +6134,15 @@ op_delete_txn(void *baton, &child_moved_from_relpath, NULL, wcroot, moved_here_child_relpath, iterpool, iterpool)); +#if SVN_DEBUG + /* This catches incorrectly recorded moves. + * It is possible to hit this during normal operation + * if a move was interrupted mid-way so only perform + * this check in debug mode. */ + SVN_ERR_ASSERT(moved_from_relpath && + !strcmp(child_moved_from_relpath, + svn_sqlite__column_text(stmt, 1, NULL))); +#endif if (child_status == svn_wc__db_status_moved_here) { const char *child_subtree_relpath;