Author: rinrab
Date: Sun Jun 8 13:20:53 2025
New Revision: 1926251
URL: http://svn.apache.org/viewvc?rev=1926251&view=rev
Log:
Revert r1926219.
Modified:
subversion/trunk/ (props changed)
subversion/trunk/subversion/include/private/svn_opt_private.h
subversion/trunk/subversion/libsvn_subr/opt.c
Propchange: subversion/trunk/
------------------------------------------------------------------------------
Reverse-merged /subversion/branches/utf8-cmdline-prototype:r1925867
Modified: subversion/trunk/subversion/include/private/svn_opt_private.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_opt_private.h?rev=1926251&r1=1926250&r2=1926251&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_opt_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_opt_private.h Sun Jun 8 13:20:53 2025
@@ -115,12 +115,6 @@ svn_opt__args_to_target_array(apr_array_
const apr_array_header_t *known_targets,
apr_pool_t *pool);
-svn_error_t *
-svn_opt__process_target_array(apr_array_header_t **targets_p,
- apr_array_header_t *utf8_input_targets,
- const apr_array_header_t *known_targets,
- apr_pool_t *pool);
-
/**
* Return a human-readable description of @a revision. The result
* will be allocated statically or from @a result_pool.
Modified: subversion/trunk/subversion/libsvn_subr/opt.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/opt.c?rev=1926251&r1=1926250&r2=1926251&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/opt.c (original)
+++ subversion/trunk/subversion/libsvn_subr/opt.c Sun Jun 8 13:20:53 2025
@@ -218,46 +218,34 @@ svn_opt_parse_path(svn_opt_revision_t *r
return SVN_NO_ERROR;
}
-svn_error_t *
-svn_opt__args_to_target_array(apr_array_header_t **targets_p,
- apr_getopt_t *os,
- const apr_array_header_t *known_targets,
- apr_pool_t *pool)
-{
- apr_array_header_t *utf8_input_targets =
- apr_array_make(pool, os->argc - os->ind, sizeof(const char *));
-
- for (; os->ind < os->argc; os->ind++)
- {
- /* The apr_getopt targets are still in native encoding. */
- const char *raw_target = os->argv[os->ind];
- const char *utf8_target;
-
- SVN_ERR(svn_utf_cstring_to_utf8(&utf8_target, raw_target, pool));
-
- APR_ARRAY_PUSH(utf8_input_targets, const char *) = utf8_target;
- }
-
- return svn_error_trace(svn_opt__process_target_array(
- targets_p, utf8_input_targets, known_targets, pool));
-}
/* Note: This is substantially copied into svn_client_args_to_target_array() in
* order to move to libsvn_client while maintaining backward compatibility. */
svn_error_t *
-svn_opt__process_target_array(apr_array_header_t **targets_p,
- apr_array_header_t *input_targets,
+svn_opt__args_to_target_array(apr_array_header_t **targets_p,
+ apr_getopt_t *os,
const apr_array_header_t *known_targets,
apr_pool_t *pool)
{
int i;
svn_error_t *err = SVN_NO_ERROR;
+ apr_array_header_t *input_targets =
+ apr_array_make(pool, DEFAULT_ARRAY_SIZE, sizeof(const char *));
apr_array_header_t *output_targets =
apr_array_make(pool, DEFAULT_ARRAY_SIZE, sizeof(const char *));
- /* Step 1: create a master array of targets, and come from concatenating
- the targets left by apr_getopt, plus any extra targets (e.g., from the
- --targets switch.) */
+ /* Step 1: create a master array of targets that are in UTF-8
+ encoding, and come from concatenating the targets left by apr_getopt,
+ plus any extra targets (e.g., from the --targets switch.) */
+
+ for (; os->ind < os->argc; os->ind++)
+ {
+ /* The apr_getopt targets are still in native encoding. */
+ const char *raw_target = os->argv[os->ind];
+ SVN_ERR(svn_utf_cstring_to_utf8
+ ((const char **) apr_array_push(input_targets),
+ raw_target, pool));
+ }
if (known_targets)
{
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.