You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2011/08/31 11:55:53 UTC

svn commit: r1163557 - in /subversion/trunk/subversion: libsvn_wc/wc-queries.sql libsvn_wc/wc_db.c tests/cmdline/externals_tests.py

Author: philip
Date: Wed Aug 31 09:55:52 2011
New Revision: 1163557

URL: http://svn.apache.org/viewvc?rev=1163557&view=rev
Log:
Relax wcng consistency checks for file externals.

* subversion/libsvn_wc/wc-queries.sql
  (STMT_SELECT_ALL_NODES): Add file_external.

* subversion/libsvn_wc/wc_db.c
  (verify_wcroot): Don't require file externals to have a parent row.

* subversion/tests/cmdline/externals_tests.py
  (file_external_in_unversioned): New test.
  (test_list): Add new test.

Modified:
    subversion/trunk/subversion/libsvn_wc/wc-queries.sql
    subversion/trunk/subversion/libsvn_wc/wc_db.c
    subversion/trunk/subversion/tests/cmdline/externals_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=1163557&r1=1163556&r2=1163557&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Wed Aug 31 09:55:52 2011
@@ -1372,7 +1372,7 @@ WHERE wc_id = ?1 AND op_depth = 0
 /* Queries for verification. */
 
 -- STMT_SELECT_ALL_NODES
-SELECT op_depth, local_relpath, parent_relpath FROM nodes
+SELECT op_depth, local_relpath, parent_relpath, file_external FROM nodes
 WHERE wc_id == ?1
 
 /* ------------------------------------------------------------------------- */

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1163557&r1=1163556&r2=1163557&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Wed Aug 31 09:55:52 2011
@@ -12772,7 +12772,7 @@ verify_wcroot(svn_wc__db_wcroot_t *wcroo
       /* Verify parent_relpath refers to a row that exists */
       /* TODO: Verify there is a suitable parent row - e.g. has op_depth <=
        * the child's and a suitable presence */
-      if (parent_relpath)
+      if (parent_relpath && svn_sqlite__column_is_null(stmt, 3))
         {
           svn_sqlite__stmt_t *stmt2;
           svn_boolean_t have_a_parent_row;

Modified: subversion/trunk/subversion/tests/cmdline/externals_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/externals_tests.py?rev=1163557&r1=1163556&r2=1163557&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/externals_tests.py Wed Aug 31 09:55:52 2011
@@ -1921,6 +1921,22 @@ def file_externals_different_repos(sbox)
                                         expected_output, None, None,
                                         'svn: warning: W200007: Unsupported.*')
 
+def file_external_in_unversioned(sbox):
+  "file external in unversioned dir"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  sbox.simple_propset('svn:externals', '^/A/mu X/mu', 'A')
+
+  expected_output = svntest.wc.State(wc_dir, {
+    'A/X/mu' : Item(status='A '),
+  })
+  svntest.actions.run_and_verify_update(wc_dir, expected_output, None, None)
+
+  # At one point this failed with SVN_DEBUG wcng consistency checks enabled
+  svntest.actions.run_and_verify_svn(None, None, [], 'cleanup', wc_dir)
+
 
 ########################################################################
 # Run the tests
@@ -1961,6 +1977,7 @@ test_list = [ None,
               incoming_file_external_on_file,
               exclude_externals,
               file_externals_different_repos,
+              file_external_in_unversioned,
              ]
 
 if __name__ == '__main__':