[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1127864 - in /subversion/trunk/subversion: libsvn_wc/adm_ops.c libsvn_wc/wc_db.c tests/cmdline/authz_tests.py

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Thu, 26 May 2011 14:13:52 +0100

Greg Stein <gstein_at_gmail.com> writes:

> On May 26, 2011 6:58 AM, <philip_at_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
Received on 2011-05-26 15:14:36 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.