On Mar 14, 2011 5:24 PM, <stsp_at_apache.org> wrote:
>
> Author: stsp
> Date: Mon Mar 14 17:24:05 2011
> New Revision: 1081484
>
> URL: http://svn.apache.org/viewvc?rev=1081484&view=rev
> Log:
> In the revision status code, use a query to determine whether property
> modifications are present in the WC, instead of calling
> svn_wc__props_modified() from wc_db.c.
>
> Suggested by: rhuijben
>
> * subversion/libsvn_wc/wc-queries.sql
> (STMT_SELECT_NODES_WITH_PROP_MODIFICATIONS): New query.
>
> * subversion/libsvn_wc/wc_db.c
> (has_local_mods): Use the new query instead of svn_wc__props_modified().
>
> Modified:
> subversion/trunk/subversion/libsvn_wc/wc-queries.sql
> subversion/trunk/subversion/libsvn_wc/wc_db.c
>
> Modified: subversion/trunk/subversion/libsvn_wc/wc-queries.sql
> URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc-queries.sql?rev=1081484&r1=1081483&r2=1081484&view=diff
>
==============================================================================
> --- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original)
> +++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Mon Mar 14
17:24:05 2011
> @@ -910,6 +910,11 @@ WHERE wc_id = ?1 AND (local_relpath = ?2
> presence = 'base-deleted')
> AND file_external IS NULL;
>
> +-- STMT_SELECT_NODES_WITH_PROP_MODIFICATIONS
> +SELECT local_relpath FROM actual_node
> +WHERE wc_id = ?1 AND (local_relpath = ?2 OR local_relpath LIKE ?3 ESCAPE
'#')
> + AND properties IS NOT NULL;
This looks like you're searching for *children* of the target node. Why?
> +
> /* This query expects repos_path(wcroot)/% as arg 4,
> and repos_path(wcroot), with a slash appended unless the path is empty,
> as arg 5. */
>
> Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
> URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1081484&r1=1081483&r2=1081484&view=diff
>
==============================================================================
> --- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
> +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Mon Mar 14 17:24:05 2011
> @@ -9523,9 +9523,27 @@ has_local_mods(svn_boolean_t *is_modifie
>
> if (! *is_modified)
> {
> + /* Check for property modifications. */
> + SVN_ERR(svn_sqlite__get_statement(
> + &stmt, wcroot->sdb,
> + STMT_SELECT_NODES_WITH_PROP_MODIFICATIONS));
> + SVN_ERR(svn_sqlite__bindf(stmt, "iss", wcroot->wc_id,
local_relpath,
> + construct_like_arg(local_relpath,
> + scratch_pool)));
> + /* If this query returns a row, the working copy is modified. */
> + SVN_ERR(svn_sqlite__step(&have_row, stmt));
> + *is_modified = have_row;
Why use 'have_row' at all? Why not pass is_modified directly?
Cheers,
-g
Received on 2011-03-26 14:52:19 CET