Author: rhuijben Date: Wed Feb 18 16:45:38 2015 New Revision: 1660671 URL: http://svn.apache.org/r1660671 Log: More manual wc-db test scenario fixes: Make the entries-compat base-set follow the rules of a valid wc-ng database.
* subversion/libsvn_wc/wc-checks.sql (STMT_STATIC_VERIFY): Add another verification. * subversion/tests/libsvn_wc/entries-compat.c (TESTING_DATA): Fix op-depths. Add missing row. Use base-deleted for actual deletes, not 'not-present'. Modified: subversion/trunk/subversion/libsvn_wc/wc-checks.sql subversion/trunk/subversion/tests/libsvn_wc/entries-compat.c Modified: subversion/trunk/subversion/libsvn_wc/wc-checks.sql URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc-checks.sql?rev=1660671&r1=1660670&r2=1660671&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_wc/wc-checks.sql (original) +++ subversion/trunk/subversion/libsvn_wc/wc-checks.sql Wed Feb 18 16:45:38 2015 @@ -189,3 +189,10 @@ WHERE n.op_depth > 0 AND n.presence IN ( OR n.repos_path != RELPATH_SKIP_JOIN(n.parent_relpath, p.repos_path, n.local_relpath) OR n.revision != p.revision) + +UNION all + +SELECT n.local_relpath, n.op_depth, 'SV010: Invalid op-root presence' +FROM nodes n +WHERE n.op_depth = relpath_depth(local_relpath) + AND presence NOT IN (MAP_NORMAL, MAP_INCOMPLETE, MAP_BASE_DELETED) Modified: subversion/trunk/subversion/tests/libsvn_wc/entries-compat.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_wc/entries-compat.c?rev=1660671&r1=1660670&r2=1660671&view=diff ============================================================================== --- subversion/trunk/subversion/tests/libsvn_wc/entries-compat.c (original) +++ subversion/trunk/subversion/tests/libsvn_wc/entries-compat.c Wed Feb 18 16:45:38 2015 @@ -88,10 +88,6 @@ static const char * const TESTING_DATA = "insert into pristine values ('$sha1$" SHA1_1 "', NULL, 15, 1, '$md5 $" MD5_1 "'); " - /* ### The file_externals column in NODES is temporary, and will be - ### removed. However, to keep the tests passing, we need to add it - ### to the following insert statements. *Be sure to remove it*. */ - /* load the base nodes into the nodes table */ "insert into nodes values (" " 1, '', 0, null, 1, '', 1, 'normal'," @@ -186,43 +182,43 @@ static const char * const TESTING_DATA = " null, null, 'dir', null, 'immediates', null, null, null, null, null," " null, null, null, null, null);" "insert into nodes values (" - " 1, 'J/J-a', 1, 'J', null, null, null, 'normal'," + " 1, 'J/J-a', 2, 'J', null, null, null, 'normal'," " null, null, 'file', null, null, null, null, null, null, null," " null, null, null, null, null);" "insert into nodes values (" - " 1, 'J/J-b', 1, 'J', 2, 'some/dir', 2, 'normal'," + " 1, 'J/J-b', 2, 'J', 2, 'some/dir', 2, 'normal'," " null, null, 'dir', '()', 'infinity', null, null, 2, " TIME_2s ", '" AUTHOR_2 "'," " null, null, null, null, null);" "insert into nodes values (" - " 1, 'J/J-b/J-b-a', 1, 'J/J-b', 2, 'another/dir', 2, 'normal'," + " 1, 'J/J-b/J-b-a', 3, 'J/J-b', 2, 'another/dir', 2, 'normal'," " null, null, 'dir', '()', 'infinity', null, null, 2, " TIME_2s ", '" AUTHOR_2 "'," " null, null, null, null, null);" "insert into nodes values (" - " 1, 'J/J-b/J-b-b', 1, 'J/J-b', null, null, null, 'normal'," + " 1, 'J/J-b/J-b-b', 3, 'J/J-b', null, null, null, 'normal'," " null, null, 'file', null, null, null, null, null, null, null," " null, null, null, null, null);" "insert into nodes values (" - " 1, 'J/J-c', 1, 'J', null, null, null, 'not-present'," + " 1, 'J/J-c', 2, 'J', null, null, null, 'base-deleted'," " null, null, 'dir', null, null, null, null, null, null, null," " null, null, null, null, null);" "insert into nodes values (" - " 1, 'J/J-c/J-c-a', 1, 'J/J-c', null, null, null, 'not-present'," + " 1, 'J/J-c/J-c-a', 2, 'J/J-c', null, null, null, 'base-deleted'," " null, null, 'dir', null, null, null, null, null, null, null," " null, null, null, null, null);" "insert into nodes values (" - " 1, 'J/J-d', 1, 'J', 2, 'moved/file', 2, 'normal'," + " 1, 'J/J-d', 2, 'J', 2, 'moved/file', 2, 'normal'," " 1, null, 'file', '()', null, '$sha1$" SHA1_1 "', null, 2, " TIME_2s ", '" AUTHOR_2 "'," " 10, null, null, null, null);" "insert into nodes values (" - " 1, 'J/J-e', 1, 'J', null, null, null, 'not-present'," + " 1, 'J/J-e', 1, 'J', null, null, null, 'base-deleted'," " null, 'other/place', 'dir', null, null, null, null, null, null, null," " null, null, null, null, null);" "insert into nodes values (" - " 1, 'J/J-e/J-e-a', 1, 'J/J-e', null, null, null, 'not-present'," + " 1, 'J/J-e/J-e-a', 1, 'J/J-e', null, null, null, 'base-deleted'," " null, null, 'file', null, null, null, null, null, null, null," " null, null, null, null, null);" "insert into nodes values (" - " 1, 'J/J-e/J-e-b', 1, 'J/J-e', null, null, null, 'not-present'," + " 1, 'J/J-e/J-e-b', 1, 'J/J-e', null, null, null, 'base-deleted'," " null, null, 'dir', null, null, null, null, null, null, null," " null, null, null, null, null);" "insert into nodes values (" @@ -230,7 +226,11 @@ static const char * const TESTING_DATA = " null, null, 'file', null, null, null, null, null, null, null," " null, null, null, null, null);" "insert into nodes values (" - " 1, 'J/J-f', 1, 'J', null, null, null, 'normal'," + " 1, 'J/J-f', 1, 'J', null, null, null, 'base-deleted'," + " null, null, 'dir', null, null, null, null, null, null, null," + " null, null, null, null, null);" + "insert into nodes values (" + " 1, 'J/J-f', 2, 'J', null, null, null, 'normal'," " null, null, 'dir', null, 'immediates', null, null, null, null, null," " null, null, null, null, null);" "insert into nodes values (" @@ -254,11 +254,11 @@ static const char * const TESTING_DATA = " null, null, 'dir', null, 'immediates', null, null, null, null, null," " null, null, null, null, null);" "insert into nodes values (" - " 1, 'L/L-a', 1, 'L', null, null, null, 'not-present'," + " 1, 'L/L-a', 1, 'L', null, null, null, 'base-deleted'," " null, null, 'dir', null, null, null, null, null, null, null," " null, null, null, null, null);" "insert into nodes values (" - " 1, 'L/L-a/L-a-a', 1, 'L/L-a', null, null, null, 'not-present'," + " 1, 'L/L-a/L-a-a', 1, 'L/L-a', null, null, null, 'base-deleted'," " null, null, 'dir', null, null, null, null, null, null, null," " null, null, null, null, null);" "insert into actual_node values ("