Julian Foad wrote:
> The doc string for "svn_opt_args_to_target_array" doesn't say that it
> strips the "@rev" part from the first two paths if @a extract_revisions
> is set.
This patch improves the doc. string.
> Also, that feature of it is really an ugly way of combining two
> different functions into one; it should be split into two functions, the
> main one (used by nearly everything) which does not handle revisions,
> and a special one (only used by diff and merge) which ensures that there
> are only two targets, and extracts their revisions.
This patch splits out the basic part of the function as
"svn_opt_args_to_target_array2", uses it nearly everywhere, and deprecates the
original.
We shouldn't continue to use our deprecated stuff. With this patch, the
original is still used by "svn_cl__diff" in some cases, but that appears to be
using it wrongly so it needs to change anyway. I'll do that as a separate
patch. Here I've annotated what I think is wrong, with "###" comments:
Index: subversion/clients/cmdline/diff-cmd.c
===================================================================
--- subversion/clients/cmdline/diff-cmd.c (revision 11796)
+++ subversion/clients/cmdline/diff-cmd.c (working copy)
@@ -95,25 +95,23 @@ svn_cl__diff (apr_getopt_t *os,
{
apr_array_header_t *tmp, *tmp2;
/* The 'svn diff --old=OLD[@OLDREV] [--new=NEW[@NEWREV]]
[PATH...]' case matches. */
- SVN_ERR (svn_opt_args_to_target_array (&targets, os,
- opt_state->targets,
- NULL,
- NULL,
- FALSE, pool));
+ SVN_ERR (svn_opt_args_to_target_array2 (&targets, os,
+ opt_state->targets, pool));
tmp = apr_array_make (pool, 2, sizeof (const char *));
APR_ARRAY_PUSH (tmp, const char *) = (opt_state->old_target);
APR_ARRAY_PUSH (tmp, const char *) = (opt_state->new_target
? opt_state->new_target
: APR_ARRAY_IDX (tmp, 0,
const char *));
-
+ /* ### We shouldn't attempt to extract revisions from 'os'
+ * targets as well as old_target and new_target. */
SVN_ERR (svn_opt_args_to_target_array (&tmp2, os, tmp,
&(opt_state->start_revision),
&(opt_state->end_revision),
TRUE, /* extract @revs */ pool));
old_target = APR_ARRAY_IDX (tmp2, 0, const char *);
@@ -133,29 +131,26 @@ svn_cl__diff (apr_getopt_t *os,
svn_boolean_t working_copy_present = FALSE, url_present = FALSE;
/* The 'svn diff [-r M[:N]] [TARGET[@REV]...]' case matches. */
/* Here each target is a pegged object. Find out the starting
and ending paths for each target. */
- SVN_ERR (svn_opt_args_to_target_array (&targets, os,
- opt_state->targets,
- NULL,
- NULL,
- FALSE, pool));
+ SVN_ERR (svn_opt_args_to_target_array2 (&targets, os,
+ opt_state->targets, pool));
svn_opt_push_implicit_dot_target (targets, pool);
tmp = apr_array_make (pool, 2, sizeof (const char *));
APR_ARRAY_PUSH (tmp, const char *) = ".";
APR_ARRAY_PUSH (tmp, const char *) = ".";
SVN_ERR (svn_opt_args_to_target_array (&tmp2, os, tmp,
&(opt_state->start_revision),
&(opt_state->end_revision),
TRUE, /* extract @revs */ pool));
-
+ /* ### Extract revs from first two targets only? Must be wrong. */
old_target = APR_ARRAY_IDX (tmp2, 0, const char *);
new_target = APR_ARRAY_IDX (tmp2, 1, const char *);
/* Check to see if at least one of our paths is a working copy
path. */
for (i = 0; i < targets->nelts; ++i)
- Julian
Simplify the svn_opt_args_to_target_array API because it was an ugly way of
combining two different functions into one.
* subversion/include/svn_opt.h
(svn_opt_args_to_target_array): Improve description. Deprecate.
(svn_opt_args_to_target_array2): New: a simpler version, appropriate
for most commands.
* subversion/libsvn_subr/opt.c
(svn_opt_args_to_target_array): Split the basic functionality out into
svn_opt_args_to_target_array2.
(svn_opt_args_to_target_array2): New, extracted from
svn_opt_args_to_target_array.
* subversion/clients/cmdline/add-cmd.c (svn_cl__add):
* subversion/clients/cmdline/blame-cmd.c (svn_cl__blame):
* subversion/clients/cmdline/cat-cmd.c (svn_cl__cat):
* subversion/clients/cmdline/checkout-cmd.c (svn_cl__checkout):
* subversion/clients/cmdline/cleanup-cmd.c (svn_cl__cleanup):
* subversion/clients/cmdline/commit-cmd.c (svn_cl__commit):
* subversion/clients/cmdline/copy-cmd.c (svn_cl__copy):
* subversion/clients/cmdline/delete-cmd.c (svn_cl__delete):
* subversion/clients/cmdline/export-cmd.c (svn_cl__export):
* subversion/clients/cmdline/import-cmd.c (svn_cl__import):
* subversion/clients/cmdline/info-cmd.c (svn_cl__info):
* subversion/clients/cmdline/log-cmd.c (svn_cl__log):
* subversion/clients/cmdline/ls-cmd.c (svn_cl__ls):
* subversion/clients/cmdline/mkdir-cmd.c (svn_cl__mkdir):
* subversion/clients/cmdline/move-cmd.c (svn_cl__move):
* subversion/clients/cmdline/propdel-cmd.c (svn_cl__propdel):
* subversion/clients/cmdline/propedit-cmd.c (svn_cl__propedit):
* subversion/clients/cmdline/propget-cmd.c (svn_cl__propget):
* subversion/clients/cmdline/proplist-cmd.c (svn_cl__proplist):
* subversion/clients/cmdline/propset-cmd.c (svn_cl__propset):
* subversion/clients/cmdline/resolved-cmd.c (svn_cl__resolved):
* subversion/clients/cmdline/revert-cmd.c (svn_cl__revert):
* subversion/clients/cmdline/status-cmd.c (svn_cl__status):
* subversion/clients/cmdline/switch-cmd.c (svn_cl__switch):
* subversion/clients/cmdline/update-cmd.c (svn_cl__update):
Use svn_opt_args_to_target_array2 instead of svn_opt_args_to_target_array.
* subversion/clients/cmdline/diff-cmd.c (svn_cl__diff):
Use svn_opt_args_to_target_array2 instead of svn_opt_args_to_target_array
in some cases.
Index: subversion/include/svn_opt.h
===================================================================
--- subversion/include/svn_opt.h (revision 11796)
+++ subversion/include/svn_opt.h (working copy)
@@ -245,6 +245,23 @@
/* Parsing arguments. */
/**
+ * @since New in 1.2.
+ *
+ * Pull remaining target arguments from @a os into @a *targets_p, including
+ * targets stored in @a known_targets (which might come from, for
+ * example, the "--targets" command line option), converting them to
+ * UTF-8. Allocate @a *targets_p and its elements in @a pool.
+ */
+svn_error_t *
+svn_opt_args_to_target_array2 (apr_array_header_t **targets_p,
+ apr_getopt_t *os,
+ apr_array_header_t *known_targets,
+ apr_pool_t *pool);
+
+
+/**
+ * @deprecated Provided for backward compatibility with the 1.1 API.
+ *
* Pull remaining target arguments from @a os into @a *targets_p, including
* targets stored in @a known_targets (which might come from, for
* example, the "--targets" command line option), converting them to
@@ -252,10 +269,12 @@
*
* If @a extract_revisions is set, then this function will attempt to
* look for trailing "@rev" syntax on the paths. If an @rev is found
- * for the first target in *TARGETS_P, it will overwrite the value of
- * @a *start_revision. If an @rev is found for the second target in
- * *TARGETS_P, it will overwrite @a *end_revision. (Extra revisions
- * beyond that are ignored.)
+ * for the first target in @a *targets_p, it will be removed from the
+ * first target string and its value will overwrite the value of @a
+ * *start_revision. If an @rev is found for the second target in @a
+ * *targets_p, it will be removed from the second target string and its
+ * value will overwrite @a *end_revision. (Extra revisions beyond that
+ * are ignored.)
*/
svn_error_t *
svn_opt_args_to_target_array (apr_array_header_t **targets_p,
Index: subversion/libsvn_subr/opt.c
===================================================================
--- subversion/libsvn_subr/opt.c (revision 11796)
+++ subversion/libsvn_subr/opt.c (working copy)
@@ -531,13 +531,10 @@
svn_error_t *
-svn_opt_args_to_target_array (apr_array_header_t **targets_p,
- apr_getopt_t *os,
- apr_array_header_t *known_targets,
- svn_opt_revision_t *start_revision,
- svn_opt_revision_t *end_revision,
- svn_boolean_t extract_revisions,
- apr_pool_t *pool)
+svn_opt_args_to_target_array2 (apr_array_header_t **targets_p,
+ apr_getopt_t *os,
+ apr_array_header_t *known_targets,
+ apr_pool_t *pool)
{
int i;
apr_array_header_t *input_targets =
@@ -647,6 +644,25 @@
/* kff todo: need to remove redundancies from targets before
passing it to the cmd_func. */
+
+ *targets_p = output_targets;
+ return SVN_NO_ERROR;
+}
+
+
+svn_error_t *
+svn_opt_args_to_target_array (apr_array_header_t **targets_p,
+ apr_getopt_t *os,
+ apr_array_header_t *known_targets,
+ svn_opt_revision_t *start_revision,
+ svn_opt_revision_t *end_revision,
+ svn_boolean_t extract_revisions,
+ apr_pool_t *pool)
+{
+ apr_array_header_t *output_targets;
+
+ SVN_ERR (svn_opt_args_to_target_array2 (&output_targets, os,
+ known_targets, pool));
if (extract_revisions)
{
Index: subversion/clients/cmdline/checkout-cmd.c
===================================================================
--- subversion/clients/cmdline/checkout-cmd.c (revision 11796)
+++ subversion/clients/cmdline/checkout-cmd.c (working copy)
@@ -73,11 +73,8 @@
const char *repos_url;
int i;
- SVN_ERR (svn_opt_args_to_target_array (&targets, os,
- opt_state->targets,
- &(opt_state->start_revision),
- &(opt_state->end_revision),
- FALSE, pool));
+ SVN_ERR (svn_opt_args_to_target_array2 (&targets, os,
+ opt_state->targets, pool));
/* If there are no targets at all, then let's just give the user a
friendly help message, rather than silently exiting. */
Index: subversion/clients/cmdline/propdel-cmd.c
===================================================================
--- subversion/clients/cmdline/propdel-cmd.c (revision 11796)
+++ subversion/clients/cmdline/propdel-cmd.c (working copy)
@@ -57,11 +57,8 @@
SVN_ERR (svn_utf_cstring_to_utf8 (&pname_utf8, pname, pool));
/* Suck up all the remaining arguments into a targets array */
- SVN_ERR (svn_opt_args_to_target_array (&targets, os,
- opt_state->targets,
- &(opt_state->start_revision),
- &(opt_state->end_revision),
- FALSE, pool));
+ SVN_ERR (svn_opt_args_to_target_array2 (&targets, os,
+ opt_state->targets, pool));
/* Add "." if user passed 0 file arguments */
svn_opt_push_implicit_dot_target (targets, pool);
Index: subversion/clients/cmdline/mkdir-cmd.c
===================================================================
--- subversion/clients/cmdline/mkdir-cmd.c (revision 11796)
+++ subversion/clients/cmdline/mkdir-cmd.c (working copy)
@@ -49,11 +49,8 @@
svn_client_commit_info_t *commit_info = NULL;
svn_error_t *err;
- SVN_ERR (svn_opt_args_to_target_array (&targets, os,
- opt_state->targets,
- &(opt_state->start_revision),
- &(opt_state->end_revision),
- FALSE, pool));
+ SVN_ERR (svn_opt_args_to_target_array2 (&targets, os,
+ opt_state->targets, pool));
if (! targets->nelts)
return svn_error_create (SVN_ERR_CL_ARG_PARSING_ERROR, 0, NULL);
Index: subversion/clients/cmdline/move-cmd.c
===================================================================
--- subversion/clients/cmdline/move-cmd.c (revision 11796)
+++ subversion/clients/cmdline/move-cmd.c (working copy)
@@ -47,11 +47,8 @@
svn_client_commit_info_t *commit_info = NULL;
svn_error_t *err;
- SVN_ERR (svn_opt_args_to_target_array (&targets, os,
- opt_state->targets,
- &(opt_state->start_revision),
- &(opt_state->end_revision),
- FALSE, pool));
+ SVN_ERR (svn_opt_args_to_target_array2 (&targets, os,
+ opt_state->targets, pool));
if (targets->nelts != 2)
return svn_error_create (SVN_ERR_CL_ARG_PARSING_ERROR, 0, NULL);
Index: subversion/clients/cmdline/revert-cmd.c
===================================================================
--- subversion/clients/cmdline/revert-cmd.c (revision 11796)
+++ subversion/clients/cmdline/revert-cmd.c (working copy)
@@ -43,11 +43,8 @@
svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx;
apr_array_header_t *targets;
- SVN_ERR (svn_opt_args_to_target_array (&targets, os,
- opt_state->targets,
- &(opt_state->start_revision),
- &(opt_state->end_revision),
- FALSE, pool));
+ SVN_ERR (svn_opt_args_to_target_array2 (&targets, os,
+ opt_state->targets, pool));
/* Revert has no implicit dot-target `.', so don't you put that code here! */
if (! targets->nelts)
Index: subversion/clients/cmdline/cat-cmd.c
===================================================================
--- subversion/clients/cmdline/cat-cmd.c (revision 11796)
+++ subversion/clients/cmdline/cat-cmd.c (working copy)
@@ -44,11 +44,8 @@
svn_stream_t *out;
apr_pool_t *subpool = svn_pool_create (pool);
- SVN_ERR (svn_opt_args_to_target_array (&targets, os,
- opt_state->targets,
- &(opt_state->start_revision),
- &(opt_state->end_revision),
- FALSE, pool));
+ SVN_ERR (svn_opt_args_to_target_array2 (&targets, os,
+ opt_state->targets, pool));
/* Cat cannot operate on an implicit '.' so a filename is required */
if (! targets->nelts)
Index: subversion/clients/cmdline/diff-cmd.c
===================================================================
--- subversion/clients/cmdline/diff-cmd.c (revision 11796)
+++ subversion/clients/cmdline/diff-cmd.c (working copy)
@@ -98,11 +98,8 @@
/* The 'svn diff --old=OLD[@OLDREV] [--new=NEW[@NEWREV]]
[PATH...]' case matches. */
- SVN_ERR (svn_opt_args_to_target_array (&targets, os,
- opt_state->targets,
- NULL,
- NULL,
- FALSE, pool));
+ SVN_ERR (svn_opt_args_to_target_array2 (&targets, os,
+ opt_state->targets, pool));
tmp = apr_array_make (pool, 2, sizeof (const char *));
APR_ARRAY_PUSH (tmp, const char *) = (opt_state->old_target);
@@ -136,11 +133,8 @@
/* Here each target is a pegged object. Find out the starting
and ending paths for each target. */
- SVN_ERR (svn_opt_args_to_target_array (&targets, os,
- opt_state->targets,
- NULL,
- NULL,
- FALSE, pool));
+ SVN_ERR (svn_opt_args_to_target_array2 (&targets, os,
+ opt_state->targets, pool));
svn_opt_push_implicit_dot_target (targets, pool);
Index: subversion/clients/cmdline/copy-cmd.c
===================================================================
--- subversion/clients/cmdline/copy-cmd.c (revision 11796)
+++ subversion/clients/cmdline/copy-cmd.c (working copy)
@@ -47,11 +47,8 @@
svn_boolean_t src_is_url, dst_is_url;
svn_client_commit_info_t *commit_info = NULL;
- SVN_ERR (svn_opt_args_to_target_array (&targets, os,
- opt_state->targets,
- &(opt_state->start_revision),
- &(opt_state->end_revision),
- FALSE, pool));
+ SVN_ERR (svn_opt_args_to_target_array2 (&targets, os,
+ opt_state->targets, pool));
if (targets->nelts != 2)
return svn_error_create (SVN_ERR_CL_ARG_PARSING_ERROR, 0, NULL);
Index: subversion/clients/cmdline/ls-cmd.c
===================================================================
--- subversion/clients/cmdline/ls-cmd.c (revision 11796)
+++ subversion/clients/cmdline/ls-cmd.c (working copy)
@@ -126,11 +126,8 @@
int i;
apr_pool_t *subpool = svn_pool_create (pool);
- SVN_ERR (svn_opt_args_to_target_array (&targets, os,
- opt_state->targets,
- &(opt_state->start_revision),
- &(opt_state->end_revision),
- FALSE, pool));
+ SVN_ERR (svn_opt_args_to_target_array2 (&targets, os,
+ opt_state->targets, pool));
/* Add "." if user passed 0 arguments */
svn_opt_push_implicit_dot_target (targets, pool);
Index: subversion/clients/cmdline/blame-cmd.c
===================================================================
--- subversion/clients/cmdline/blame-cmd.c (revision 11796)
+++ subversion/clients/cmdline/blame-cmd.c (working copy)
@@ -97,11 +97,8 @@
int i;
svn_boolean_t is_head_or_base = FALSE;
- SVN_ERR (svn_opt_args_to_target_array (&targets, os,
- opt_state->targets,
- &opt_state->start_revision,
- &opt_state->end_revision,
- FALSE, pool));
+ SVN_ERR (svn_opt_args_to_target_array2 (&targets, os,
+ opt_state->targets, pool));
/* Blame needs a file on which to operate. */
if (! targets->nelts)
Index: subversion/clients/cmdline/propget-cmd.c
===================================================================
--- subversion/clients/cmdline/propget-cmd.c (revision 11796)
+++ subversion/clients/cmdline/propget-cmd.c (working copy)
@@ -75,11 +75,8 @@
SVN_ERR (svn_utf_cstring_to_utf8 (&pname_utf8, pname, pool));
/* suck up all the remaining arguments into a targets array */
- SVN_ERR (svn_opt_args_to_target_array (&targets, os,
- opt_state->targets,
- &(opt_state->start_revision),
- &(opt_state->end_revision),
- FALSE, pool));
+ SVN_ERR (svn_opt_args_to_target_array2 (&targets, os,
+ opt_state->targets, pool));
/* Add "." if user passed 0 file arguments */
svn_opt_push_implicit_dot_target (targets, pool);
Index: subversion/clients/cmdline/log-cmd.c
===================================================================
--- subversion/clients/cmdline/log-cmd.c (revision 11796)
+++ subversion/clients/cmdline/log-cmd.c (working copy)
@@ -458,11 +458,8 @@
const char *target;
int i;
- SVN_ERR (svn_opt_args_to_target_array (&targets, os,
- opt_state->targets,
- &(opt_state->start_revision),
- &(opt_state->end_revision),
- FALSE, pool));
+ SVN_ERR (svn_opt_args_to_target_array2 (&targets, os,
+ opt_state->targets, pool));
/* Add "." if user passed 0 arguments */
svn_opt_push_implicit_dot_target(targets, pool);
Index: subversion/clients/cmdline/update-cmd.c
===================================================================
--- subversion/clients/cmdline/update-cmd.c (revision 11796)
+++ subversion/clients/cmdline/update-cmd.c (working copy)
@@ -47,11 +47,8 @@
apr_pool_t *subpool = svn_pool_create (pool);
int i;
- SVN_ERR (svn_opt_args_to_target_array (&targets, os,
- opt_state->targets,
- &(opt_state->start_revision),
- &(opt_state->end_revision),
- FALSE, pool));
+ SVN_ERR (svn_opt_args_to_target_array2 (&targets, os,
+ opt_state->targets, pool));
/* Add "." if user passed 0 arguments */
svn_opt_push_implicit_dot_target (targets, pool);
Index: subversion/clients/cmdline/resolved-cmd.c
===================================================================
--- subversion/clients/cmdline/resolved-cmd.c (revision 11796)
+++ subversion/clients/cmdline/resolved-cmd.c (working copy)
@@ -50,11 +50,8 @@
int i;
apr_pool_t *subpool;
- SVN_ERR (svn_opt_args_to_target_array (&targets, os,
- opt_state->targets,
- &(opt_state->start_revision),
- &(opt_state->end_revision),
- FALSE, pool));
+ SVN_ERR (svn_opt_args_to_target_array2 (&targets, os,
+ opt_state->targets, pool));
if (! targets->nelts)
return svn_error_create (SVN_ERR_CL_ARG_PARSING_ERROR, 0, NULL);
Index: subversion/clients/cmdline/cleanup-cmd.c
===================================================================
--- subversion/clients/cmdline/cleanup-cmd.c (revision 11796)
+++ subversion/clients/cmdline/cleanup-cmd.c (working copy)
@@ -45,11 +45,8 @@
apr_pool_t *subpool;
int i;
- SVN_ERR (svn_opt_args_to_target_array (&targets, os,
- opt_state->targets,
- &(opt_state->start_revision),
- &(opt_state->end_revision),
- FALSE, pool));
+ SVN_ERR (svn_opt_args_to_target_array2 (&targets, os,
+ opt_state->targets, pool));
/* Add "." if user passed 0 arguments */
svn_opt_push_implicit_dot_target (targets, pool);
Index: subversion/clients/cmdline/commit-cmd.c
===================================================================
--- subversion/clients/cmdline/commit-cmd.c (revision 11796)
+++ subversion/clients/cmdline/commit-cmd.c (working copy)
@@ -52,11 +52,8 @@
const char *base_dir;
svn_client_commit_info_t *commit_info = NULL;
- SVN_ERR (svn_opt_args_to_target_array (&targets, os,
- opt_state->targets,
- &(opt_state->start_revision),
- &(opt_state->end_revision),
- FALSE, pool));
+ SVN_ERR (svn_opt_args_to_target_array2 (&targets, os,
+ opt_state->targets, pool));
/* Add "." if user passed 0 arguments. */
svn_opt_push_implicit_dot_target (targets, pool);
Index: subversion/clients/cmdline/add-cmd.c
===================================================================
--- subversion/clients/cmdline/add-cmd.c (revision 11796)
+++ subversion/clients/cmdline/add-cmd.c (working copy)
@@ -50,11 +50,8 @@
int i;
apr_pool_t *subpool;
- SVN_ERR (svn_opt_args_to_target_array (&targets, os,
- opt_state->targets,
- &(opt_state->start_revision),
- &(opt_state->end_revision),
- FALSE, pool));
+ SVN_ERR (svn_opt_args_to_target_array2 (&targets, os,
+ opt_state->targets, pool));
if (! targets->nelts)
return svn_error_create (SVN_ERR_CL_ARG_PARSING_ERROR, 0, NULL);
Index: subversion/clients/cmdline/propset-cmd.c
===================================================================
--- subversion/clients/cmdline/propset-cmd.c (revision 11796)
+++ subversion/clients/cmdline/propset-cmd.c (working copy)
@@ -87,11 +87,8 @@
_("Bad encoding option: prop value not stored as UTF8"));
/* Suck up all the remaining arguments into a targets array */
- SVN_ERR (svn_opt_args_to_target_array (&targets, os,
- opt_state->targets,
- &(opt_state->start_revision),
- &(opt_state->end_revision),
- FALSE, pool));
+ SVN_ERR (svn_opt_args_to_target_array2 (&targets, os,
+ opt_state->targets, pool));
if (opt_state->revprop) /* operate on a revprop */
{
Index: subversion/clients/cmdline/switch-cmd.c
===================================================================
--- subversion/clients/cmdline/switch-cmd.c (revision 11796)
+++ subversion/clients/cmdline/switch-cmd.c (working copy)
@@ -90,11 +90,8 @@
/* This command should discover (or derive) exactly two cmdline
arguments: a local path to update ("target"), and a new url to
switch to ("switch_url"). */
- SVN_ERR (svn_opt_args_to_target_array (&targets, os,
- opt_state->targets,
- &(opt_state->start_revision),
- &(opt_state->end_revision),
- FALSE, pool));
+ SVN_ERR (svn_opt_args_to_target_array2 (&targets, os,
+ opt_state->targets, pool));
/* handle only-rewrite case specially */
if (opt_state->relocate)
Index: subversion/clients/cmdline/delete-cmd.c
===================================================================
--- subversion/clients/cmdline/delete-cmd.c (revision 11796)
+++ subversion/clients/cmdline/delete-cmd.c (working copy)
@@ -64,11 +64,8 @@
svn_client_commit_info_t *commit_info = NULL;
svn_error_t *err;
- SVN_ERR (svn_opt_args_to_target_array (&targets, os,
- opt_state->targets,
- &(opt_state->start_revision),
- &(opt_state->end_revision),
- FALSE, pool));
+ SVN_ERR (svn_opt_args_to_target_array2 (&targets, os,
+ opt_state->targets, pool));
if (! targets->nelts)
return svn_error_create (SVN_ERR_CL_ARG_PARSING_ERROR, 0, NULL);
Index: subversion/clients/cmdline/import-cmd.c
===================================================================
--- subversion/clients/cmdline/import-cmd.c (revision 11796)
+++ subversion/clients/cmdline/import-cmd.c (working copy)
@@ -76,11 +76,8 @@
* ### kff todo: review above behaviors.
*/
- SVN_ERR (svn_opt_args_to_target_array (&targets, os,
- opt_state->targets,
- &(opt_state->start_revision),
- &(opt_state->end_revision),
- FALSE, pool));
+ SVN_ERR (svn_opt_args_to_target_array2 (&targets, os,
+ opt_state->targets, pool));
if (targets->nelts < 1)
return svn_error_create
Index: subversion/clients/cmdline/proplist-cmd.c
===================================================================
--- subversion/clients/cmdline/proplist-cmd.c (revision 11796)
+++ subversion/clients/cmdline/proplist-cmd.c (working copy)
@@ -50,11 +50,8 @@
int i;
/* Suck up all remaining args in the target array. */
- SVN_ERR (svn_opt_args_to_target_array (&targets, os,
- opt_state->targets,
- &(opt_state->start_revision),
- &(opt_state->end_revision),
- FALSE, pool));
+ SVN_ERR (svn_opt_args_to_target_array2 (&targets, os,
+ opt_state->targets, pool));
/* Add "." if user passed 0 arguments */
svn_opt_push_implicit_dot_target (targets, pool);
Index: subversion/clients/cmdline/export-cmd.c
===================================================================
--- subversion/clients/cmdline/export-cmd.c (revision 11796)
+++ subversion/clients/cmdline/export-cmd.c (working copy)
@@ -48,11 +48,8 @@
svn_opt_revision_t peg_revision;
const char *truefrom;
- SVN_ERR (svn_opt_args_to_target_array (&targets, os,
- opt_state->targets,
- &(opt_state->start_revision),
- &(opt_state->end_revision),
- FALSE, pool));
+ SVN_ERR (svn_opt_args_to_target_array2 (&targets, os,
+ opt_state->targets, pool));
/* We want exactly 1 or 2 targets for this subcommand. */
if ((targets->nelts < 1) || (targets->nelts > 2))
Index: subversion/clients/cmdline/status-cmd.c
===================================================================
--- subversion/clients/cmdline/status-cmd.c (revision 11796)
+++ subversion/clients/cmdline/status-cmd.c (working copy)
@@ -88,11 +88,8 @@
svn_opt_revision_t rev;
struct status_baton sb;
- SVN_ERR (svn_opt_args_to_target_array (&targets, os,
- opt_state->targets,
- &(opt_state->start_revision),
- &(opt_state->end_revision),
- FALSE, pool));
+ SVN_ERR (svn_opt_args_to_target_array2 (&targets, os,
+ opt_state->targets, pool));
/* We want our -u statuses to be against HEAD. */
rev.kind = svn_opt_revision_head;
Index: subversion/clients/cmdline/propedit-cmd.c
===================================================================
--- subversion/clients/cmdline/propedit-cmd.c (revision 11796)
+++ subversion/clients/cmdline/propedit-cmd.c (working copy)
@@ -60,11 +60,8 @@
SVN_ERR (svn_utf_cstring_to_utf8 (&pname_utf8, pname, pool));
/* Suck up all the remaining arguments into a targets array */
- SVN_ERR (svn_opt_args_to_target_array (&targets, os,
- opt_state->targets,
- &(opt_state->start_revision),
- &(opt_state->end_revision),
- FALSE, pool));
+ SVN_ERR (svn_opt_args_to_target_array2 (&targets, os,
+ opt_state->targets, pool));
if (opt_state->revprop) /* operate on a revprop */
{
Index: subversion/clients/cmdline/info-cmd.c
===================================================================
--- subversion/clients/cmdline/info-cmd.c (revision 11796)
+++ subversion/clients/cmdline/info-cmd.c (working copy)
@@ -228,11 +228,8 @@
apr_pool_t *subpool = svn_pool_create (pool);
int i;
- SVN_ERR (svn_opt_args_to_target_array (&targets, os,
- opt_state->targets,
- &(opt_state->start_revision),
- &(opt_state->end_revision),
- FALSE, pool));
+ SVN_ERR (svn_opt_args_to_target_array2 (&targets, os,
+ opt_state->targets, pool));
/* Add "." if user passed 0 arguments. */
svn_opt_push_implicit_dot_target (targets, pool);
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Nov 9 14:53:19 2004