Author: rinrab Date: Thu May 29 16:24:11 2025 New Revision: 1925940 URL: http://svn.apache.org/viewvc?rev=1925940&view=rev Log: Handle --memory-cache-size option in svnsync by manually creating a config option instead of preparing and parsing config string.
* subversion/svnsync/svnsync.c (--memory-cache-size): Ditto. Modified: subversion/trunk/subversion/svnsync/svnsync.c Modified: subversion/trunk/subversion/svnsync/svnsync.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnsync/svnsync.c?rev=1925940&r1=1925939&r2=1925940&view=diff ============================================================================== --- subversion/trunk/subversion/svnsync/svnsync.c (original) +++ subversion/trunk/subversion/svnsync/svnsync.c Thu May 29 16:24:11 2025 @@ -2167,19 +2167,24 @@ sub_main(int *exit_code, break; case 'M': - if (!config_options) - config_options = - apr_array_make(pool, 1, - sizeof(svn_cmdline__config_argument_t*)); + { + svn_cmdline__config_argument_t *new_option = + apr_pcalloc(pool, sizeof(*new_option)); - SVN_ERR(svn_utf_cstring_to_utf8(&opt_arg, opt_arg, pool)); - SVN_ERR(svn_cmdline__parse_config_option( - config_options, - apr_psprintf(pool, - "config:miscellany:memory-cache-size=%s", - opt_arg), - NULL /* won't be used */, - pool)); + if (!config_options) + config_options = + apr_array_make(pool, 1, + sizeof(svn_cmdline__config_argument_t*)); + + new_option->file = SVN_CONFIG_CATEGORY_CONFIG; + new_option->section = SVN_CONFIG_SECTION_MISCELLANY; + new_option->option = SVN_CONFIG_OPTION_MEMORY_CACHE_SIZE; + SVN_ERR(svn_utf_cstring_to_utf8(&new_option->value, + opt_arg, pool)); + + APR_ARRAY_PUSH(config_options, + svn_cmdline__config_argument_t *) = new_option; + } break; case '?':