You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pr...@apache.org on 2013/04/08 13:47:04 UTC
svn commit: r1465596 [5/5] - in /subversion/branches/verify-keep-going: ./
contrib/server-side/svncutter/ subversion/bindings/cxxhl/include/
subversion/bindings/cxxhl/include/svncxxhl/ subversion/bindings/cxxhl/src/
subversion/bindings/cxxhl/tests/ sub...
Modified: subversion/branches/verify-keep-going/subversion/tests/libsvn_repos/repos-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/libsvn_repos/repos-test.c?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/libsvn_repos/repos-test.c (original)
+++ subversion/branches/verify-keep-going/subversion/tests/libsvn_repos/repos-test.c Mon Apr 8 11:47:02 2013
@@ -29,11 +29,13 @@
#include "svn_pools.h"
#include "svn_error.h"
#include "svn_fs.h"
+#include "svn_hash.h"
#include "svn_repos.h"
#include "svn_path.h"
#include "svn_delta.h"
#include "svn_config.h"
#include "svn_props.h"
+#include "svn_version.h"
#include "../svn_test_fs.h"
@@ -3187,7 +3189,7 @@ filename_with_control_chars(const svn_te
const svn_delta_editor_t *editor;
/* Create the repository. */
- SVN_ERR(svn_test__create_repos(&repos, "test-repos-filename-with-cntrl-chars",
+ SVN_ERR(svn_test__create_repos(&repos, "test-repo-filename-with-cntrl-chars",
opts, pool));
fs = svn_repos_fs(repos);
@@ -3254,6 +3256,45 @@ filename_with_control_chars(const svn_te
return SVN_NO_ERROR;
}
+
+static svn_error_t *
+test_repos_info(const svn_test_opts_t *opts,
+ apr_pool_t *pool)
+{
+ svn_repos_t *repos;
+ svn_test_opts_t opts2;
+ apr_hash_t *capabilities;
+ svn_version_t *supports_version;
+ svn_version_t v1_0_0 = {1, 0, 0, ""};
+ svn_version_t v1_4_0 = {1, 4, 0, ""};
+ int repos_format;
+
+ opts2 = *opts;
+
+ opts2.server_minor_version = 3;
+ SVN_ERR(svn_test__create_repos(&repos, "test-repo-info-3",
+ &opts2, pool));
+ SVN_ERR(svn_repos_capabilities(&capabilities, repos, pool, pool));
+ SVN_TEST_ASSERT(apr_hash_count(capabilities) == 0);
+ SVN_ERR(svn_repos_info_format(&repos_format, &supports_version, repos,
+ pool, pool));
+ SVN_TEST_ASSERT(repos_format == 3);
+ SVN_TEST_ASSERT(svn_ver_equal(supports_version, &v1_0_0));
+
+ opts2.server_minor_version = 8;
+ SVN_ERR(svn_test__create_repos(&repos, "test-repo-info-8",
+ &opts2, pool));
+ SVN_ERR(svn_repos_capabilities(&capabilities, repos, pool, pool));
+ SVN_TEST_ASSERT(apr_hash_count(capabilities) == 1);
+ SVN_TEST_ASSERT(svn_hash_gets(capabilities, SVN_REPOS_CAPABILITY_MERGEINFO));
+ SVN_ERR(svn_repos_info_format(&repos_format, &supports_version, repos,
+ pool, pool));
+ SVN_TEST_ASSERT(repos_format == 5);
+ SVN_TEST_ASSERT(svn_ver_equal(supports_version, &v1_4_0));
+
+ return SVN_NO_ERROR;
+}
+
/* The test table. */
@@ -3300,5 +3341,7 @@ struct svn_test_descriptor_t test_funcs[
"test svn_repos_delete"),
SVN_TEST_OPTS_PASS(filename_with_control_chars,
"test filenames with control characters"),
+ SVN_TEST_OPTS_PASS(test_repos_info,
+ "test svn_repos_info_*"),
SVN_TEST_NULL
};
Propchange: subversion/branches/verify-keep-going/subversion/tests/libsvn_subr/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Apr 8 11:47:02 2013
@@ -13,6 +13,7 @@ compat-test
config-test
crypto-test
error-test
+error-code-test
hashdump-test
hashdump.out
hashdump2.out
Modified: subversion/branches/verify-keep-going/subversion/tests/libsvn_subr/auth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/libsvn_subr/auth-test.c?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/libsvn_subr/auth-test.c (original)
+++ subversion/branches/verify-keep-going/subversion/tests/libsvn_subr/auth-test.c Mon Apr 8 11:47:02 2013
@@ -217,7 +217,7 @@ cleanup_callback(svn_boolean_t *delete_c
const char *provider,
apr_pool_t *scratch_pool)
{
- if (!strcmp(provider, SVN_AUTH__SIMPLE_PASSWORD_TYPE))
+ if (strcmp(provider, SVN_AUTH__SIMPLE_PASSWORD_TYPE))
return SVN_NO_ERROR;
SVN_TEST_ASSERT(! strcmp(cred_kind, SVN_AUTH_CRED_SIMPLE));
Modified: subversion/branches/verify-keep-going/subversion/tests/libsvn_subr/error-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/libsvn_subr/error-test.c?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/libsvn_subr/error-test.c (original)
+++ subversion/branches/verify-keep-going/subversion/tests/libsvn_subr/error-test.c Mon Apr 8 11:47:02 2013
@@ -182,6 +182,46 @@ test_error_purge_tracing(apr_pool_t *poo
return SVN_NO_ERROR;
}
+static svn_error_t *
+test_error_symbolic_name(apr_pool_t *pool)
+{
+ struct {
+ svn_errno_t errcode;
+ const char *errname;
+ } errors[] = {
+ { SVN_ERR_BAD_CONTAINING_POOL, "SVN_ERR_BAD_CONTAINING_POOL" },
+ { SVN_ERR_BAD_FILENAME, "SVN_ERR_BAD_FILENAME" },
+ { SVN_ERR_XML_ATTRIB_NOT_FOUND, "SVN_ERR_XML_ATTRIB_NOT_FOUND" },
+ { SVN_ERR_ENTRY_NOT_FOUND, "SVN_ERR_ENTRY_NOT_FOUND" },
+ { SVN_ERR_ENTRY_CATEGORY_START + 1, NULL }, /* unused slot */
+ { SVN_ERR_ENTRY_EXISTS, "SVN_ERR_ENTRY_EXISTS" },
+ { SVN_ERR_ASSERTION_ONLY_TRACING_LINKS, "SVN_ERR_ASSERTION_ONLY_TRACING_LINKS" },
+ { SVN_ERR_FS_CORRUPT, "SVN_ERR_FS_CORRUPT" },
+ /* The following two error codes can return either of their names
+ as the string. For simplicity, test what the current implementation
+ returns; but if it starts returning "SVN_ERR_WC_NOT_DIRECTORY",
+ that's fine (and permitted by the API contract). */
+ { SVN_ERR_WC_NOT_DIRECTORY, "SVN_ERR_WC_NOT_WORKING_COPY" },
+ { SVN_ERR_WC_NOT_WORKING_COPY, "SVN_ERR_WC_NOT_WORKING_COPY" },
+ /* Test an implementation detail. */
+ { SVN_ERR_BAD_CATEGORY_START, "SVN_ERR_BAD_CONTAINING_POOL" },
+ /* Test non-errors. */
+ { 1, NULL },
+ { SVN_ERR_WC_CATEGORY_START - 1, NULL },
+ /* Whitebox-test exceptional cases. */
+ { SVN_WARNING, "SVN_WARNING" },
+ { 0, "SVN_NO_ERROR" }
+ /* No sentinel. */
+ };
+ int i;
+
+ for (i = 0; i < sizeof(errors) / sizeof(errors[0]); i++)
+ SVN_TEST_STRING_ASSERT(svn_error_symbolic_name(errors[i].errcode),
+ errors[i].errname);
+
+ return SVN_NO_ERROR;
+}
+
/* The test table. */
@@ -192,5 +232,7 @@ struct svn_test_descriptor_t test_funcs[
"test svn_error_root_cause"),
SVN_TEST_PASS2(test_error_purge_tracing,
"test svn_error_purge_tracing"),
+ SVN_TEST_PASS2(test_error_symbolic_name,
+ "test svn_error_symbolic_name"),
SVN_TEST_NULL
};
Modified: subversion/branches/verify-keep-going/subversion/tests/svn_test_main.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/svn_test_main.c?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/svn_test_main.c (original)
+++ subversion/branches/verify-keep-going/subversion/tests/svn_test_main.c Mon Apr 8 11:47:02 2013
@@ -73,7 +73,8 @@ enum svn_test_mode_t mode_filter = svn_t
/* Option parsing enums and structures */
enum {
- cleanup_opt = SVN_OPT_FIRST_LONGOPT_ID,
+ help_opt = SVN_OPT_FIRST_LONGOPT_ID,
+ cleanup_opt,
fstype_opt,
list_opt,
verbose_opt,
@@ -87,6 +88,8 @@ enum {
static const apr_getopt_option_t cl_options[] =
{
+ {"help", help_opt, 0,
+ N_("display this help")},
{"cleanup", cleanup_opt, 0,
N_("remove test directories after success")},
{"config-file", config_opt, 1,
@@ -97,11 +100,11 @@ static const apr_getopt_option_t cl_opti
N_("lists all the tests with their short description")},
{"mode-filter", mode_filter_opt, 1,
N_("only run/list tests with expected mode ARG = PASS, "
- "XFAIL, SKIP, or ALL (default)\n")},
+ "XFAIL, SKIP, or ALL (default)")},
{"verbose", verbose_opt, 0,
N_("print extra information")},
{"server-minor-version", server_minor_version_opt, 1,
- N_("set the minor version for the server ('3', '4',\n"
+ N_("set the minor version for the server ('3', '4', "
"'5', or '6')")},
{"quiet", quiet_opt, 0,
N_("print only unexpected results")},
@@ -343,6 +346,26 @@ do_test_num(const char *progname,
}
+static void help(const char *progname, apr_pool_t *pool)
+{
+ int i;
+
+ svn_error_clear(svn_cmdline_fprintf(stdout, pool,
+ _("usage: %s [options] [test-numbers]\n"
+ "\n"
+ "Valid options:\n"),
+ progname));
+ for (i = 0; cl_options[i].name && cl_options[i].optch; i++)
+ {
+ const char *optstr;
+
+ svn_opt_format_option(&optstr, cl_options + i, TRUE, pool);
+ svn_error_clear(svn_cmdline_fprintf(stdout, pool, " %s\n", optstr));
+ }
+ svn_error_clear(svn_cmdline_fprintf(stdout, pool, "\n"));
+}
+
+
/* Standard svn test program */
int
main(int argc, const char *argv[])
@@ -440,6 +463,9 @@ main(int argc, const char *argv[])
}
switch (opt_id) {
+ case help_opt:
+ help(prog_name, pool);
+ exit(0);
case cleanup_opt:
cleanup_mode = TRUE;
break;
Modified: subversion/branches/verify-keep-going/tools/client-side/svn-bench/client_errors.h
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/tools/client-side/svn-bench/client_errors.h?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/tools/client-side/svn-bench/client_errors.h (original)
+++ subversion/branches/verify-keep-going/tools/client-side/svn-bench/client_errors.h Mon Apr 8 11:47:02 2013
@@ -43,6 +43,8 @@ extern "C" {
#if defined(SVN_ERROR_BUILD_ARRAY)
+#error "Need to update err_defn for r1464679 and un-typo 'CDMLINE'"
+
#define SVN_ERROR_START \
static const err_defn error_table[] = { \
{ SVN_ERR_CDMLINE__WARNING, "Warning" },
Modified: subversion/branches/verify-keep-going/tools/client-side/svn-bench/null-export-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/tools/client-side/svn-bench/null-export-cmd.c?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/tools/client-side/svn-bench/null-export-cmd.c (original)
+++ subversion/branches/verify-keep-going/tools/client-side/svn-bench/null-export-cmd.c Mon Apr 8 11:47:02 2013
@@ -250,13 +250,15 @@ bench_null_export(svn_revnum_t *result_r
pool));
/* Manufacture a basic 'report' to the update reporter. */
- SVN_ERR(svn_ra_do_update2(ra_session,
+ SVN_ERR(svn_ra_do_update3(ra_session,
&reporter, &report_baton,
loc->rev,
"", /* no sub-target */
depth,
FALSE, /* don't want copyfrom-args */
- export_editor, edit_baton, pool));
+ FALSE, /* don't want ignore_ancestry */
+ export_editor, edit_baton,
+ pool, pool));
SVN_ERR(reporter->set_path(report_baton, "", loc->rev,
/* Depth is irrelevant, as we're
Propchange: subversion/branches/verify-keep-going/tools/dist/make-deps-tarball.sh
------------------------------------------------------------------------------
Merged /subversion/trunk/tools/dist/make-deps-tarball.sh:r1457676-1465586
Modified: subversion/branches/verify-keep-going/tools/dist/release.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/tools/dist/release.py?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/tools/dist/release.py (original)
+++ subversion/branches/verify-keep-going/tools/dist/release.py Mon Apr 8 11:47:02 2013
@@ -448,7 +448,9 @@ def roll_tarballs(args):
m.update(open(filename, 'r').read())
open(filename + '.sha1', 'w').write(m.hexdigest())
- shutil.move('svn_version.h.dist', get_deploydir(args.base_dir))
+ shutil.move('svn_version.h.dist',
+ get_deploydir(args.base_dir) + '/' + 'svn_version.h.dist'
+ + '-' + str(args.version))
# And we're done!
@@ -593,7 +595,8 @@ def move_to_dist(args):
'Publish Subversion-%s.' % str(args.version)]
if (args.username):
svnmucc_cmd += ['--username', args.username]
- svnmucc_cmd += ['rm', dist_dev_url + '/' + 'svn_version.h.dist']
+ svnmucc_cmd += ['rm', dist_dev_url + '/' + 'svn_version.h.dist'
+ + '-' + str(args.version)]
for filename in filenames:
svnmucc_cmd += ['mv', dist_dev_url + '/' + filename,
dist_release_url + '/' + filename]
@@ -633,7 +636,7 @@ def get_sha1info(args, replace=False):
else:
target = get_deploydir(args.base_dir)
- sha1s = glob.glob(os.path.join(target, '*.sha1'))
+ sha1s = glob.glob(os.path.join(target, 'subversion*-%s*.sha1' % args.version))
class info(object):
pass
Modified: subversion/branches/verify-keep-going/win-tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/win-tests.py?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/win-tests.py (original)
+++ subversion/branches/verify-keep-going/win-tests.py Mon Apr 8 11:47:02 2013
@@ -364,8 +364,12 @@ def locate_libs():
'mod_dav_svn', 'mod_dav_svn.so')
mod_authz_svn_path = os.path.join(abs_objdir, 'subversion',
'mod_authz_svn', 'mod_authz_svn.so')
+ mod_dontdothat_path = os.path.join(abs_objdir, 'tools', 'server-side',
+ 'mod_dontdothat', 'mod_dontdothat.so')
+
copy_changed_file(mod_dav_svn_path, abs_objdir)
copy_changed_file(mod_authz_svn_path, abs_objdir)
+ copy_changed_file(mod_dontdothat_path, abs_objdir)
os.environ['PATH'] = abs_objdir + os.pathsep + os.environ['PATH']
@@ -471,6 +475,9 @@ class Httpd:
self.authz_file = os.path.join(abs_builddir,
CMDLINE_TEST_SCRIPT_NATIVE_PATH,
'svn-test-work', 'authz')
+ self.dontdothat_file = os.path.join(abs_builddir,
+ CMDLINE_TEST_SCRIPT_NATIVE_PATH,
+ 'svn-test-work', 'dontdothat')
self.httpd_config = os.path.join(self.root, 'httpd.conf')
self.httpd_users = os.path.join(self.root, 'users')
self.httpd_mime_types = os.path.join(self.root, 'mime.types')
@@ -488,6 +495,7 @@ class Httpd:
self._create_users_file()
self._create_mime_types_file()
+ self._create_dontdothat_file()
# Determine version.
if os.path.exists(os.path.join(self.httpd_dir,
@@ -541,6 +549,9 @@ class Httpd:
# Write LoadModule for Subversion modules
fp.write(self._svn_module('dav_svn_module', 'mod_dav_svn.so'))
fp.write(self._svn_module('authz_svn_module', 'mod_authz_svn.so'))
+
+ # And for mod_dontdothat
+ fp.write(self._svn_module('dontdothat_module', 'mod_dontdothat.so'))
# Don't handle .htaccess, symlinks, etc.
fp.write('<Directory />\n')
@@ -586,6 +597,13 @@ class Httpd:
"Create empty mime.types file"
fp = open(self.httpd_mime_types, 'w')
fp.close()
+
+ def _create_dontdothat_file(self):
+ "Create empty mime.types file"
+ fp = open(self.dontdothat_file, 'w')
+ fp.write('[recursive-actions]\n')
+ fp.write('/ = deny\n')
+ fp.close()
def _sys_module(self, name, path):
full_path = os.path.join(self.httpd_dir, 'modules', path)
@@ -600,6 +618,7 @@ class Httpd:
CMDLINE_TEST_SCRIPT_NATIVE_PATH,
'svn-test-work', name)
location = '/svn-test-work/' + name
+ ddt_location = '/ddt-test-work/' + name
return \
'<Location ' + location + '>\n' \
' DAV svn\n' \
@@ -612,7 +631,20 @@ class Httpd:
' AuthName "Subversion Repository"\n' \
' AuthUserFile ' + self._quote(self.httpd_users) + '\n' \
' Require valid-user\n' \
- '</Location>\n'
+ '</Location>\n' \
+ '<Location ' + ddt_location + '>\n' \
+ ' DAV svn\n' \
+ ' SVNParentPath ' + self._quote(path) + '\n' \
+ ' SVNAdvertiseV2Protocol ' + self.httpv2_option + '\n' \
+ ' SVNPathAuthz ' + self.path_authz_option + '\n' \
+ ' SVNAllowBulkUpdates ' + self.bulkupdates_option + '\n' \
+ ' AuthzSVNAccessFile ' + self._quote(self.authz_file) + '\n' \
+ ' AuthType Basic\n' \
+ ' AuthName "Subversion Repository"\n' \
+ ' AuthUserFile ' + self._quote(self.httpd_users) + '\n' \
+ ' Require valid-user\n' \
+ ' DontDoThatConfigFile ' + self._quote(self.dontdothat_file) + '\n' \
+ '</Location>\n'
def start(self):
if self.service: