[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: svn commit: r1678734 - in /subversion/trunk/subversion:include/private/ libsvn_subr/ svn/ svnbench/ svnmucc/ svnrdump/ svnsync/tests/cmdline/getopt_tests_data/

From: Bert Huijben <bert_at_qqmail.nl>
Date: Mon, 11 May 2015 19:13:33 +0200

Hmm. I think I copied that from some code that uses it for showing warnings. (The config options parse function)

Bert

-----Original Message-----
From: "Philip Martin" <philip.martin_at_wandisco.com>
Sent: ‎11-‎5-‎2015 18:33
To: "rhuijben_at_apache.org" <rhuijben_at_apache.org>
Cc: "dev_at_subversion.apache.org" <dev_at_subversion.apache.org>
Subject: Re: svn commit: r1678734 - in /subversion/trunk/subversion:include/private/ libsvn_subr/ svn/ svnbench/ svnmucc/ svnrdump/ svnsync/tests/cmdline/getopt_tests_data/

rhuijben_at_apache.org writes:

> Author: rhuijben
> Date: Mon May 11 11:56:46 2015
> New Revision: 1678734

> +svn_error_t *
> +svn_cmdline__parse_trust_options(
> + svn_boolean_t *trust_server_cert_unknown_ca,
> + svn_boolean_t *trust_server_cert_cn_mismatch,
> + svn_boolean_t *trust_server_cert_expired,
> + svn_boolean_t *trust_server_cert_not_yet_valid,
> + svn_boolean_t *trust_server_cert_other_failure,
> + const char *opt_arg,
> + const char *error_prefix,
> + apr_pool_t *scratch_pool)

> + return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
> + _("%sUnknown value '%s' for %s.\n"
> + "Supported values: %s"),
> + error_prefix ? error_prefix : "",
> + value,
> + "--trust-server-cert-failures",
> + "unknown-ca, cn-mismatch, expired, "
> + "not-yet-valid, other");

Why are you using error_prefix here? We don't usually do that. It
leads to output like "svn: E205000: svn:" with duplicate "svn:"

$ svn ls --trust-server-cert-failures foo --non-interactive
svn: E205000: svn: Unknown value 'foo' for --trust-server-cert-failures.
Supported values: unknown-ca, cn-mismatch, expired, not-yet-valid, other

-- 
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*
Received on 2015-05-11 19:14:32 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.