You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by sv...@apache.org on 2015/05/14 06:00:20 UTC
svn commit: r1679307 - in /subversion/branches/1.9.x: ./ build/generator/
build/generator/templates/ subversion/include/private/
subversion/libsvn_subr/ subversion/svn/ subversion/svnbench/
subversion/svnmucc/ subversion/svnrdump/ subversion/svnsync/ s...
Author: svn-role
Date: Thu May 14 04:00:19 2015
New Revision: 1679307
URL: http://svn.apache.org/r1679307
Log:
Merge the r1674301 group from trunk:
* r1674301, r1674305, r1674308, r1674339, r1674340, r1674475
--config-option: Warn when the FILE:SECTION:OPTION combination may be
invalid.
Justification:
Silently accepting invalid input is bad.
Votes:
+1: danielsh, rhuijben, brane (1.9.0 only)
(Last minute change. Patch tested & Ok
Not a problem if it only gets released in 1.10.0)
-0.5: rhuijben (after 1.9.0. Changes error behaviour. Might break scripts)
Modified:
subversion/branches/1.9.x/ (props changed)
subversion/branches/1.9.x/STATUS
subversion/branches/1.9.x/build/generator/gen_base.py
subversion/branches/1.9.x/build/generator/templates/build-outputs.mk.ezt
subversion/branches/1.9.x/gen-make.py
subversion/branches/1.9.x/subversion/include/private/svn_cmdline_private.h
subversion/branches/1.9.x/subversion/libsvn_subr/ (props changed)
subversion/branches/1.9.x/subversion/libsvn_subr/cmdline.c
subversion/branches/1.9.x/subversion/svn/similarity.c
subversion/branches/1.9.x/subversion/svn/svn.c
subversion/branches/1.9.x/subversion/svnbench/svnbench.c
subversion/branches/1.9.x/subversion/svnmucc/svnmucc.c
subversion/branches/1.9.x/subversion/svnrdump/svnrdump.c
subversion/branches/1.9.x/subversion/svnsync/svnsync.c
subversion/branches/1.9.x/subversion/tests/cmdline/getopt_tests.py
Propchange: subversion/branches/1.9.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 14 04:00:19 2015
@@ -91,4 +91,4 @@
/subversion/branches/verify-at-commit:1462039-1462408
/subversion/branches/verify-keep-going:1439280-1546110
/subversion/branches/wc-collate-path:1402685-1480384
-/subversion/trunk:1660545-1660547,1660549-1662901,1663003,1663183-1663184,1663338,1663347,1663355,1663374,1663450,1663530,1663671,1663697,1663706,1663738,1663749,1663791,1663991,1664035,1664078,1664080,1664084-1664085,1664187,1664191,1664193,1664200,1664344,1664476,1664480-1664481,1664483,1664489-1664490,1664507,1664520-1664521,1664523,1664526-1664527,1664531-1664532,1664588,1664593-1664594,1664596,1664653,1664664,1664672,1664674,1664684,1664927,1664938-1664940,1664978,1664984,1664997,1665164,1665195,1665213,1665259,1665318,1665437-1665438,1665609,1665611-1665612,1665845,1665850,1665852,1665886,1665894,1665896,1666096,1666258,1666270,1666272,1666379,1666449,1666690,1666832,1666851,1666965,1667101,1667106-1667107,1667120,1667228,1667233-1667235,1667249-1667250,1667258,1667290,1667301,1667471,1667691-1667693,1667699-1667700,1667715,1667941,1667976,1668320,1668598-1668600,1668602-1668603,1668607-1668608,1668618,1669743,1669746,1669749,1669945,1670139,1670149,1670152,1670329,1670337,167
0347,1670353,1671164,1671388,1672295,1672311,1672372,1672404,1672511-1672512,1672578,1672728,1673044,1673062-1673063,1673065,1673153,1673170,1673172,1673197,1673202,1673204,1673228,1673282,1673445,1673691-1673692,1673746,1673785,1673803,1674015,1674032,1674170,1674406,1674415,1674487,1674522,1674580,1674627,1674891,1675771,1676526,1676535,1676538,1676555,1676564,1676570,1676665,1676667,1676769,1677003,1677191,1677267,1677440,1678147,1678149,1678494,1678571,1678846
+/subversion/trunk:1660545-1660547,1660549-1662901,1663003,1663183-1663184,1663338,1663347,1663355,1663374,1663450,1663530,1663671,1663697,1663706,1663738,1663749,1663791,1663991,1664035,1664078,1664080,1664084-1664085,1664187,1664191,1664193,1664200,1664344,1664476,1664480-1664481,1664483,1664489-1664490,1664507,1664520-1664521,1664523,1664526-1664527,1664531-1664532,1664588,1664593-1664594,1664596,1664653,1664664,1664672,1664674,1664684,1664927,1664938-1664940,1664978,1664984,1664997,1665164,1665195,1665213,1665259,1665318,1665437-1665438,1665609,1665611-1665612,1665845,1665850,1665852,1665886,1665894,1665896,1666096,1666258,1666270,1666272,1666379,1666449,1666690,1666832,1666851,1666965,1667101,1667106-1667107,1667120,1667228,1667233-1667235,1667249-1667250,1667258,1667290,1667301,1667471,1667691-1667693,1667699-1667700,1667715,1667941,1667976,1668320,1668598-1668600,1668602-1668603,1668607-1668608,1668618,1669743,1669746,1669749,1669945,1670139,1670149,1670152,1670329,1670337,167
0347,1670353,1671164,1671388,1672295,1672311,1672372,1672404,1672511-1672512,1672578,1672728,1673044,1673062-1673063,1673065,1673153,1673170,1673172,1673197,1673202,1673204,1673228,1673282,1673445,1673691-1673692,1673746,1673785,1673803,1674015,1674032,1674170,1674301,1674305,1674308,1674339-1674340,1674406,1674415,1674475,1674487,1674522,1674580,1674627,1674891,1675771,1676526,1676535,1676538,1676555,1676564,1676570,1676665,1676667,1676769,1677003,1677191,1677267,1677440,1678147,1678149,1678494,1678571,1678846
Modified: subversion/branches/1.9.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/STATUS?rev=1679307&r1=1679306&r2=1679307&view=diff
==============================================================================
--- subversion/branches/1.9.x/STATUS (original)
+++ subversion/branches/1.9.x/STATUS Thu May 14 04:00:19 2015
@@ -66,17 +66,6 @@ Veto-blocked changes:
Approved changes:
=================
- * r1674301, r1674305, r1674308, r1674339, r1674340, r1674475
- --config-option: Warn when the FILE:SECTION:OPTION combination may be
- invalid.
- Justification:
- Silently accepting invalid input is bad.
- Votes:
- +1: danielsh, rhuijben, brane (1.9.0 only)
- (Last minute change. Patch tested & Ok
- Not a problem if it only gets released in 1.10.0)
- -0.5: rhuijben (after 1.9.0. Changes error behaviour. Might break scripts)
-
* r1678734, r1678742, r1678745, r1678746, r1678839, r1678894
Use --trust-server-cert-failures instead of separate options on cmdline
Justification:
Modified: subversion/branches/1.9.x/build/generator/gen_base.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/build/generator/gen_base.py?rev=1679307&r1=1679306&r2=1679307&view=diff
==============================================================================
--- subversion/branches/1.9.x/build/generator/gen_base.py (original)
+++ subversion/branches/1.9.x/build/generator/gen_base.py Thu May 14 04:00:19 2015
@@ -22,6 +22,7 @@
# gen_base.py -- infrastructure for generating makefiles, dependencies, etc.
#
+import collections
import os
import sys
import glob
@@ -319,6 +320,93 @@ class GeneratorBase:
def errno_filter(self, codes):
return codes
+ class FileSectionOptionEnum(object):
+ # These are accessed via getattr() later on
+ file = object()
+ section = object()
+ option = object()
+
+ def _client_configuration_defines(self):
+ """Return an iterator over SVN_CONFIG_* #define's in the "Client
+ configuration files strings" section of svn_config.h."""
+
+ pattern = re.compile(
+ r'^\s*#\s*define\s+'
+ r'(?P<macro>SVN_CONFIG_(?P<kind>CATEGORY|SECTION|OPTION)_[A-Z0-9a-z_]+)'
+ )
+ kind = {
+ 'CATEGORY': self.FileSectionOptionEnum.file,
+ 'SECTION': self.FileSectionOptionEnum.section,
+ 'OPTION': self.FileSectionOptionEnum.option,
+ }
+
+ fname = os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])),
+ 'subversion', 'include', 'svn_config.h')
+ lines = iter(open(fname))
+ for line in lines:
+ if "@name Client configuration files strings" in line:
+ break
+ else:
+ raise Exception("Unable to parse svn_config.h")
+
+ for line in lines:
+ if "@{" in line:
+ break
+ else:
+ raise Exception("Unable to parse svn_config.h")
+
+ for line in lines:
+ if "@}" in line:
+ break
+ match = pattern.match(line)
+ if match:
+ yield (
+ match.group('macro'),
+ kind[match.group('kind')],
+ )
+ else:
+ raise Exception("Unable to parse svn_config.h")
+
+ def write_config_keys(self):
+ groupby = collections.defaultdict(list)
+ empty_sections = []
+ previous = (None, None)
+ for macro, kind in self._client_configuration_defines():
+ if kind is previous[1] is self.FileSectionOptionEnum.section:
+ empty_sections.append(previous[0])
+ groupby[kind].append(macro)
+ previous = (macro, kind)
+ else:
+ # If the last (macro, kind) is a section, then it's an empty section.
+ if kind is self.FileSectionOptionEnum.section:
+ empty_sections.append(macro)
+
+ lines = []
+ lines.append('/* Automatically generated by %s:write_config_keys() */'
+ % (__file__,))
+ lines.append('')
+
+ for kind in ('file', 'section', 'option'):
+ macros = groupby[getattr(self.FileSectionOptionEnum, kind)]
+ lines.append('static const char *svn__valid_config_%ss[] = {' % (kind,))
+ for macro in macros:
+ lines.append(' %s,' % (macro,))
+ # Remove ',' for c89 compatibility
+ lines[-1] = lines[-1][0:-1]
+ lines.append('};')
+ lines.append('')
+
+ lines.append('static const char *svn__empty_config_sections[] = {');
+ for section in empty_sections:
+ lines.append(' %s,' % (section,))
+ # Remove ',' for c89 compatibility
+ lines[-1] = lines[-1][0:-1]
+ lines.append('};')
+ lines.append('')
+
+ self.write_file_if_changed('subversion/libsvn_subr/config_keys.inc',
+ '\n'.join(lines))
+
class DependencyGraph:
"""Record dependencies between build items.
@@ -1212,6 +1300,9 @@ class IncludeDependencyInfo:
if os.sep.join(['libsvn_subr', 'error.c']) in fname \
and 'errorcode.inc' == include_param:
continue # generated by GeneratorBase.write_errno_table
+ if os.sep.join(['libsvn_subr', 'cmdline.c']) in fname \
+ and 'config_keys.inc' == include_param:
+ continue # generated by GeneratorBase.write_config_keys
elif direct_possibility_fname in domain_fnames:
self._upd_dep_hash(hdrs, direct_possibility_fname, type_code)
elif (len(domain_fnames) == 1
Modified: subversion/branches/1.9.x/build/generator/templates/build-outputs.mk.ezt
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/build/generator/templates/build-outputs.mk.ezt?rev=1679307&r1=1679306&r2=1679307&view=diff
==============================================================================
--- subversion/branches/1.9.x/build/generator/templates/build-outputs.mk.ezt (original)
+++ subversion/branches/1.9.x/build/generator/templates/build-outputs.mk.ezt Thu May 14 04:00:19 2015
@@ -46,6 +46,7 @@ MANPAGES =[for manpages] [manpages][end]
CLEAN_FILES =[for cfiles] [cfiles][end]
EXTRACLEAN_FILES =[for sql] [sql.header][end] \
$(abs_builddir)/subversion/libsvn_subr/errorcode.inc \
+ $(abs_builddir)/subversion/libsvn_subr/config_keys.inc \
$(abs_srcdir)/compile_commands.json
SWIG_INCLUDES = -I$(abs_builddir)/subversion \
Modified: subversion/branches/1.9.x/gen-make.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/gen-make.py?rev=1679307&r1=1679306&r2=1679307&view=diff
==============================================================================
--- subversion/branches/1.9.x/gen-make.py (original)
+++ subversion/branches/1.9.x/gen-make.py Thu May 14 04:00:19 2015
@@ -67,6 +67,7 @@ def main(fname, gentype, verfname=None,
generator.write()
generator.write_sqlite_headers()
generator.write_errno_table()
+ generator.write_config_keys()
if ('--debug', '') in other_options:
for dep_type, target_dict in generator.graph.deps.items():
Modified: subversion/branches/1.9.x/subversion/include/private/svn_cmdline_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/include/private/svn_cmdline_private.h?rev=1679307&r1=1679306&r2=1679307&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/include/private/svn_cmdline_private.h (original)
+++ subversion/branches/1.9.x/subversion/include/private/svn_cmdline_private.h Thu May 14 04:00:19 2015
@@ -88,11 +88,15 @@ typedef struct svn_cmdline__config_argum
* containing svn_cmdline__config_argument_t* elements, allocating the option
* data in @a pool
*
+ * [Since 1.9/1.10:] If the file, section, or option value is not recognized,
+ * warn to @c stderr, using @a prefix as in svn_handle_warning2().
+ *
* @since New in 1.7.
*/
svn_error_t *
svn_cmdline__parse_config_option(apr_array_header_t *config_options,
const char *opt_arg,
+ const char *prefix,
apr_pool_t *pool);
/** Sets the config options in @a config_options, an apr array containing
Propchange: subversion/branches/1.9.x/subversion/libsvn_subr/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Thu May 14 04:00:19 2015
@@ -12,3 +12,4 @@ internal_statements.h
errorcode.inc
libsvn_subr.pc.in
libsvn_subr.pc
+config_keys.inc
Modified: subversion/branches/1.9.x/subversion/libsvn_subr/cmdline.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/libsvn_subr/cmdline.c?rev=1679307&r1=1679306&r2=1679307&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/libsvn_subr/cmdline.c (original)
+++ subversion/branches/1.9.x/subversion/libsvn_subr/cmdline.c Thu May 14 04:00:19 2015
@@ -811,9 +811,124 @@ svn_cmdline__print_xml_prop(svn_stringbu
return;
}
+/* Return the most similar string to NEEDLE in HAYSTACK, which contains
+ * HAYSTACK_LEN elements. Return NULL if no string is sufficiently similar.
+ */
+/* See svn_cl__similarity_check() for a more general solution. */
+static const char *
+most_similar(const char *needle_cstr,
+ const char **haystack,
+ apr_size_t haystack_len,
+ apr_pool_t *scratch_pool)
+{
+ const char *max_similar;
+ apr_size_t max_score = 0;
+ apr_size_t i;
+ svn_membuf_t membuf;
+ svn_string_t *needle_str = svn_string_create(needle_cstr, scratch_pool);
+
+ svn_membuf__create(&membuf, 64, scratch_pool);
+
+ for (i = 0; i < haystack_len; i++)
+ {
+ apr_size_t score;
+ svn_string_t *hay = svn_string_create(haystack[i], scratch_pool);
+
+ score = svn_string__similarity(needle_str, hay, &membuf, NULL);
+
+ /* If you update this factor, consider updating
+ * svn_cl__similarity_check(). */
+ if (score >= (2 * SVN_STRING__SIM_RANGE_MAX + 1) / 3
+ && score > max_score)
+ {
+ max_score = score;
+ max_similar = haystack[i];
+ }
+ }
+
+ if (max_score)
+ return max_similar;
+ else
+ return NULL;
+}
+
+/* Verify that NEEDLE is in HAYSTACK, which contains HAYSTACK_LEN elements. */
+static svn_error_t *
+string_in_array(const char *needle,
+ const char **haystack,
+ apr_size_t haystack_len,
+ apr_pool_t *scratch_pool)
+{
+ const char *next_of_kin;
+ apr_size_t i;
+ for (i = 0; i < haystack_len; i++)
+ {
+ if (!strcmp(needle, haystack[i]))
+ return SVN_NO_ERROR;
+ }
+
+ /* Error. */
+ next_of_kin = most_similar(needle, haystack, haystack_len, scratch_pool);
+ if (next_of_kin)
+ return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+ _("Ignoring unknown value '%s'; "
+ "did you mean '%s'?"),
+ needle, next_of_kin);
+ else
+ return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+ _("Ignoring unknown value '%s'"),
+ needle);
+}
+
+#include "config_keys.inc"
+
+/* Validate the FILE, SECTION, and OPTION components of CONFIG_OPTION are
+ * known. Warn to stderr if not. (An unknown value may be either a typo
+ * or added in a newer minor version of Subversion.) */
+static svn_error_t *
+validate_config_option(svn_cmdline__config_argument_t *config_option,
+ apr_pool_t *scratch_pool)
+{
+ svn_boolean_t arbitrary_keys = FALSE;
+
+ /* TODO: some day, we could also verify that OPTION is valid for SECTION;
+ i.e., forbid invalid combinations such as config:auth:diff-extensions. */
+
+#define ARRAYLEN(x) ( sizeof((x)) / sizeof((x)[0]) )
+
+ SVN_ERR(string_in_array(config_option->file, svn__valid_config_files,
+ ARRAYLEN(svn__valid_config_files),
+ scratch_pool));
+ SVN_ERR(string_in_array(config_option->section, svn__valid_config_sections,
+ ARRAYLEN(svn__valid_config_sections),
+ scratch_pool));
+
+ /* Don't validate option names for sections such as servers[group],
+ * config[tunnels], and config[auto-props] that permit arbitrary options. */
+ {
+ int i;
+
+ for (i = 0; i < ARRAYLEN(svn__empty_config_sections); i++)
+ {
+ if (!strcmp(config_option->section, svn__empty_config_sections[i]))
+ arbitrary_keys = TRUE;
+ }
+ }
+
+ if (! arbitrary_keys)
+ SVN_ERR(string_in_array(config_option->option, svn__valid_config_options,
+ ARRAYLEN(svn__valid_config_options),
+ scratch_pool));
+
+#undef ARRAYLEN
+
+ return SVN_NO_ERROR;
+}
+
svn_error_t *
svn_cmdline__parse_config_option(apr_array_header_t *config_options,
const char *opt_arg,
+ const char *prefix,
apr_pool_t *pool)
{
svn_cmdline__config_argument_t *config_option;
@@ -827,6 +942,8 @@ svn_cmdline__parse_config_option(apr_arr
if ((equals_sign = strchr(second_colon + 1, '=')) &&
(equals_sign != second_colon + 1))
{
+ svn_error_t *warning;
+
config_option = apr_pcalloc(pool, sizeof(*config_option));
config_option->file = apr_pstrndup(pool, opt_arg,
first_colon - opt_arg);
@@ -835,6 +952,13 @@ svn_cmdline__parse_config_option(apr_arr
config_option->option = apr_pstrndup(pool, second_colon + 1,
equals_sign - second_colon - 1);
+ warning = validate_config_option(config_option, pool);
+ if (warning)
+ {
+ svn_handle_warning2(stderr, warning, prefix);
+ svn_error_clear(warning);
+ }
+
if (! (strchr(config_option->option, ':')))
{
config_option->value = apr_pstrndup(pool, equals_sign + 1,
Modified: subversion/branches/1.9.x/subversion/svn/similarity.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/svn/similarity.c?rev=1679307&r1=1679306&r2=1679307&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/svn/similarity.c (original)
+++ subversion/branches/1.9.x/subversion/svn/similarity.c Thu May 14 04:00:19 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.9.x/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/svn/svn.c?rev=1679307&r1=1679306&r2=1679307&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/svn/svn.c (original)
+++ subversion/branches/1.9.x/subversion/svn/svn.c Thu May 14 04:00:19 2015
@@ -2267,7 +2267,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;
Modified: subversion/branches/1.9.x/subversion/svnbench/svnbench.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/svnbench/svnbench.c?rev=1679307&r1=1679306&r2=1679307&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/svnbench/svnbench.c (original)
+++ subversion/branches/1.9.x/subversion/svnbench/svnbench.c Thu May 14 04:00:19 2015
@@ -654,7 +654,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
Modified: subversion/branches/1.9.x/subversion/svnmucc/svnmucc.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/svnmucc/svnmucc.c?rev=1679307&r1=1679306&r2=1679307&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/svnmucc/svnmucc.c (original)
+++ subversion/branches/1.9.x/subversion/svnmucc/svnmucc.c Thu May 14 04:00:19 2015
@@ -625,6 +625,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:
Modified: subversion/branches/1.9.x/subversion/svnrdump/svnrdump.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/svnrdump/svnrdump.c?rev=1679307&r1=1679306&r2=1679307&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/svnrdump/svnrdump.c (original)
+++ subversion/branches/1.9.x/subversion/svnrdump/svnrdump.c Thu May 14 04:00:19 2015
@@ -950,7 +950,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));
}
}
Modified: subversion/branches/1.9.x/subversion/svnsync/svnsync.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/svnsync/svnsync.c?rev=1679307&r1=1679306&r2=1679307&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/svnsync/svnsync.c (original)
+++ subversion/branches/1.9.x/subversion/svnsync/svnsync.c Thu May 14 04:00:19 2015
@@ -2073,7 +2073,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 +2140,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;
Modified: subversion/branches/1.9.x/subversion/tests/cmdline/getopt_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/tests/cmdline/getopt_tests.py?rev=1679307&r1=1679306&r2=1679307&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/tests/cmdline/getopt_tests.py (original)
+++ subversion/branches/1.9.x/subversion/tests/cmdline/getopt_tests.py Thu May 14 04:00:19 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__':