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 2015/05/13 06:51:28 UTC
svn commit: r1679139 [6/7] - in
/subversion/branches/1.10-cache-improvements: ./ build/ build/ac-macros/
build/generator/ build/generator/templates/ subversion/bindings/javahl/
subversion/bindings/javahl/native/
subversion/bindings/javahl/native/jniwra...
Modified: subversion/branches/1.10-cache-improvements/subversion/svn/auth-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/svn/auth-cmd.c?rev=1679139&r1=1679138&r2=1679139&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/svn/auth-cmd.c (original)
+++ subversion/branches/1.10-cache-improvements/subversion/svn/auth-cmd.c Wed May 13 04:51:26 2015
@@ -96,6 +96,39 @@ show_cert_failures(const char *failure_s
return SVN_NO_ERROR;
}
+
+/* decodes from format we store certs in for auth creds and
+ * turns parsing errors into warnings if PRINT_WARNING is TRUE
+ * and ignores them otherwise. returns NULL if it couldn't
+ * parse a cert for any reason. */
+static svn_x509_certinfo_t *
+parse_certificate(const svn_string_t *ascii_cert,
+ svn_boolean_t print_warning,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ svn_x509_certinfo_t *certinfo;
+ const svn_string_t *der_cert;
+ svn_error_t *err;
+
+ /* Convert header-less PEM to DER by undoing base64 encoding. */
+ der_cert = svn_base64_decode_string(ascii_cert, scratch_pool);
+
+ err = svn_x509_parse_cert(&certinfo, der_cert->data, der_cert->len,
+ result_pool, scratch_pool);
+ if (err)
+ {
+ /* Just display X.509 parsing errors as warnings and continue */
+ if (print_warning)
+ svn_handle_warning2(stderr, err, "svn: ");
+ svn_error_clear(err);
+ return NULL;
+ }
+
+ return certinfo;
+}
+
+
struct walk_credentials_baton_t
{
int matches;
@@ -115,12 +148,58 @@ match_pattern(const char *pattern, const
return (apr_fnmatch(p, value, flags) == APR_SUCCESS);
}
+static svn_boolean_t
+match_certificate(svn_x509_certinfo_t **certinfo,
+ const char *pattern,
+ const svn_string_t *ascii_cert,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ const char *value;
+ const svn_checksum_t *checksum;
+ const apr_array_header_t *hostnames;
+ int i;
+
+ *certinfo = parse_certificate(ascii_cert, FALSE, result_pool, scratch_pool);
+ if (*certinfo == NULL)
+ return FALSE;
+
+ value = svn_x509_certinfo_get_subject(*certinfo, scratch_pool);
+ if (match_pattern(pattern, value, FALSE, scratch_pool))
+ return TRUE;
+
+ value = svn_x509_certinfo_get_issuer(*certinfo, scratch_pool);
+ if (match_pattern(pattern, value, FALSE, scratch_pool))
+ return TRUE;
+
+ checksum = svn_x509_certinfo_get_digest(*certinfo);
+ value = svn_checksum_to_cstring_display(checksum, scratch_pool);
+ if (match_pattern(pattern, value, TRUE, scratch_pool))
+ return TRUE;
+
+ hostnames = svn_x509_certinfo_get_hostnames(*certinfo);
+ if (hostnames)
+ {
+ for (i = 0; i < hostnames->nelts; i++)
+ {
+ const char *hostname = APR_ARRAY_IDX(hostnames, i, const char *);
+ if (match_pattern(pattern, hostname, TRUE, scratch_pool))
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+
+
static svn_error_t *
match_credential(svn_boolean_t *match,
+ svn_x509_certinfo_t **certinfo,
const char *cred_kind,
const char *realmstring,
apr_array_header_t *patterns,
apr_array_header_t *cred_items,
+ apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
int i;
@@ -152,7 +231,8 @@ match_credential(svn_boolean_t *match,
strcmp(key, SVN_CONFIG_AUTHN_PASSPHRASE_KEY) == 0)
continue; /* don't match secrets */
else if (strcmp(key, SVN_CONFIG_AUTHN_ASCII_CERT_KEY) == 0)
- continue; /* don't match base64 data */
+ *match = match_certificate(certinfo, pattern, value,
+ result_pool, iterpool);
else
*match = match_pattern(pattern, value->data, FALSE, iterpool);
@@ -168,25 +248,15 @@ match_credential(svn_boolean_t *match,
}
static svn_error_t *
-show_cert(const svn_string_t *pem_cert, apr_pool_t *scratch_pool)
+show_cert(svn_x509_certinfo_t *certinfo, const svn_string_t *pem_cert,
+ apr_pool_t *scratch_pool)
{
- const svn_string_t *der_cert;
- svn_x509_certinfo_t *certinfo;
const apr_array_header_t *hostnames;
- svn_error_t *err;
- /* Convert header-less PEM to DER by undoing base64 encoding. */
- der_cert = svn_base64_decode_string(pem_cert, scratch_pool);
-
- err = svn_x509_parse_cert(&certinfo, der_cert->data, der_cert->len,
- scratch_pool, scratch_pool);
- if (err)
- {
- /* Just display X.509 parsing errors as warnings and continue */
- svn_handle_warning2(stderr, err, "svn: ");
- svn_error_clear(err);
- return SVN_NO_ERROR;
- }
+ if (certinfo == NULL)
+ certinfo = parse_certificate(pem_cert, TRUE, scratch_pool, scratch_pool);
+ if (certinfo == NULL)
+ return SVN_NO_ERROR;
SVN_ERR(svn_cmdline_printf(scratch_pool, _("Subject: %s\n"),
svn_x509_certinfo_get_subject(certinfo, scratch_pool)));
@@ -229,6 +299,7 @@ list_credential(const char *cred_kind,
const char *realmstring,
apr_array_header_t *cred_items,
svn_boolean_t show_passwords,
+ svn_x509_certinfo_t *certinfo,
apr_pool_t *scratch_pool)
{
int i;
@@ -275,7 +346,7 @@ list_credential(const char *cred_kind,
else if (strcmp(key, SVN_CONFIG_AUTHN_USERNAME_KEY) == 0)
SVN_ERR(svn_cmdline_printf(iterpool, _("Username: %s\n"), value->data));
else if (strcmp(key, SVN_CONFIG_AUTHN_ASCII_CERT_KEY) == 0)
- SVN_ERR(show_cert(value, iterpool));
+ SVN_ERR(show_cert(certinfo, value, iterpool));
else if (strcmp(key, SVN_CONFIG_AUTHN_FAILURES_KEY) == 0)
SVN_ERR(show_cert_failures(value->data, iterpool));
else
@@ -298,6 +369,7 @@ walk_credentials(svn_boolean_t *delete_c
{
struct walk_credentials_baton_t *b = baton;
apr_array_header_t *sorted_cred_items;
+ svn_x509_certinfo_t *certinfo = NULL;
*delete_cred = FALSE;
@@ -308,9 +380,9 @@ walk_credentials(svn_boolean_t *delete_c
{
svn_boolean_t match;
- SVN_ERR(match_credential(&match, cred_kind, realmstring,
+ SVN_ERR(match_credential(&match, &certinfo, cred_kind, realmstring,
b->patterns, sorted_cred_items,
- scratch_pool));
+ scratch_pool, scratch_pool));
if (!match)
return SVN_NO_ERROR;
}
@@ -319,7 +391,7 @@ walk_credentials(svn_boolean_t *delete_c
if (b->list)
SVN_ERR(list_credential(cred_kind, realmstring, sorted_cred_items,
- b->show_passwords, scratch_pool));
+ b->show_passwords, certinfo, scratch_pool));
if (b->delete)
{
*delete_cred = TRUE;
Modified: subversion/branches/1.10-cache-improvements/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/svn/conflict-callbacks.c?rev=1679139&r1=1679138&r2=1679139&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/svn/conflict-callbacks.c (original)
+++ subversion/branches/1.10-cache-improvements/subversion/svn/conflict-callbacks.c Wed May 13 04:51:26 2015
@@ -44,6 +44,9 @@
#include "svn_private_config.h"
#define ARRAY_LEN(ary) ((sizeof (ary)) / (sizeof ((ary)[0])))
+#define MAX_ARRAY_LEN(aryx, aryz) \
+ (ARRAY_LEN((aryx)) > ARRAY_LEN((aryz)) \
+ ? ARRAY_LEN((aryx)) : ARRAY_LEN((aryz)))
@@ -709,12 +712,12 @@ handle_text_conflict(svn_wc_conflict_res
give them a rational basis for choosing (r)esolved? */
svn_boolean_t knows_something = FALSE;
const char *local_relpath;
-
+
SVN_ERR_ASSERT(desc->kind == svn_wc_conflict_kind_text);
local_relpath = svn_cl__local_style_skip_ancestor(b->path_prefix,
desc->local_abspath,
- scratch_pool);;
+ scratch_pool);
if (desc->is_binary)
SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
@@ -740,22 +743,17 @@ handle_text_conflict(svn_wc_conflict_res
while (TRUE)
{
+ const char *options[1 + MAX_ARRAY_LEN(binary_conflict_options,
+ text_conflict_options)];
+
const resolver_option_t *conflict_options = desc->is_binary
? binary_conflict_options
: text_conflict_options;
- const char **options;
- const char **next_option;
+ const char **next_option = options;
const resolver_option_t *opt;
svn_pool_clear(iterpool);
- options = apr_palloc(iterpool,
- sizeof (const char *) *
- (desc->is_binary
- ? ARRAY_LEN(binary_conflict_options)
- : ARRAY_LEN(text_conflict_options)));
- next_option = options;
-
*next_option++ = "p";
if (diff_allowed)
{
Modified: subversion/branches/1.10-cache-improvements/subversion/svn/list-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/svn/list-cmd.c?rev=1679139&r1=1679138&r2=1679139&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/svn/list-cmd.c (original)
+++ subversion/branches/1.10-cache-improvements/subversion/svn/list-cmd.c Wed May 13 04:51:26 2015
@@ -49,6 +49,12 @@ struct print_baton {
svn_boolean_t in_external;
};
+/* Field flags required for this function */
+static const apr_uint32_t print_dirent_fields = SVN_DIRENT_KIND;
+static const apr_uint32_t print_dirent_fields_verbose = (
+ SVN_DIRENT_KIND | SVN_DIRENT_SIZE | SVN_DIRENT_TIME |
+ SVN_DIRENT_CREATED_REV | SVN_DIRENT_LAST_AUTHOR);
+
/* This implements the svn_client_list_func2_t API, printing a single
directory entry in text format. */
static svn_error_t *
@@ -161,7 +167,10 @@ print_dirent(void *baton,
}
}
-
+/* Field flags required for this function */
+static const apr_uint32_t print_dirent_xml_fields = (
+ SVN_DIRENT_KIND | SVN_DIRENT_SIZE | SVN_DIRENT_TIME |
+ SVN_DIRENT_CREATED_REV | SVN_DIRENT_LAST_AUTHOR);
/* This implements the svn_client_list_func2_t API, printing a single dirent
in XML format. */
static svn_error_t *
@@ -314,10 +323,12 @@ svn_cl__list(apr_getopt_t *os,
"mode"));
}
- if (opt_state->verbose || opt_state->xml)
- dirent_fields = SVN_DIRENT_ALL;
+ if (opt_state->xml)
+ dirent_fields = print_dirent_xml_fields;
+ else if (opt_state->verbose)
+ dirent_fields = print_dirent_fields_verbose;
else
- dirent_fields = SVN_DIRENT_KIND; /* the only thing we actually need... */
+ dirent_fields = print_dirent_fields;
pb.ctx = ctx;
pb.verbose = opt_state->verbose;
Modified: subversion/branches/1.10-cache-improvements/subversion/svn/similarity.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/svn/similarity.c?rev=1679139&r1=1679138&r2=1679139&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/svn/similarity.c (original)
+++ subversion/branches/1.10-cache-improvements/subversion/svn/similarity.c Wed May 13 04:51:26 2015
@@ -114,6 +114,8 @@ svn_cl__similarity_check(const char *key
{
svn_cl__simcheck_t *const token = tokens[i];
token->context = NULL;
+ /* If you update this factor, consider updating
+ * ../libsvn_subr/cmdline.c:most_similar(). */
if (token->score >= (2 * SVN_STRING__SIM_RANGE_MAX + 1) / 3)
++result;
}
Modified: subversion/branches/1.10-cache-improvements/subversion/svn/status-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/svn/status-cmd.c?rev=1679139&r1=1679138&r2=1679139&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/svn/status-cmd.c (original)
+++ subversion/branches/1.10-cache-improvements/subversion/svn/status-cmd.c Wed May 13 04:51:26 2015
@@ -288,8 +288,15 @@ svn_cl__status(apr_getopt_t *os,
SVN_ERR(svn_cl__check_targets_are_local_paths(targets));
- /* We want our -u statuses to be against HEAD. */
- rev.kind = svn_opt_revision_head;
+ /* We want our -u statuses to be against HEAD by default. */
+ if (opt_state->start_revision.kind == svn_opt_revision_unspecified)
+ rev.kind = svn_opt_revision_head;
+ else if (! opt_state->update)
+ return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+ _("--revision (-r) option valid only with "
+ "--show-updates (-u) option"));
+ else
+ rev = opt_state->start_revision;
sb.had_print_error = FALSE;
Modified: subversion/branches/1.10-cache-improvements/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/svn/svn.c?rev=1679139&r1=1679138&r2=1679139&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/svn/svn.c (original)
+++ subversion/branches/1.10-cache-improvements/subversion/svn/svn.c Wed May 13 04:51:26 2015
@@ -125,11 +125,7 @@ typedef enum svn_cl__longopt_t {
opt_show_revs,
opt_reintegrate,
opt_trust_server_cert,
- opt_trust_server_cert_unknown_ca,
- opt_trust_server_cert_cn_mismatch,
- opt_trust_server_cert_expired,
- opt_trust_server_cert_not_yet_valid,
- opt_trust_server_cert_other_failure,
+ opt_trust_server_cert_failures,
opt_strip,
opt_ignore_keywords,
opt_reverse_diff,
@@ -243,29 +239,23 @@ const apr_getopt_option_t svn_cl__option
{"no-auth-cache", opt_no_auth_cache, 0,
N_("do not cache authentication tokens")},
{"trust-server-cert", opt_trust_server_cert, 0,
- N_("deprecated; same as --trust-unknown-ca")},
- {"trust-unknown-ca", opt_trust_server_cert_unknown_ca, 0,
- N_("with --non-interactive, accept SSL server\n"
+ N_("deprecated; same as\n"
" "
- "certificates from unknown certificate authorities")},
- {"trust-cn-mismatch", opt_trust_server_cert_cn_mismatch, 0,
+ "--trust-server-cert-failures=unknown-ca")},
+ {"trust-server-cert-failures", opt_trust_server_cert_failures, 1,
N_("with --non-interactive, accept SSL server\n"
" "
- "certificates even if the server hostname does not\n"
+ "certificates with failures; ARG is comma-separated\n"
" "
- "match the certificate's common name attribute")},
- {"trust-expired", opt_trust_server_cert_expired, 0,
- N_("with --non-interactive, accept expired SSL server\n"
+ "list of 'unknown-ca' (Unknown Authority),\n"
" "
- "certificates")},
- {"trust-not-yet-valid", opt_trust_server_cert_not_yet_valid, 0,
- N_("with --non-interactive, accept SSL server\n"
+ "'cn-mismatch' (Hostname mismatch), 'expired'\n"
" "
- "certificates from the future")},
- {"trust-other-failure", opt_trust_server_cert_other_failure, 0,
- N_("with --non-interactive, accept SSL server\n"
+ "(Expired certificate), 'not-yet-valid' (Not yet\n"
+ " "
+ "valid certificate) and 'other' (all other not\n"
" "
- "certificates with failures other than the above")},
+ "separately classified certificate errors).")},
{"non-interactive", opt_non_interactive, 0,
N_("do no interactive prompting (default is to prompt\n"
" "
@@ -459,9 +449,7 @@ const apr_getopt_option_t svn_cl__option
const int svn_cl__global_options[] =
{ opt_auth_username, opt_auth_password, opt_no_auth_cache, opt_non_interactive,
opt_force_interactive, opt_trust_server_cert,
- opt_trust_server_cert_unknown_ca, opt_trust_server_cert_cn_mismatch,
- opt_trust_server_cert_expired, opt_trust_server_cert_not_yet_valid,
- opt_trust_server_cert_other_failure,
+ opt_trust_server_cert_failures,
opt_config_dir, opt_config_options, 0
};
@@ -1457,6 +1445,8 @@ const svn_opt_subcommand_desc2_t svn_cl_
" directory:\n"
" svn:ignore - A list of file glob patterns to ignore, one per line.\n"
" svn:global-ignores - Like svn:ignore, but inheritable.\n"
+ " svn:auto-props - A list of file glob patterns and properties to set\n"
+ " when adding such files; like [auto-props] in the client configuration.\n"
" svn:externals - A list of module specifiers, one per line, in the\n"
" following format similar to the syntax of 'svn checkout':\n"
" [-r REV] URL[@PEG] LOCALPATH\n"
@@ -1638,8 +1628,8 @@ const svn_opt_subcommand_desc2_t svn_cl_
" ! C wc/qaz.c\n"
" > local missing, incoming edit upon update\n"
" D wc/qax.c\n"),
- { 'u', 'v', 'N', opt_depth, 'q', opt_no_ignore, opt_incremental, opt_xml,
- opt_ignore_externals, opt_changelist},
+ { 'u', 'v', 'N', opt_depth, 'r', 'q', opt_no_ignore, opt_incremental,
+ opt_xml, opt_ignore_externals, opt_changelist},
{{'q', N_("don't print unversioned items")}} },
{ "switch", svn_cl__switch, {"sw"}, N_
@@ -2185,20 +2175,17 @@ sub_main(int *exit_code, int argc, const
force_interactive = TRUE;
break;
case opt_trust_server_cert: /* backwards compat to 1.8 */
- case opt_trust_server_cert_unknown_ca:
opt_state.trust_server_cert_unknown_ca = TRUE;
break;
- case opt_trust_server_cert_cn_mismatch:
- opt_state.trust_server_cert_cn_mismatch = TRUE;
- break;
- case opt_trust_server_cert_expired:
- opt_state.trust_server_cert_expired = TRUE;
- break;
- case opt_trust_server_cert_not_yet_valid:
- opt_state.trust_server_cert_not_yet_valid = TRUE;
- break;
- case opt_trust_server_cert_other_failure:
- opt_state.trust_server_cert_other_failure = TRUE;
+ case opt_trust_server_cert_failures:
+ SVN_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool));
+ SVN_ERR(svn_cmdline__parse_trust_options(
+ &opt_state.trust_server_cert_unknown_ca,
+ &opt_state.trust_server_cert_cn_mismatch,
+ &opt_state.trust_server_cert_expired,
+ &opt_state.trust_server_cert_not_yet_valid,
+ &opt_state.trust_server_cert_other_failure,
+ utf8_opt_arg, pool));
break;
case opt_no_diff_added:
opt_state.diff.no_diff_added = TRUE;
@@ -2265,7 +2252,7 @@ sub_main(int *exit_code, int argc, const
SVN_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool));
SVN_ERR(svn_cmdline__parse_config_option(opt_state.config_options,
- utf8_opt_arg, pool));
+ utf8_opt_arg, "svn: ", pool));
break;
case opt_autoprops:
opt_state.autoprops = TRUE;
@@ -2635,25 +2622,13 @@ sub_main(int *exit_code, int argc, const
/* --trust-* options can only be used with --non-interactive */
if (!opt_state.non_interactive)
{
- if (opt_state.trust_server_cert_unknown_ca)
- return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
- _("--trust-unknown-ca requires "
- "--non-interactive"));
- if (opt_state.trust_server_cert_cn_mismatch)
- return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
- _("--trust-cn-mismatch requires "
- "--non-interactive"));
- if (opt_state.trust_server_cert_expired)
- return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
- _("--trust-expired requires "
- "--non-interactive"));
- if (opt_state.trust_server_cert_not_yet_valid)
- return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
- _("--trust-not-yet-valid requires "
- "--non-interactive"));
- if (opt_state.trust_server_cert_other_failure)
+ if (opt_state.trust_server_cert_unknown_ca
+ || opt_state.trust_server_cert_cn_mismatch
+ || opt_state.trust_server_cert_expired
+ || opt_state.trust_server_cert_not_yet_valid
+ || opt_state.trust_server_cert_other_failure)
return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
- _("--trust-other-failure requires "
+ _("--trust-server-cert-failures requires "
"--non-interactive"));
}
Modified: subversion/branches/1.10-cache-improvements/subversion/svnadmin/svnadmin.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/svnadmin/svnadmin.c?rev=1679139&r1=1679138&r2=1679139&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/svnadmin/svnadmin.c (original)
+++ subversion/branches/1.10-cache-improvements/subversion/svnadmin/svnadmin.c Wed May 13 04:51:26 2015
@@ -2510,6 +2510,7 @@ sub_main(int *exit_code, int argc, const
SVN_ERR(svn_stringbuf_from_file2(&(opt_state.filedata),
utf8_opt_arg, pool));
dash_F_arg = TRUE;
+ break;
case svnadmin__version:
opt_state.version = TRUE;
break;
Modified: subversion/branches/1.10-cache-improvements/subversion/svnbench/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/svnbench/cl.h?rev=1679139&r1=1679138&r2=1679139&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/svnbench/cl.h (original)
+++ subversion/branches/1.10-cache-improvements/subversion/svnbench/cl.h Wed May 13 04:51:26 2015
@@ -80,7 +80,6 @@ typedef struct svn_cl__opt_state_t
svn_boolean_t help; /* print usage message */
const char *auth_username; /* auth username */ /* UTF-8! */
const char *auth_password; /* auth password */ /* UTF-8! */
- const char *extensions; /* subprocess extension args */ /* UTF-8! */
apr_array_header_t *targets; /* target list from file */ /* UTF-8! */
svn_boolean_t no_auth_cache; /* do not cache authentication information */
svn_boolean_t stop_on_copy; /* don't cross copies during processing */
@@ -109,6 +108,7 @@ typedef struct svn_cl__cmd_baton_t
/* Declare all the command procedures */
svn_opt_subcommand_t
svn_cl__help,
+ svn_cl__null_blame,
svn_cl__null_export,
svn_cl__null_list,
svn_cl__null_log,
Modified: subversion/branches/1.10-cache-improvements/subversion/svnbench/svnbench.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/svnbench/svnbench.c?rev=1679139&r1=1679138&r2=1679139&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/svnbench/svnbench.c (original)
+++ subversion/branches/1.10-cache-improvements/subversion/svnbench/svnbench.c Wed May 13 04:51:26 2015
@@ -67,11 +67,7 @@ typedef enum svn_cl__longopt_t {
opt_with_all_revprops,
opt_with_no_revprops,
opt_trust_server_cert,
- opt_trust_server_cert_unknown_ca,
- opt_trust_server_cert_cn_mismatch,
- opt_trust_server_cert_expired,
- opt_trust_server_cert_not_yet_valid,
- opt_trust_server_cert_other_failure,
+ opt_trust_server_cert_failures,
opt_changelist
} svn_cl__longopt_t;
@@ -127,29 +123,23 @@ const apr_getopt_option_t svn_cl__option
{"no-auth-cache", opt_no_auth_cache, 0,
N_("do not cache authentication tokens")},
{"trust-server-cert", opt_trust_server_cert, 0,
- N_("deprecated; same as --trust-unknown-ca")},
- {"trust-unknown-ca", opt_trust_server_cert_unknown_ca, 0,
- N_("with --non-interactive, accept SSL server\n"
+ N_("deprecated; same as\n"
" "
- "certificates from unknown certificate authorities")},
- {"trust-cn-mismatch", opt_trust_server_cert_cn_mismatch, 0,
+ "--trust-server-cert-failures=unknown-ca")},
+ {"trust-server-cert-failures", opt_trust_server_cert_failures, 1,
N_("with --non-interactive, accept SSL server\n"
" "
- "certificates even if the server hostname does not\n"
+ "certificates with failures; ARG is comma-separated\n"
" "
- "match the certificate's common name attribute")},
- {"trust-expired", opt_trust_server_cert_expired, 0,
- N_("with --non-interactive, accept expired SSL server\n"
+ "list of 'unknown-ca' (Unknown Authority),\n"
" "
- "certificates")},
- {"trust-not-yet-valid", opt_trust_server_cert_not_yet_valid, 0,
- N_("with --non-interactive, accept SSL server\n"
+ "'cn-mismatch' (Hostname mismatch), 'expired'\n"
" "
- "certificates from the future")},
- {"trust-other-failure", opt_trust_server_cert_other_failure, 0,
- N_("with --non-interactive, accept SSL server\n"
+ "(Expired certificate), 'not-yet-valid' (Not yet\n"
" "
- "certificates with failures other than the above")},
+ "valid certificate) and 'other' (all other not\n"
+ " "
+ "separately classified certificate errors).")},
{"non-interactive", opt_non_interactive, 0,
N_("do no interactive prompting")},
{"config-dir", opt_config_dir, 1,
@@ -205,9 +195,7 @@ const apr_getopt_option_t svn_cl__option
willy-nilly to every invocation of 'svn') . */
const int svn_cl__global_options[] =
{ opt_auth_username, opt_auth_password, opt_no_auth_cache, opt_non_interactive,
- opt_trust_server_cert, opt_trust_server_cert_unknown_ca,
- opt_trust_server_cert_cn_mismatch, opt_trust_server_cert_expired,
- opt_trust_server_cert_not_yet_valid, opt_trust_server_cert_other_failure,
+ opt_trust_server_cert, opt_trust_server_cert_failures,
opt_config_dir, opt_config_options, 0
};
@@ -219,6 +207,26 @@ const svn_opt_subcommand_desc2_t svn_cl_
{0} },
/* This command is also invoked if we see option "--help", "-h" or "-?". */
+ { "null-blame", svn_cl__null_blame, {0}, N_
+ ("Fetch all versions of a file in a batch.\n"
+ "usage: null-blame [-rM:N] TARGET[@REV]...\n"
+ "\n"
+ " With no revision range (same as -r0:REV), or with '-r M:N' where M < N,\n"
+ " annotate each line that is present in revision N of the file, with\n"
+ " the last revision at or before rN that changed or added the line,\n"
+ " looking back no further than rM.\n"
+ "\n"
+ " With a reverse revision range '-r M:N' where M > N,\n"
+ " annotate each line that is present in revision N of the file, with\n"
+ " the next revision after rN that changed or deleted the line,\n"
+ " looking forward no further than rM.\n"
+ "\n"
+ " If specified, REV determines in which revision the target is first\n"
+ " looked up.\n"
+ "\n"
+ " Write the annotated result to standard output.\n"),
+ {'r', 'g'} },
+
{ "null-export", svn_cl__null_export, {0}, N_
("Create an unversioned copy of a tree.\n"
"usage: null-export [-r REV] URL[@PEGREV]\n"
@@ -281,8 +289,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
" follow copy history by default. Use --stop-on-copy to disable this\n"
" behavior, which can be useful for determining branchpoints.\n"),
{'r', 'q', 'v', 'g', 'c', opt_targets, opt_stop_on_copy,
- 'l', opt_with_all_revprops, opt_with_no_revprops, opt_with_revprop,
- 'x',},
+ 'l', opt_with_all_revprops, opt_with_no_revprops, opt_with_revprop,},
{{opt_with_revprop, N_("retrieve revision property ARG")},
{'c', N_("the change made in revision ARG")}} },
@@ -605,24 +612,17 @@ sub_main(int *exit_code, int argc, const
opt_state.non_interactive = TRUE;
break;
case opt_trust_server_cert: /* backwards compat to 1.8 */
- case opt_trust_server_cert_unknown_ca:
opt_state.trust_server_cert_unknown_ca = TRUE;
break;
- case opt_trust_server_cert_cn_mismatch:
- opt_state.trust_server_cert_cn_mismatch = TRUE;
- break;
- case opt_trust_server_cert_expired:
- opt_state.trust_server_cert_expired = TRUE;
- break;
- case opt_trust_server_cert_not_yet_valid:
- opt_state.trust_server_cert_not_yet_valid = TRUE;
- break;
- case opt_trust_server_cert_other_failure:
- opt_state.trust_server_cert_other_failure = TRUE;
- break;
- case 'x':
- SVN_ERR(svn_utf_cstring_to_utf8(&opt_state.extensions,
- opt_arg, pool));
+ case opt_trust_server_cert_failures:
+ SVN_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool));
+ SVN_ERR(svn_cmdline__parse_trust_options(
+ &opt_state.trust_server_cert_unknown_ca,
+ &opt_state.trust_server_cert_cn_mismatch,
+ &opt_state.trust_server_cert_expired,
+ &opt_state.trust_server_cert_not_yet_valid,
+ &opt_state.trust_server_cert_other_failure,
+ utf8_opt_arg, pool));
break;
case opt_config_dir:
{
@@ -639,7 +639,7 @@ sub_main(int *exit_code, int argc, const
SVN_ERR(svn_utf_cstring_to_utf8(&opt_arg, opt_arg, pool));
SVN_ERR(svn_cmdline__parse_config_option(opt_state.config_options,
- opt_arg, pool));
+ opt_arg, "svnbench: ", pool));
break;
case opt_with_all_revprops:
/* If --with-all-revprops is specified along with one or more
@@ -798,25 +798,13 @@ sub_main(int *exit_code, int argc, const
/* --trust-* options can only be used with --non-interactive */
if (!opt_state.non_interactive)
{
- if (opt_state.trust_server_cert_unknown_ca)
- return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
- _("--trust-unknown-ca requires "
- "--non-interactive"));
- if (opt_state.trust_server_cert_cn_mismatch)
- return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
- _("--trust-cn-mismatch requires "
- "--non-interactive"));
- if (opt_state.trust_server_cert_expired)
+ if (opt_state.trust_server_cert_unknown_ca
+ || opt_state.trust_server_cert_cn_mismatch
+ || opt_state.trust_server_cert_expired
+ || opt_state.trust_server_cert_not_yet_valid
+ || opt_state.trust_server_cert_other_failure)
return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
- _("--trust-expired requires "
- "--non-interactive"));
- if (opt_state.trust_server_cert_not_yet_valid)
- return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
- _("--trust-not-yet-valid requires "
- "--non-interactive"));
- if (opt_state.trust_server_cert_other_failure)
- return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
- _("--trust-other-failure requires "
+ _("--trust-server-cert-failures requires "
"--non-interactive"));
}
@@ -842,7 +830,8 @@ sub_main(int *exit_code, int argc, const
/* Only a few commands can accept a revision range; the rest can take at
most one revision number. */
- if (subcommand->cmd_func != svn_cl__null_log)
+ if (subcommand->cmd_func != svn_cl__null_blame
+ && subcommand->cmd_func != svn_cl__null_log)
{
if (opt_state.end_revision.kind != svn_opt_revision_unspecified)
{
Modified: subversion/branches/1.10-cache-improvements/subversion/svnmucc/svnmucc.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/svnmucc/svnmucc.c?rev=1679139&r1=1679138&r2=1679139&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/svnmucc/svnmucc.c (original)
+++ subversion/branches/1.10-cache-improvements/subversion/svnmucc/svnmucc.c Wed May 13 04:51:26 2015
@@ -295,18 +295,16 @@ help(FILE *stream, apr_pool_t *pool)
" prompt only if standard input is a terminal)\n"
" --force-interactive : do interactive prompting even if standard\n"
" input is not a terminal\n"
- " --trust-server-cert : deprecated; same as --trust-unknown-ca\n"
- " --trust-unknown-ca : with --non-interactive, accept SSL server\n"
- " certificates from unknown certificate authorities\n"
- " --trust-cn-mismatch : with --non-interactive, accept SSL server\n"
- " certificates even if the server hostname does not\n"
- " match the certificate's common name attribute\n"
- " --trust-expired : with --non-interactive, accept expired SSL server\n"
- " certificates\n"
- " --trust-not-yet-valid : with --non-interactive, accept SSL server\n"
- " certificates from the future\n"
- " --trust-other-failure : with --non-interactive, accept SSL server\n"
- " certificates with failures other than the above\n"
+ " --trust-server-cert : deprecated;\n"
+ " same as --trust-server-cert-failures=unknown-ca\n"
+ " --trust-server-cert-failures ARG\n"
+ " with --non-interactive, accept SSL server\n"
+ " certificates with failures; ARG is comma-separated\n"
+ " list of 'unknown-ca' (Unknown Authority),\n"
+ " 'cn-mismatch' (Hostname mismatch), 'expired'\n"
+ " (Expired certificate),'not-yet-valid' (Not yet\n"
+ " valid certificate) and 'other' (all other not\n"
+ " separately classified certificate errors).\n"
" -X [--extra-args] ARG : append arguments from file ARG (one per line;\n"
" use \"-\" to read from standard input)\n"
" --config-dir ARG : use ARG to override the config directory\n"
@@ -472,11 +470,7 @@ sub_main(int *exit_code, int argc, const
non_interactive_opt,
force_interactive_opt,
trust_server_cert_opt,
- trust_server_cert_unknown_ca_opt,
- trust_server_cert_cn_mismatch_opt,
- trust_server_cert_expired_opt,
- trust_server_cert_not_yet_valid_opt,
- trust_server_cert_other_failure_opt,
+ trust_server_cert_failures_opt,
};
static const apr_getopt_option_t options[] = {
{"message", 'm', 1, ""},
@@ -492,11 +486,7 @@ sub_main(int *exit_code, int argc, const
{"non-interactive", non_interactive_opt, 0, ""},
{"force-interactive", force_interactive_opt, 0, ""},
{"trust-server-cert", trust_server_cert_opt, 0, ""},
- {"trust-unknown-ca", trust_server_cert_unknown_ca_opt, 0, ""},
- {"trust-cn-mismatch", trust_server_cert_cn_mismatch_opt, 0, ""},
- {"trust-expired", trust_server_cert_expired_opt, 0, ""},
- {"trust-not-yet-valid", trust_server_cert_not_yet_valid_opt, 0, ""},
- {"trust-other-failure", trust_server_cert_other_failure_opt, 0, ""},
+ {"trust-server-cert-failures", trust_server_cert_failures_opt, 1, ""},
{"config-dir", config_dir_opt, 1, ""},
{"config-option", config_inline_opt, 1, ""},
{"no-auth-cache", no_auth_cache_opt, 0, ""},
@@ -604,20 +594,17 @@ sub_main(int *exit_code, int argc, const
force_interactive = TRUE;
break;
case trust_server_cert_opt: /* backward compat */
- case trust_server_cert_unknown_ca_opt:
trust_unknown_ca = TRUE;
break;
- case trust_server_cert_cn_mismatch_opt:
- trust_cn_mismatch = TRUE;
- break;
- case trust_server_cert_expired_opt:
- trust_expired = TRUE;
- break;
- case trust_server_cert_not_yet_valid_opt:
- trust_not_yet_valid = TRUE;
- break;
- case trust_server_cert_other_failure_opt:
- trust_other_failure = TRUE;
+ case trust_server_cert_failures_opt:
+ SVN_ERR(svn_utf_cstring_to_utf8(&opt_arg, arg, pool));
+ SVN_ERR(svn_cmdline__parse_trust_options(
+ &trust_unknown_ca,
+ &trust_cn_mismatch,
+ &trust_expired,
+ &trust_not_yet_valid,
+ &trust_other_failure,
+ opt_arg, pool));
break;
case config_dir_opt:
SVN_ERR(svn_utf_cstring_to_utf8(&config_dir, arg, pool));
@@ -625,6 +612,7 @@ sub_main(int *exit_code, int argc, const
case config_inline_opt:
SVN_ERR(svn_utf_cstring_to_utf8(&opt_arg, arg, pool));
SVN_ERR(svn_cmdline__parse_config_option(config_options, opt_arg,
+ "svnmucc: ",
pool));
break;
case no_auth_cache_opt:
@@ -664,25 +652,10 @@ sub_main(int *exit_code, int argc, const
if (!non_interactive)
{
- if (trust_unknown_ca)
- return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
- _("--trust-unknown-ca requires "
- "--non-interactive"));
- if (trust_cn_mismatch)
- return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
- _("--trust-cn-mismatch requires "
- "--non-interactive"));
- if (trust_expired)
- return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
- _("--trust-expired requires "
- "--non-interactive"));
- if (trust_not_yet_valid)
- return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
- _("--trust-not-yet-valid requires "
- "--non-interactive"));
- if (trust_other_failure)
+ if (trust_unknown_ca || trust_cn_mismatch || trust_expired
+ || trust_not_yet_valid || trust_other_failure)
return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
- _("--trust-other-failure requires "
+ _("--trust-server-cert-failures requires "
"--non-interactive"));
}
Modified: subversion/branches/1.10-cache-improvements/subversion/svnrdump/svnrdump.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/svnrdump/svnrdump.c?rev=1679139&r1=1679138&r2=1679139&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/svnrdump/svnrdump.c (original)
+++ subversion/branches/1.10-cache-improvements/subversion/svnrdump/svnrdump.c Wed May 13 04:51:26 2015
@@ -85,11 +85,7 @@ enum svn_svnrdump__longopt_t
opt_force_interactive,
opt_incremental,
opt_trust_server_cert,
- opt_trust_server_cert_unknown_ca,
- opt_trust_server_cert_cn_mismatch,
- opt_trust_server_cert_expired,
- opt_trust_server_cert_not_yet_valid,
- opt_trust_server_cert_other_failure,
+ opt_trust_server_cert_failures,
opt_version
};
@@ -99,11 +95,7 @@ enum svn_svnrdump__longopt_t
opt_auth_password, \
opt_auth_nocache, \
opt_trust_server_cert, \
- opt_trust_server_cert_unknown_ca, \
- opt_trust_server_cert_cn_mismatch, \
- opt_trust_server_cert_expired, \
- opt_trust_server_cert_not_yet_valid, \
- opt_trust_server_cert_other_failure, \
+ opt_trust_server_cert_failures, \
opt_non_interactive, \
opt_force_interactive
@@ -164,30 +156,24 @@ static const apr_getopt_option_t svnrdum
"For example:\n"
" "
" servers:global:http-library=serf")},
- {"trust-server-cert", opt_trust_server_cert, 0,
- N_("deprecated; same as --trust-unknown-ca")},
- {"trust-unknown-ca", opt_trust_server_cert_unknown_ca, 0,
- N_("with --non-interactive, accept SSL server\n"
- " "
- "certificates from unknown certificate authorities")},
- {"trust-cn-mismatch", opt_trust_server_cert_cn_mismatch, 0,
- N_("with --non-interactive, accept SSL server\n"
- " "
- "certificates even if the server hostname does not\n"
- " "
- "match the certificate's common name attribute")},
- {"trust-expired", opt_trust_server_cert_expired, 0,
- N_("with --non-interactive, accept expired SSL server\n"
- " "
- "certificates")},
- {"trust-not-yet-valid", opt_trust_server_cert_not_yet_valid, 0,
- N_("with --non-interactive, accept SSL server\n"
- " "
- "certificates from the future")},
- {"trust-other-failure", opt_trust_server_cert_other_failure, 0,
- N_("with --non-interactive, accept SSL server\n"
- " "
- "certificates with failures other than the above")},
+ {"trust-server-cert", opt_trust_server_cert, 0,
+ N_("deprecated; same as\n"
+ " "
+ "--trust-server-cert-failures=unknown-ca")},
+ {"trust-server-cert-failures", opt_trust_server_cert_failures, 1,
+ N_("with --non-interactive, accept SSL server\n"
+ " "
+ "certificates with failures; ARG is comma-separated\n"
+ " "
+ "list of 'unknown-ca' (Unknown Authority),\n"
+ " "
+ "'cn-mismatch' (Hostname mismatch), 'expired'\n"
+ " "
+ "(Expired certificate), 'not-yet-valid' (Not yet\n"
+ " "
+ "valid certificate) and 'other' (all other not\n"
+ " "
+ "separately classified certificate errors).")},
{0, 0, 0, 0}
};
@@ -927,20 +913,17 @@ sub_main(int *exit_code, int argc, const
svn_hash_sets(opt_baton->skip_revprops, opt_arg, opt_arg);
break;
case opt_trust_server_cert: /* backward compat */
- case opt_trust_server_cert_unknown_ca:
trust_unknown_ca = TRUE;
break;
- case opt_trust_server_cert_cn_mismatch:
- trust_cn_mismatch = TRUE;
- break;
- case opt_trust_server_cert_expired:
- trust_expired = TRUE;
- break;
- case opt_trust_server_cert_not_yet_valid:
- trust_not_yet_valid = TRUE;
- break;
- case opt_trust_server_cert_other_failure:
- trust_other_failure = TRUE;
+ case opt_trust_server_cert_failures:
+ SVN_ERR(svn_utf_cstring_to_utf8(&opt_arg, opt_arg, pool));
+ SVN_ERR(svn_cmdline__parse_trust_options(
+ &trust_unknown_ca,
+ &trust_cn_mismatch,
+ &trust_expired,
+ &trust_not_yet_valid,
+ &trust_other_failure,
+ opt_arg, pool));
break;
case opt_config_option:
if (!config_options)
@@ -950,7 +933,9 @@ sub_main(int *exit_code, int argc, const
SVN_ERR(svn_utf_cstring_to_utf8(&opt_arg, opt_arg, pool));
SVN_ERR(svn_cmdline__parse_config_option(config_options,
- opt_arg, pool));
+ opt_arg,
+ "svnrdump: ",
+ pool));
}
}
@@ -1059,25 +1044,10 @@ sub_main(int *exit_code, int argc, const
/* --trust-* can only be used with --non-interactive */
if (!non_interactive)
{
- if (trust_unknown_ca)
- return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
- _("--trust-unknown-ca requires "
- "--non-interactive"));
- if (trust_cn_mismatch)
- return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
- _("--trust-cn-mismatch requires "
- "--non-interactive"));
- if (trust_expired)
- return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
- _("--trust-expired requires "
- "--non-interactive"));
- if (trust_not_yet_valid)
- return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
- _("--trust-not-yet-valid requires "
- "--non-interactive"));
- if (trust_other_failure)
+ if (trust_unknown_ca || trust_cn_mismatch || trust_expired
+ || trust_not_yet_valid || trust_other_failure)
return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
- _("--trust-other-failure requires "
+ _("--trust-server-cert-failures requires "
"--non-interactive"));
}
Modified: subversion/branches/1.10-cache-improvements/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/svnserve/serve.c?rev=1679139&r1=1679138&r2=1679139&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/svnserve/serve.c (original)
+++ subversion/branches/1.10-cache-improvements/subversion/svnserve/serve.c Wed May 13 04:51:26 2015
@@ -1779,12 +1779,9 @@ static svn_error_t *get_dir(svn_ra_svn_c
if (dirent_fields & SVN_DIRENT_HAS_PROPS)
{
- apr_hash_t *file_props;
-
/* has_props */
- SVN_CMD_ERR(svn_fs_node_proplist(&file_props, root, file_path,
+ SVN_CMD_ERR(svn_fs_node_has_props(&has_props, root, file_path,
subpool));
- has_props = (apr_hash_count(file_props) > 0);
}
if ((dirent_fields & SVN_DIRENT_LAST_AUTHOR)
Modified: subversion/branches/1.10-cache-improvements/subversion/svnsync/svnsync.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/svnsync/svnsync.c?rev=1679139&r1=1679138&r2=1679139&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/svnsync/svnsync.c (original)
+++ subversion/branches/1.10-cache-improvements/subversion/svnsync/svnsync.c Wed May 13 04:51:26 2015
@@ -68,11 +68,7 @@ enum svnsync__opt {
svnsync_opt_disable_locking,
svnsync_opt_version,
svnsync_opt_trust_server_cert,
- svnsync_opt_trust_server_cert_unknown_ca,
- svnsync_opt_trust_server_cert_cn_mismatch,
- svnsync_opt_trust_server_cert_expired,
- svnsync_opt_trust_server_cert_not_yet_valid,
- svnsync_opt_trust_server_cert_other_failure,
+ svnsync_opt_trust_server_cert_failures,
svnsync_opt_allow_non_empty,
svnsync_opt_steal_lock
};
@@ -83,11 +79,7 @@ enum svnsync__opt {
svnsync_opt_auth_username, \
svnsync_opt_auth_password, \
svnsync_opt_trust_server_cert, \
- svnsync_opt_trust_server_cert_unknown_ca, \
- svnsync_opt_trust_server_cert_cn_mismatch, \
- svnsync_opt_trust_server_cert_expired, \
- svnsync_opt_trust_server_cert_not_yet_valid, \
- svnsync_opt_trust_server_cert_other_failure, \
+ svnsync_opt_trust_server_cert_failures, \
svnsync_opt_source_username, \
svnsync_opt_source_password, \
svnsync_opt_sync_username, \
@@ -204,29 +196,23 @@ static const apr_getopt_option_t svnsync
" "
"see --source-password and --sync-password)") },
{"trust-server-cert", svnsync_opt_trust_server_cert, 0,
- N_("deprecated; same as --trust-unknown-ca")},
- {"trust-unknown-ca", svnsync_opt_trust_server_cert_unknown_ca, 0,
- N_("with --non-interactive, accept SSL server\n"
+ N_("deprecated; same as\n"
" "
- "certificates from unknown certificate authorities")},
- {"trust-cn-mismatch", svnsync_opt_trust_server_cert_cn_mismatch, 0,
+ "--trust-server-cert-failures=unknown-ca")},
+ {"trust-server-cert-failures", svnsync_opt_trust_server_cert_failures, 1,
N_("with --non-interactive, accept SSL server\n"
" "
- "certificates even if the server hostname does not\n"
+ "certificates with failures; ARG is comma-separated\n"
" "
- "match the certificate's common name attribute")},
- {"trust-expired", svnsync_opt_trust_server_cert_expired, 0,
- N_("with --non-interactive, accept expired SSL server\n"
+ "list of 'unknown-ca' (Unknown Authority),\n"
" "
- "certificates")},
- {"trust-not-yet-valid", svnsync_opt_trust_server_cert_not_yet_valid, 0,
- N_("with --non-interactive, accept SSL server\n"
+ "'cn-mismatch' (Hostname mismatch), 'expired'\n"
" "
- "certificates from the future")},
- {"trust-other-failure", svnsync_opt_trust_server_cert_other_failure, 0,
- N_("with --non-interactive, accept SSL server\n"
+ "(Expired certificate), 'not-yet-valid' (Not yet\n"
" "
- "certificates with failures other than the above")},
+ "valid certificate) and 'other' (all other not\n"
+ " "
+ "separately classified certificate errors).")},
{"source-username", svnsync_opt_source_username, 1,
N_("connect to source repository with username ARG") },
{"source-password", svnsync_opt_source_password, 1,
@@ -2008,24 +1994,18 @@ sub_main(int *exit_code, int argc, const
break;
case svnsync_opt_trust_server_cert: /* backwards compat */
- case svnsync_opt_trust_server_cert_unknown_ca:
opt_baton.trust_server_cert_unknown_ca = TRUE;
break;
- case svnsync_opt_trust_server_cert_cn_mismatch:
- opt_baton.trust_server_cert_cn_mismatch = TRUE;
- break;
-
- case svnsync_opt_trust_server_cert_expired:
- opt_baton.trust_server_cert_expired = TRUE;
- break;
-
- case svnsync_opt_trust_server_cert_not_yet_valid:
- opt_baton.trust_server_cert_not_yet_valid = TRUE;
- break;
-
- case svnsync_opt_trust_server_cert_other_failure:
- opt_baton.trust_server_cert_other_failure = TRUE;
+ case svnsync_opt_trust_server_cert_failures:
+ SVN_ERR(svn_utf_cstring_to_utf8(&opt_arg, opt_arg, pool));
+ SVN_ERR(svn_cmdline__parse_trust_options(
+ &opt_baton.trust_server_cert_unknown_ca,
+ &opt_baton.trust_server_cert_cn_mismatch,
+ &opt_baton.trust_server_cert_expired,
+ &opt_baton.trust_server_cert_not_yet_valid,
+ &opt_baton.trust_server_cert_other_failure,
+ opt_arg, pool));
break;
case svnsync_opt_no_auth_cache:
@@ -2073,7 +2053,8 @@ sub_main(int *exit_code, int argc, const
SVN_ERR(svn_utf_cstring_to_utf8(&opt_arg, opt_arg, pool));
SVN_ERR(svn_cmdline__parse_config_option(config_options,
- opt_arg, pool));
+ opt_arg, "svnsync: ",
+ pool));
break;
case svnsync_opt_source_prop_encoding:
@@ -2139,6 +2120,7 @@ sub_main(int *exit_code, int argc, const
apr_psprintf(pool,
"config:miscellany:memory-cache-size=%s",
opt_arg),
+ NULL /* won't be used */,
pool));
break;
@@ -2214,25 +2196,13 @@ sub_main(int *exit_code, int argc, const
/* --trust-* can only be used with --non-interactive */
if (!opt_baton.non_interactive)
{
- if (opt_baton.trust_server_cert_unknown_ca)
- return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
- _("--trust-unknown-ca requires "
- "--non-interactive"));
- if (opt_baton.trust_server_cert_cn_mismatch)
- return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
- _("--trust-cn-mismatch requires "
- "--non-interactive"));
- if (opt_baton.trust_server_cert_expired)
- return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
- _("--trust-expired requires "
- "--non-interactive"));
- if (opt_baton.trust_server_cert_not_yet_valid)
- return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
- _("--trust-not-yet-valid requires "
- "--non-interactive"));
- if (opt_baton.trust_server_cert_other_failure)
+ if (opt_baton.trust_server_cert_unknown_ca
+ || opt_baton.trust_server_cert_cn_mismatch
+ || opt_baton.trust_server_cert_expired
+ || opt_baton.trust_server_cert_not_yet_valid
+ || opt_baton.trust_server_cert_other_failure)
return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
- _("--trust-other-failure requires "
+ _("--trust-server-cert-failures requires "
"--non-interactive"));
}
Modified: subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/basic_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/basic_tests.py?rev=1679139&r1=1679138&r2=1679139&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/basic_tests.py (original)
+++ subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/basic_tests.py Wed May 13 04:51:26 2015
@@ -3100,6 +3100,7 @@ def plaintext_password_storage_disabled(
"-m", "committing with plaintext password storage disabled",
"--username", svntest.main.wc_author,
"--password", svntest.main.wc_passwd,
+ "--trust-server-cert-failures", "unknown-ca",
"--non-interactive", wc_dir)
# Verify that the password was not stored in plaintext
Modified: subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/checkout_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/checkout_tests.py?rev=1679139&r1=1679138&r2=1679139&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/checkout_tests.py (original)
+++ subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/checkout_tests.py Wed May 13 04:51:26 2015
@@ -1044,6 +1044,7 @@ def co_with_obstructing_local_adds(sbox)
#----------------------------------------------------------------------
# Test if checking out from a Windows driveroot is supported.
+@SkipUnless(svntest.main.is_os_windows)
def checkout_wc_from_drive(sbox):
"checkout from the root of a Windows drive"
@@ -1070,10 +1071,6 @@ def checkout_wc_from_drive(sbox):
return None
- # Skip the test if not on Windows
- if not svntest.main.windows:
- raise svntest.Skip
-
# just create an empty folder, we'll checkout later.
sbox.build(create_wc = False)
svntest.main.safe_rmtree(sbox.wc_dir)
@@ -1082,7 +1079,7 @@ def checkout_wc_from_drive(sbox):
# create a virtual drive to the repository folder
drive = find_the_next_available_drive_letter()
if drive is None:
- raise svntest.Skip
+ raise svntest.Skip('No drive letter available')
subprocess.call(['subst', drive +':', sbox.repo_dir])
repo_url = 'file:///' + drive + ':/'
Modified: subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/commit_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/commit_tests.py?rev=1679139&r1=1679138&r2=1679139&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/commit_tests.py (original)
+++ subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/commit_tests.py Wed May 13 04:51:26 2015
@@ -3087,6 +3087,32 @@ def mkdir_conflict_proper_error(sbox):
'mkdir', repo_url + '/A',
'-m', '')
+def commit_xml(sbox):
+ "commit an xml file"
+
+ sbox.build()
+
+ sbox.simple_add_text('index.xml', 'index.xml')
+ sbox.simple_add_text('index.html', 'index.html')
+ sbox.simple_propset('svn:mime-type', 'text/xml', 'index.xml')
+ sbox.simple_propset('svn:mime-type', 'text/html', 'index.html')
+
+ # This currently (2015-04-09) makes mod_dav return a 'HTTP/1.1 201 Created'
+ # result with content type text/xml (copied from file), which used to
+ # invoke the error parsing.
+ #
+ # Depending on the Apache version and config, this may cause an xml error.
+ sbox.simple_commit()
+
+ # This currently (2015-04-09) makes mod_dav return a 'HTTP/1.1 204 Updated'
+ # result with content type text/xml (copied from file), which used to
+ # invoke the error parsing.
+ #
+ # Depending on the Apache version and config, this may cause an xml error.
+ sbox.simple_append('index.xml', '<Q></R>', True)
+ sbox.simple_append('index.html', '<Q></R>', True)
+ sbox.simple_commit()
+
########################################################################
# Run the tests
@@ -3163,6 +3189,7 @@ test_list = [ None,
commit_deep_deleted,
commit_mergeinfo_ood,
mkdir_conflict_proper_error,
+ commit_xml,
]
if __name__ == '__main__':
Modified: subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/copy_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/copy_tests.py?rev=1679139&r1=1679138&r2=1679139&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/copy_tests.py (original)
+++ subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/copy_tests.py Wed May 13 04:51:26 2015
@@ -5822,6 +5822,17 @@ def copy_subtree_deleted(sbox):
svntest.actions.run_and_verify_commit(wc2_dir,
expected_output, None)
+def resurrect_at_root(sbox):
+ "resurrect directory at root"
+
+ sbox.build(create_wc=False)
+
+ svntest.actions.run_and_verify_svn(None, [], 'rm', sbox.repo_url + '/A',
+ '-m', '')
+
+ svntest.actions.run_and_verify_svn(None, [], 'cp',
+ sbox.repo_url + '/A/D/H@1',
+ sbox.repo_url + '/A', '-m', '')
########################################################################
# Run the tests
@@ -5943,6 +5954,7 @@ test_list = [ None,
copy_relocate,
ext_wc_copy_deleted,
copy_subtree_deleted,
+ resurrect_at_root,
]
if __name__ == '__main__':
Modified: subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/diff_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/diff_tests.py?rev=1679139&r1=1679138&r2=1679139&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/diff_tests.py Wed May 13 04:51:26 2015
@@ -4867,6 +4867,151 @@ def diff_summarize_ignore_properties(sbo
svntest.actions.run_and_verify_diff_summarize_xml(
[], wc_dir, paths, items, props, kinds, wc_dir, '--ignore-properties')
+def diff_incomplete(sbox):
+ "diff incomplete directory"
+
+ sbox.build()
+ svntest.actions.run_and_verify_svn(None, [], 'rm', sbox.repo_url + '/A',
+ '-m', '')
+
+ # This works ok
+ _, out1a, _ = svntest.actions.run_and_verify_svn(None, [], 'diff',
+ '-r', 'HEAD',
+ sbox.wc_dir,
+ '--notice-ancestry')
+
+ _, out1b, _ = svntest.actions.run_and_verify_svn(None, [], 'diff',
+ sbox.wc_dir,
+ '--notice-ancestry')
+
+
+ svntest.main.run_wc_incomplete_tester(sbox.ospath('A'), 1)
+
+ # And this used to miss certain changes
+ _, out2a, _ = svntest.actions.run_and_verify_svn(None, [], 'diff',
+ '-r', 'HEAD',
+ sbox.wc_dir,
+ '--notice-ancestry')
+
+ _, out2b, _ = svntest.actions.run_and_verify_svn(None, [], 'diff',
+ sbox.wc_dir,
+ '--notice-ancestry')
+
+ # Ordering may be different, but length should match
+ if len(out1a) != len(out2a):
+ raise svntest.Failure('Different output when incomplete against repos')
+
+ svntest.verify.compare_and_display_lines('local diff', 'local diff', out1b,
+ out2b)
+
+ # And add a replacement on top of the incomplete, server side
+ svntest.actions.run_and_verify_svn(None, [], 'cp',
+ sbox.repo_url + '/A/D/H@1',
+ sbox.repo_url + '/A', '-m', '')
+
+ svntest.actions.run_and_verify_svn(None, [], 'diff',
+ '-r', 'HEAD',
+ sbox.wc_dir,
+ '--notice-ancestry')
+
+ # And client side
+ svntest.actions.run_and_verify_svn(None, [], 'rm', sbox.ospath('A'),
+ '--force')
+ sbox.simple_mkdir('A')
+ svntest.actions.run_and_verify_svn(None, [], 'diff',
+ '-r', 'HEAD',
+ sbox.wc_dir,
+ '--notice-ancestry')
+
+ svntest.actions.run_and_verify_svn(None, [], 'diff',
+ sbox.wc_dir,
+ '--notice-ancestry')
+
+def diff_incomplete_props(sbox):
+ "incomplete set of properties"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ sbox.simple_propset('r2-1', 'r2', 'iota', 'A')
+ sbox.simple_propset('r2-2', 'r2', 'iota', 'A')
+ sbox.simple_propset('r', 'r2', 'iota', 'A')
+ sbox.simple_commit() # r2
+
+ svntest.actions.run_and_verify_svnmucc(None, [],
+ '-U', sbox.repo_url,
+ 'propset', 'r3-1', 'r3', 'iota',
+ 'propset', 'r3-1', 'r3', 'A',
+ 'propset', 'r3-2', 'r3', 'iota',
+ 'propset', 'r3-2', 'r3', 'A',
+ 'propset', 'r', 'r3', 'iota',
+ 'propset', 'r', 'r3', 'A',
+ 'propdel', 'r2-1', 'iota',
+ 'propdel', 'r2-1', 'A',
+ 'propdel', 'r2-2', 'iota',
+ 'propdel', 'r2-2', 'A',
+ '-m', 'r3')
+
+ _, out1, _ = svntest.actions.run_and_verify_svn(None, [], 'diff',
+ '-r', 'HEAD', wc_dir,
+ '--notice-ancestry')
+
+ # Now simulate a broken update to r3
+ svntest.actions.set_incomplete(wc_dir, 3)
+ svntest.actions.set_incomplete(sbox.ospath('A'), 3)
+
+ # The properties are still at r2
+ expected_disk = svntest.main.greek_state.copy()
+ expected_disk.tweak('iota', 'A', props={'r2-1':'r2', 'r2-2':'r2', 'r':'r2'})
+ svntest.actions.verify_disk(wc_dir, expected_disk, True)
+
+ # But the working copy is incomplete at r3
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+ expected_status.tweak('iota', wc_rev=2)
+ expected_status.tweak('', 'A', wc_rev=3, status='! ')
+ svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+ expected_output = svntest.wc.State(wc_dir, {
+ 'A' : Item(status=' U'),
+ 'iota' : Item(status=' U'),
+ })
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 3)
+ expected_disk = svntest.main.greek_state.copy()
+
+ # Expect that iota and A have the expected sets of properties
+ # The r2 set is properly deleted where necessary
+ expected_disk.tweak('iota', 'A', props={'r3-2':'r3', 'r':'r3', 'r3-1':'r3'})
+
+ _, out2, _ = svntest.actions.run_and_verify_svn(None, [], 'diff',
+ '-r', 'HEAD', wc_dir,
+ '--notice-ancestry')
+
+ svntest.actions.run_and_verify_update(wc_dir,
+ expected_output, expected_disk,
+ expected_status, [], True)
+
+ # Ok, we tested that the update worked properly, but we also do this
+ # in the update tests... Let's see, what the diffs said
+
+ _, out3, _ = svntest.actions.run_and_verify_svn(None, [], 'diff',
+ '-r', 'BASE:2', wc_dir,
+ '--notice-ancestry')
+
+ # Filter out all headers (which include revisions, etc.)
+ out1 = [i for i in out1 if i[0].isupper()]
+ out1.sort()
+
+ out2 = [i for i in out2 if i[0].isupper()]
+ out2.sort()
+
+ out3 = [i for i in out3 if i[0].isupper()]
+ out3.sort()
+
+ svntest.verify.compare_and_display_lines('base vs incomplete', 'local diff',
+ out1, out2)
+
+ svntest.verify.compare_and_display_lines('base vs after', 'local diff',
+ out1, out3)
########################################################################
#Run the tests
@@ -4959,6 +5104,8 @@ test_list = [ None,
diff_replaced_moved,
diff_local_copied_dir,
diff_summarize_ignore_properties,
+ diff_incomplete,
+ diff_incomplete_props,
]
if __name__ == '__main__':
Modified: subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/getopt_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/getopt_tests.py?rev=1679139&r1=1679138&r2=1679139&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/getopt_tests.py (original)
+++ subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/getopt_tests.py Wed May 13 04:51:26 2015
@@ -223,6 +223,18 @@ def getopt_help_bogus_cmd(sbox):
"run svn help bogus-cmd"
run_one_test(sbox, 'svn_help_bogus-cmd', 'help', 'bogus-cmd')
+def getopt_config_option(sbox):
+ "--config-option's spell checking"
+ sbox.build(create_wc=False, read_only=True)
+ expected_stderr = '.*W205000.*did you mean.*'
+ expected_stdout = svntest.verify.AnyOutput
+ svntest.actions.run_and_verify_svn2(expected_stdout, expected_stderr, 0,
+ 'info',
+ '--config-option',
+ 'config:miscellanous:diff-extensions=' +
+ '-u -p',
+ sbox.repo_url)
+
########################################################################
# Run the tests
@@ -237,6 +249,7 @@ test_list = [ None,
getopt_help,
getopt_help_bogus_cmd,
getopt_help_log_switch,
+ getopt_config_option,
]
if __name__ == '__main__':
Propchange: subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/getopt_tests_data/svn--help_stderr
------------------------------------------------------------------------------
svn:eol-style = LF
Propchange: subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout
------------------------------------------------------------------------------
svn:eol-style = LF
Propchange: subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/getopt_tests_data/svn--version--quiet_stderr
------------------------------------------------------------------------------
svn:eol-style = LF
Propchange: subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/getopt_tests_data/svn--version--quiet_stdout
------------------------------------------------------------------------------
svn:eol-style = LF
Propchange: subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/getopt_tests_data/svn--version--verbose_stderr
------------------------------------------------------------------------------
svn:eol-style = LF
Propchange: subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/getopt_tests_data/svn--version--verbose_stdout
------------------------------------------------------------------------------
svn:eol-style = LF
Propchange: subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/getopt_tests_data/svn--version_stderr
------------------------------------------------------------------------------
svn:eol-style = LF
Propchange: subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/getopt_tests_data/svn--version_stdout
------------------------------------------------------------------------------
svn:eol-style = LF
Propchange: subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/getopt_tests_data/svn_help--version_stderr
------------------------------------------------------------------------------
svn:eol-style = LF
Propchange: subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/getopt_tests_data/svn_help--version_stdout
------------------------------------------------------------------------------
svn:eol-style = LF
Propchange: subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/getopt_tests_data/svn_help_bogus-cmd_stderr
------------------------------------------------------------------------------
svn:eol-style = LF
Propchange: subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/getopt_tests_data/svn_help_bogus-cmd_stdout
------------------------------------------------------------------------------
svn:eol-style = LF
Propchange: subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stderr
------------------------------------------------------------------------------
svn:eol-style = LF
Modified: subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout?rev=1679139&r1=1679138&r2=1679139&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout (original)
+++ subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout Wed May 13 04:51:26 2015
@@ -122,18 +122,15 @@ Global options:
only if standard input is a terminal device)
--force-interactive : do interactive prompting even if standard input
is not a terminal device
- --trust-server-cert : deprecated; same as --trust-unknown-ca
- --trust-unknown-ca : with --non-interactive, accept SSL server
- certificates from unknown certificate authorities
- --trust-cn-mismatch : with --non-interactive, accept SSL server
- certificates even if the server hostname does not
- match the certificate's common name attribute
- --trust-expired : with --non-interactive, accept expired SSL server
- certificates
- --trust-not-yet-valid : with --non-interactive, accept SSL server
- certificates from the future
- --trust-other-failure : with --non-interactive, accept SSL server
- certificates with failures other than the above
+ --trust-server-cert : deprecated; same as
+ --trust-server-cert-failures=unknown-ca
+ --trust-server-cert-failures ARG : with --non-interactive, accept SSL server
+ certificates with failures; ARG is comma-separated
+ list of 'unknown-ca' (Unknown Authority),
+ 'cn-mismatch' (Hostname mismatch), 'expired'
+ (Expired certificate), 'not-yet-valid' (Not yet
+ valid certificate) and 'other' (all other not
+ separately classified certificate errors).
--config-dir ARG : read user configuration files from directory ARG
--config-option ARG : set user configuration option in the format:
FILE:SECTION:OPTION=[VALUE]
@@ -215,18 +212,15 @@ Global options:
only if standard input is a terminal device)
--force-interactive : do interactive prompting even if standard input
is not a terminal device
- --trust-server-cert : deprecated; same as --trust-unknown-ca
- --trust-unknown-ca : with --non-interactive, accept SSL server
- certificates from unknown certificate authorities
- --trust-cn-mismatch : with --non-interactive, accept SSL server
- certificates even if the server hostname does not
- match the certificate's common name attribute
- --trust-expired : with --non-interactive, accept expired SSL server
- certificates
- --trust-not-yet-valid : with --non-interactive, accept SSL server
- certificates from the future
- --trust-other-failure : with --non-interactive, accept SSL server
- certificates with failures other than the above
+ --trust-server-cert : deprecated; same as
+ --trust-server-cert-failures=unknown-ca
+ --trust-server-cert-failures ARG : with --non-interactive, accept SSL server
+ certificates with failures; ARG is comma-separated
+ list of 'unknown-ca' (Unknown Authority),
+ 'cn-mismatch' (Hostname mismatch), 'expired'
+ (Expired certificate), 'not-yet-valid' (Not yet
+ valid certificate) and 'other' (all other not
+ separately classified certificate errors).
--config-dir ARG : read user configuration files from directory ARG
--config-option ARG : set user configuration option in the format:
FILE:SECTION:OPTION=[VALUE]
Propchange: subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
------------------------------------------------------------------------------
svn:eol-style = LF
Propchange: subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/getopt_tests_data/svn_help_stderr
------------------------------------------------------------------------------
svn:eol-style = LF
Propchange: subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout
------------------------------------------------------------------------------
svn:eol-style = LF
Propchange: subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/getopt_tests_data/svn_stderr
------------------------------------------------------------------------------
svn:eol-style = LF
Propchange: subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/getopt_tests_data/svn_stdout
------------------------------------------------------------------------------
svn:eol-style = LF
Modified: subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/lock_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/lock_tests.py?rev=1679139&r1=1679138&r2=1679139&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/lock_tests.py (original)
+++ subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/lock_tests.py Wed May 13 04:51:26 2015
@@ -2076,22 +2076,36 @@ def dav_lock_timeout(sbox):
expected_status.tweak('iota', writelocked='K')
svntest.actions.run_and_verify_status(wc_dir, expected_status)
+def http_connection(repo_url):
+
+ import httplib
+ from urlparse import urlparse
+
+ loc = urlparse(repo_url)
+ if loc.scheme == 'http':
+ h = httplib.HTTPConnection(loc.hostname, loc.port)
+ else:
+ try:
+ import ssl # new in python 2.6
+ c = ssl.create_default_context()
+ c.check_hostname = False
+ c.verify_mode = ssl.CERT_NONE
+ h = httplib.HTTPSConnection(loc.hostname, loc.port, context=c)
+ except:
+ h = httplib.HTTPSConnection(loc.hostname, loc.port)
+ return h
+
@SkipUnless(svntest.main.is_ra_type_dav)
def create_dav_lock_timeout(sbox):
"create generic DAV lock with timeout"
import httplib
- from urlparse import urlparse
import base64
sbox.build()
wc_dir = sbox.wc_dir
- loc = urlparse(sbox.repo_url)
- if loc.scheme == 'http':
- h = httplib.HTTPConnection(loc.hostname, loc.port)
- else:
- h = httplib.HTTPSConnection(loc.hostname, loc.port)
+ h = http_connection(sbox.repo_url)
lock_body = '<?xml version="1.0" encoding="utf-8" ?>' \
'<D:lockinfo xmlns:D="DAV:">' \
@@ -2227,7 +2241,6 @@ def dav_lock_refresh(sbox):
"refresh timeout of DAV lock"
import httplib
- from urlparse import urlparse
import base64
sbox.build(create_wc = False)
@@ -2237,12 +2250,7 @@ def dav_lock_refresh(sbox):
sbox.repo_url + '/iota')
# Try to refresh lock using 'If' header
- loc = urlparse(sbox.repo_url)
-
- if loc.scheme == 'http':
- h = httplib.HTTPConnection(loc.hostname, loc.port)
- else:
- h = httplib.HTTPSConnection(loc.hostname, loc.port)
+ h = http_connection(sbox.repo_url)
lock_token = svntest.actions.run_and_parse_info(sbox.repo_url + '/iota')[0]['Lock Token']
Modified: subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/svnadmin_tests.py?rev=1679139&r1=1679138&r2=1679139&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/svnadmin_tests.py Wed May 13 04:51:26 2015
@@ -792,7 +792,7 @@ def verify_incremental_fsfs(sbox):
# the listing itself is valid.
r2 = fsfs_file(sbox.repo_dir, 'revs', '2')
if r2.endswith('pack'):
- raise svntest.Skip
+ raise svntest.Skip('Test doesn\'t handle packed revisions')
fp = open(r2, 'wb')
fp.write("""id: 0-2.0.r2/0
@@ -2646,7 +2646,7 @@ def fsfs_hotcopy_progress(sbox):
# and incremental scenarios. The progress output can be affected by
# the --fsfs-packing option, so skip the test if that is the case.
if svntest.main.options.fsfs_packing:
- raise svntest.Skip
+ raise svntest.Skip('fsfs packing set')
# Create an empty repository, configure three files per shard.
sbox.build(create_wc=False, empty=True)
@@ -2760,7 +2760,7 @@ def fsfs_hotcopy_progress_with_revprop_c
# The progress output can be affected by the --fsfs-packing
# option, so skip the test if that is the case.
if svntest.main.options.fsfs_packing:
- raise svntest.Skip
+ raise svntest.Skip('fsfs packing set')
# Create an empty repository, commit several revisions and hotcopy it.
sbox.build(create_wc=False, empty=True)
Modified: subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/svnmucc_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/svnmucc_tests.py?rev=1679139&r1=1679138&r2=1679139&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/svnmucc_tests.py (original)
+++ subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/svnmucc_tests.py Wed May 13 04:51:26 2015
@@ -453,6 +453,49 @@ rm A/B/C/Y
'log', '-qvr3', repo_url)
+@XFail()
+@Issue(4579)
+def modify_and_delete_file(sbox):
+ "modify and delete file"
+
+ # This used to fail with:
+ # svnmucc: E200009: Can't delete node at 'iota'
+ sbox.build()
+ svntest.main.file_write(sbox.ospath('file'), "New iota")
+ test_svnmucc(sbox.repo_url, ['D /iota'],
+ '-m', 'r2: modify and delete /iota',
+ 'put', sbox.ospath('file'), '/iota',
+ 'rm', '/iota')
+
+
+@XFail()
+@Issue(4579)
+def propset_and_delete_file(sbox):
+ "propset and delete file"
+
+ # This used to fail with:
+ # svnmucc: E200009: Can't delete node at 'iota'
+ sbox.build(create_wc=False)
+ test_svnmucc(sbox.repo_url, ['D /iota'],
+ '-m', 'r2: propset and delete /iota',
+ 'propset', 'prop', 'val', '/iota',
+ 'rm', '/iota')
+
+
+@XFail()
+@Issue(4579)
+def delete_and_delete_file(sbox):
+ "delete and delete file"
+
+ # This used to fail with:
+ # svnmucc: E160013: Can't delete node at 'iota' as it does not exist
+ sbox.build(create_wc=False)
+ test_svnmucc(sbox.repo_url, ['D /iota'],
+ '-m', 'r2: delete and delete /iota',
+ 'rm', '/iota',
+ 'rm', '/iota')
+
+
######################################################################
test_list = [ None,
@@ -462,6 +505,9 @@ test_list = [ None,
too_many_log_messages,
no_log_msg_non_interactive,
nested_replaces,
+ modify_and_delete_file,
+ propset_and_delete_file,
+ delete_and_delete_file,
]
if __name__ == '__main__':
Modified: subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/svnsync_authz_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/svnsync_authz_tests.py?rev=1679139&r1=1679138&r2=1679139&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/svnsync_authz_tests.py (original)
+++ subversion/branches/1.10-cache-improvements/subversion/tests/cmdline/svnsync_authz_tests.py Wed May 13 04:51:26 2015
@@ -383,7 +383,7 @@ def identity_copy(sbox):
except:
pass
if locale.setlocale(locale.LC_ALL) != other_locale:
- raise svntest.Skip
+ raise svntest.Skip('Setting test locale failed')
try:
run_test(sbox, "copy-bad-encoding.expected.dump",