You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Bert Huijben <be...@qqmail.nl> on 2010/10/28 15:26:36 UTC

RE: svn commit: r1028316 - in /subversion/trunk/subversion: libsvn_wc/wc-queries.sql libsvn_wc/wc_db.c tests/cmdline/copy_tests.py


> -----Original Message-----
> From: philip@apache.org [mailto:philip@apache.org]
> Sent: donderdag 28 oktober 2010 16:27
> To: commits@subversion.apache.org
> Subject: svn commit: r1028316 - in /subversion/trunk/subversion:
> libsvn_wc/wc-queries.sql libsvn_wc/wc_db.c tests/cmdline/copy_tests.py
> 
> Author: philip
> Date: Thu Oct 28 14:26:36 2010
> New Revision: 1028316
> 
> URL: http://svn.apache.org/viewvc?rev=1028316&view=rev
> Log:
> Fix XFAILing copy_tests.py 92.
> 
> * subversion/libsvn_wc/wc-queries.sql
>   (STMT_DELETE_NOT_PRESENT_NODES_RECURSIVE): New.
> 
> * subversion/libsvn_wc/wc_db.c
>   (db_working_update_presence): Remove not-present sub-trees when
>    switching to base-deleted.
> 
> * subversion/tests/cmdline/copy_tests.py
>   (test_list): Mark delete_replace_delete PASS.
> 
> Modified:
>     subversion/trunk/subversion/libsvn_wc/wc-queries.sql
>     subversion/trunk/subversion/libsvn_wc/wc_db.c
>     subversion/trunk/subversion/tests/cmdline/copy_tests.py
> 
> Modified: subversion/trunk/subversion/libsvn_wc/wc-queries.sql
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc-
> queries.sql?rev=1028316&r1=1028315&r2=1028316&view=diff
> =======================================================================
> =======
> --- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original)
> +++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Thu Oct 28
> 14:26:36 2010
> @@ -307,6 +307,11 @@ DELETE FROM actual_node
>  WHERE wc_id = ?1 AND local_relpath = ?2
>        AND changelist IS NULL;
> 
> +-- STMT_DELETE_NOT_PRESENT_NODES_RECURSIVE
> +DELETE FROM nodes
> +WHERE wc_id = ?1 AND local_relpath LIKE ?2 ESCAPE '#'
> +  AND presence = 'not-present';

This also deletes not-present nodes from all lower layers. I don't think that this is the behavior you want.

If you delete some mixed revision BASE tree (op_depth 0) with some not-present leaves, then replace that with some WORKING tree (op_depth > 0) of a copy from somewhere else and then later delete this new WORKING tree, you would also delete the not-present markers at op_depth 0, which have a different function then not-present in higher layers.

I think this query needs a op_depth >= ?3 check, or a similar safeguard.

	Bert

> +
>  -- STMT_CLEAR_ACTUAL_NODE_LEAVING_CHANGELIST
>  UPDATE actual_node
>  SET properties = NULL,
> 
> Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_d
> b.c?rev=1028316&r1=1028315&r2=1028316&view=diff
> =======================================================================
> =======
> --- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
> +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Thu Oct 28 14:26:36
> 2010
> @@ -4471,6 +4471,16 @@ db_working_update_presence(svn_wc__db_st
>                              presence_map, status));
>    SVN_ERR(svn_sqlite__step_done(stmt));
> 
> +  if (status == svn_wc__db_status_base_deleted)
> +    {
> +      SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
> +
> STMT_DELETE_NOT_PRESENT_NODES_RECURSIVE));
> +      SVN_ERR(svn_sqlite__bindf(stmt, "is", pdh->wcroot->wc_id,
> +                                construct_like_arg(local_relpath,
> +                                                   scratch_pool)));
> +      SVN_ERR(svn_sqlite__step_done(stmt));
> +    }
> +
>    return SVN_NO_ERROR;
>  }
> 
> 
> Modified: subversion/trunk/subversion/tests/cmdline/copy_tests.py
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/
> copy_tests.py?rev=1028316&r1=1028315&r2=1028316&view=diff
> =======================================================================
> =======
> --- subversion/trunk/subversion/tests/cmdline/copy_tests.py (original)
> +++ subversion/trunk/subversion/tests/cmdline/copy_tests.py Thu Oct 28
> 14:26:36 2010
> @@ -4935,7 +4935,7 @@ test_list = [ None,
>                XFail(mixed_rev_copy_del),
>                XFail(copy_delete_delete),
>                XFail(copy_delete_revert),
> -              XFail(delete_replace_delete),
> +              delete_replace_delete,
>               ]
> 
>  if __name__ == '__main__':
>