You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2011/05/16 02:18:26 UTC
svn commit: r1103583 - /subversion/trunk/subversion/libsvn_wc/wc_db.c
Author: hwright
Date: Mon May 16 00:18:26 2011
New Revision: 1103583
URL: http://svn.apache.org/viewvc?rev=1103583&view=rev
Log:
Minor optimization in the changelist setting code: don't bother to vacuum the
actual nodes table if we aren't deleting changelists.
* subversion/libsvn_wc/wc_db.c
(set_changelist_txn): Only run the delete on the ACTUAL table if removing
changelists.
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=1103583&r1=1103582&r2=1103583&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Mon May 16 00:18:26 2011
@@ -5090,11 +5090,15 @@ set_changelist_txn(void *baton,
SVN_ERR(svn_sqlite__step_done(stmt));
}
- /* We may have left empty ACTUAL nodes, so remove it. */
- SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
- STMT_DELETE_ACTUAL_EMPTIES));
- SVN_ERR(svn_sqlite__bind_int64(stmt, 1, wcroot->wc_id));
- SVN_ERR(svn_sqlite__step_done(stmt));
+ /* We may have left empty ACTUAL nodes, so remove them. This is only a
+ potential problem if we removed changelists. */
+ if (!scb->new_changelist)
+ {
+ SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
+ STMT_DELETE_ACTUAL_EMPTIES));
+ SVN_ERR(svn_sqlite__bind_int64(stmt, 1, wcroot->wc_id));
+ SVN_ERR(svn_sqlite__step_done(stmt));
+ }
/* Drop the targets tree table. */
SVN_ERR(svn_sqlite__exec_statements(wcroot->sdb, STMT_DROP_TARGETS_LIST));