Greg Stein <gst...@gmail.com> writes: > On May 26, 2011 6:58 AM, <phi...@apache.org> wrote: >> >> @@ -6078,6 +6078,28 @@ op_delete_txn(void *baton, >> || status == svn_wc__db_status_not_present) >> return SVN_NO_ERROR; >> >> + like_arg = construct_like_arg(local_relpath, scratch_pool); >> + >> + SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb, >> + STMT_SELECT_ABSENT_NODES)); >> + SVN_ERR(svn_sqlite__bindf(stmt, "iss", >> + wcroot->wc_id, local_relpath, like_arg)); >> + SVN_ERR(svn_sqlite__step(&have_row, stmt)); >> + if (have_row) > > Maybe switch to a statement that has a LIMIT 1? That's gotta be way easier > on SQLite.
STMT_SELECT_ABSENT_NODES has LIMIT 1. > >> + { >> + const char *absent_path >> + = svn_dirent_local_style(svn_sqlite__column_text(stmt, 0, > scratch_pool), >> + scratch_pool); > > The column fetch can use NULL for the pool. svn_dirent_local_style can return the input path, I'd need to generate the error message before calling svn_sqlite__reset. > >> + >> + return svn_error_createf(SVN_ERR_WC_PATH_UNEXPECTED_STATUS, >> + svn_sqlite__reset(stmt), >> + _("Cannot delete '%s' as '%s'is excluded by > server"), > > Needs a space before "is" Ah, yes. -- Philip