You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2010/02/15 14:16:49 UTC
svn commit: r910215 - in
/subversion/branches/1.6.x-wc-ng-check-override/subversion:
libsvn_wc/questions.c tests/cmdline/svntest/actions.py
tests/cmdline/svntest/main.py
Author: stsp
Date: Mon Feb 15 13:16:49 2010
New Revision: 910215
URL: http://svn.apache.org/viewvc?rev=910215&view=rev
Log:
On the 1.6.x-wc-ng-check-override branch:
Allow overriding the check for WC-NG working copies in 1.6.x,
by setting the environment variable
SVN_I_LOVE_CORRUPTED_WORKING_COPIES_SO_DISABLE_CHECK_FOR_WC_NG to "yes".
Make the test suite run all tests with this override enabled.
This is useful when running the 1.6.x test suite in a working copy
managed by a trunk svn client. Many tests fail to pass because of
errors like:
svn: The path 'svn-test-work/working_copies/some_tests-42'
appears to be part of a Subversion 1.7 or greater working
copy rooted at '/home/user/svn-1.6.x/subversion/tests/cmdline'.
With this patch, all tests pass on my machine.
* subversion/libsvn_wc/questions.c
(SVN_WC_NG_CHECK_ENV_VAR): New.
(is_inside_wc_ng): Check for override. While here, replace use of
literal ".svn" with the proper macro definition.
* subversion/tests/cmdline/svntest/actions.py
(no_check_for_wc_ng, do_check_for_wc_ng): New. The second function
is not used yet, but could be used for tests which fail to pass
with the override enabled. I have found no such test.
* subversion/tests/cmdline/svntest/main.py
(TestRunner.run): Always enable the override.
Modified:
subversion/branches/1.6.x-wc-ng-check-override/subversion/libsvn_wc/questions.c
subversion/branches/1.6.x-wc-ng-check-override/subversion/tests/cmdline/svntest/actions.py
subversion/branches/1.6.x-wc-ng-check-override/subversion/tests/cmdline/svntest/main.py
Modified: subversion/branches/1.6.x-wc-ng-check-override/subversion/libsvn_wc/questions.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-wc-ng-check-override/subversion/libsvn_wc/questions.c?rev=910215&r1=910214&r2=910215&view=diff
==============================================================================
--- subversion/branches/1.6.x-wc-ng-check-override/subversion/libsvn_wc/questions.c (original)
+++ subversion/branches/1.6.x-wc-ng-check-override/subversion/libsvn_wc/questions.c Mon Feb 15 13:16:49 2010
@@ -43,6 +43,7 @@
#include "private/svn_wc_private.h"
#include "private/svn_sqlite.h"
+#define SVN_WC_NG_CHECK_ENV_VAR "SVN_I_LOVE_CORRUPTED_WORKING_COPIES_SO_DISABLE_CHECK_FOR_WC_NG"
static svn_error_t *
is_inside_wc_ng(const char *abspath,
@@ -51,9 +52,16 @@
apr_pool_t *pool)
{
svn_node_kind_t kind;
- const char *wc_db_path = svn_path_join_many(pool, abspath, ".svn", "wc.db",
- NULL);
+ const char *wc_db_path;
+ char *wc_ng_check_env_var;
+ wc_ng_check_env_var = getenv(SVN_WC_NG_CHECK_ENV_VAR);
+ if (wc_ng_check_env_var &&
+ apr_strnatcasecmp(wc_ng_check_env_var, "yes") == 0)
+ return SVN_NO_ERROR; /* Allow skipping for testing */
+
+ wc_db_path = svn_path_join_many(pool, abspath, SVN_WC_ADM_DIR_NAME,
+ "wc.db", NULL);
SVN_ERR(svn_io_check_path(wc_db_path, &kind, pool));
if (kind == svn_node_file)
Modified: subversion/branches/1.6.x-wc-ng-check-override/subversion/tests/cmdline/svntest/actions.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-wc-ng-check-override/subversion/tests/cmdline/svntest/actions.py?rev=910215&r1=910214&r2=910215&view=diff
==============================================================================
--- subversion/branches/1.6.x-wc-ng-check-override/subversion/tests/cmdline/svntest/actions.py (original)
+++ subversion/branches/1.6.x-wc-ng-check-override/subversion/tests/cmdline/svntest/actions.py Mon Feb 15 13:16:49 2010
@@ -29,6 +29,12 @@
def do_sleep_for_timestamps():
os.environ['SVN_I_LOVE_CORRUPTED_WORKING_COPIES_SO_DISABLE_SLEEP_FOR_TIMESTAMPS'] = 'no'
+def no_check_for_wc_ng():
+ os.environ['SVN_I_LOVE_CORRUPTED_WORKING_COPIES_SO_DISABLE_CHECK_FOR_WC_NG'] = 'yes'
+
+def do_check_for_wc_ng():
+ os.environ['SVN_I_LOVE_CORRUPTED_WORKING_COPIES_SO_DISABLE_CHECK_FOR_WC_NG'] = 'no'
+
def setup_pristine_repository():
"""Create the pristine repository and 'svn import' the greek tree"""
Modified: subversion/branches/1.6.x-wc-ng-check-override/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-wc-ng-check-override/subversion/tests/cmdline/svntest/main.py?rev=910215&r1=910214&r2=910215&view=diff
==============================================================================
--- subversion/branches/1.6.x-wc-ng-check-override/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/1.6.x-wc-ng-check-override/subversion/tests/cmdline/svntest/main.py Mon Feb 15 13:16:49 2010
@@ -1218,6 +1218,7 @@
str(self.index)
actions.no_sleep_for_timestamps()
+ actions.no_check_for_wc_ng()
saved_dir = os.getcwd()
try: