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

Re: New [PATCH] Fix issue 3026: .svn and _svn silently ignored

From: Augie Fackler <durin42_at_gmail.com>
Date: Thu, 31 Jan 2008 20:09:12 -0600

On Jan 31, 2008, at 6:23 PM, Augie Fackler wrote:

>
> On Jan 31, 2008, at 5:45 PM, David Glasser wrote:
>
>> On Dec 26, 2007 6:00 PM, Augie Fackler <durin42_at_gmail.com> wrote:
>>>
>>>
>>> On Nov 26, 2007, at 8:18 PM, Augie Fackler wrote:
>>>
>>>> Hey all,
>>>>
>>>> Here's shot #2 at $subj. The log message is crazy long because I
>>>> touched lots of files in one spot. As it stands, the only
>>>> subcommand
>>>> that treats "_svn" or ".svn" as an error is update because that's
>>>> the only one that it seemed to me needed to be that way.
>>>
>>> Should I hold onto this until 1.5 branches? The only feedback I got
>>> was that this should wait until after 1.5 because we were close to
>>> the
>>> branch point.
>>
>> Heh, nobody responded to this; I guess the answer's obvious now!
>
> Yeah, pretty much. I need to work on an updated version because it
> has lotsa conflicts right now. I'll work on that presently and
> submit a revised patch.

Attached is an updated version of the patch. My tests indicate I've
understood the conflicts correctly (a hug for interactive conflict
resolution), but please do comment if something looks suspect.

Peace,
Augie

[[[
Fix issue 3026: _svn and .svn are silently ignored as file arguments.

* subversion/include/svn_error_codes.h
  (SVN_ERR_RESERVED_FILENAME_SPECIFIED): New error code for when reserved file
    arguments are encountered.

* subversion/libsvn_wc/adm_files.c:
  (svn_wc_set_adm_dir): Updated comment to reflect the change of location for
    the other code block.

* subversion/include/svn_opt.h:
  (svn_opt_args_to_target_array3): New function prototype.

* subversion/libsvn_subr/opt.c:
  (svn_opt_args_to_target_array3): New function. Behaves like
    svn_opt_args_to_target_array2 except this one returns errors instead of
    silently ignoring reserved file names.
  
  (svn_opt_args_to_target_array2): Reimplemented to wrap
    svn_opt_args_to_target_array2 but filter out any error about reserved
    filenames.

* subversion/svn/cl.h:
  (svn_cl__args_to_target_array_print_reserved): New function prototype.

* subversion/svn/util.c:
  (svn_cl_args_to_target_array_print_reserved): New function. Convenience
    function to wrap svn_opt_args_to_target_array_3 and print any errors about
    reserved filenames to stderr before returning.

* subversion/bindings/swig/core.i:
  (svn_opt_args_to_target_array3): Ignore this function as well.
  
* subversion/svn/merge-cmd.c:
  (svn_cl__merge): Use svn_cl__args_to_target_array_print_reserved instead of
    svn_opt_args_to_target_array2 so that reserved filenames aren't silently
    ignored.

* subversion/svn/propdel-cmd.c:
  (svn_cl__propdel): Use svn_cl__args_to_target_array_print_reserved instead of
    svn_opt_args_to_target_array2 so that reserved filenames aren't silently
    ignored. Updated comment to reflect this.

* subversion/svn/checkout-cmd.c:
  (svn_cl__checkout): Use svn_cl__args_to_target_array_print_reserved instead of
    svn_opt_args_to_target_array2 so that reserved filenames aren't silently
    ignored.

* subversion/svn/move-cmd.c:
  (svn_cl__move): Use svn_cl__args_to_target_array_print_reserved instead of
    svn_opt_args_to_target_array2 so that reserved filenames aren't silently
    ignored.

* subversion/svn/mkdir-cmd.c:
  (svn_cl__mkdir): Use svn_cl__args_to_target_array_print_reserved instead of
    svn_opt_args_to_target_array2 so that reserved filenames aren't silently
    ignored.

* subversion/svn/cat-cmd.c:
  (svn_cl__cat): Use svn_cl__args_to_target_array_print_reserved instead of
    svn_opt_args_to_target_array2 so that reserved filenames aren't silently
    ignored. Updated comment to reflect this.

* subversion/svn/revert-cmd.c:
  (svn_cl__revert): Use svn_cl__args_to_target_array_print_reserved instead of
    svn_opt_args_to_target_array2 so that reserved filenames aren't silently
    ignored. Updated comment to reflect this.

* subversion/svn/diff-cmd.c:
  (svn_cl__diff): Use svn_cl__args_to_target_array_print_reserved instead of
    svn_opt_args_to_target_array2 so that reserved filenames aren't silently
    ignored. Updated comment to reflect this.

* subversion/svn/copy-cmd.c:
  (svn_cl__copy): Use svn_cl__args_to_target_array_print_reserved instead of
    svn_opt_args_to_target_array2 so that reserved filenames aren't silently
    ignored.

* subversion/svn/mergeinfo-cmd.c:
  (svn_cl__mergeinfo): Use svn_cl__args_to_target_array_print_reserved instead of
    svn_opt_args_to_target_array2 so that reserved filenames aren't silently
    ignored.

* subversion/svn/list-cmd.c:
  (svn_cl__list): Use svn_cl__args_to_target_array_print_reserved instead of
    svn_opt_args_to_target_array2 so that reserved filenames aren't silently
    ignored.

* subversion/svn/blame-cmd.c:
  (svn_cl__blame): Use svn_cl__args_to_target_array_print_reserved instead of
    svn_opt_args_to_target_array2 so that reserved filenames aren't silently
    ignored.

* subversion/svn/propget-cmd.c:
  (svn_cl__propget): Use svn_cl__args_to_target_array_print_reserved instead of
    svn_opt_args_to_target_array2 so that reserved filenames aren't silently
    ignored. Updated comment to reflect this.

* subversion/svn/changelist-cmd.c:
  (svn_cl__changelist): Use svn_cl__args_to_target_array_print_reserved instead
    of svn_opt_args_to_target_array2 so that reserved filenames aren't silently
    ignored. Updated comment to reflect this.

* subversion/svn/propdel-cmd.c:
  (svn_cl__propdel): Use svn_cl__args_to_target_array_print_reserved instead of
    svn_opt_args_to_target_array2 so that reserved filenames aren't silently
    ignored. Updated comment to reflect this.

* subversion/svn/log-cmd.c:
  (svn_cl__log): Use svn_cl__args_to_target_array_print_reserved instead of
    svn_opt_args_to_target_array2 so that reserved filenames aren't silently
    ignored. Updated comment to reflect this.

* subversion/svn/update-cmd.c:
  (svn_cl__propdel): Use svn_opt_args_to_target_array3 instead of
    svn_opt_args_to_target_array2 so that reserved filenames exit as an error.

* subversion/svn/resolved-cmd.c:
  (svn_cl__resloved): Use svn_cl__args_to_target_array_print_reserved instead of
    svn_opt_args_to_target_array2 so that reserved filenames aren't silently
    ignored.

* subversion/svn/cleanup-cmd.c:
  (svn_cl__cleanup): Use svn_cl__args_to_target_array_print_reserved instead of
    svn_opt_args_to_target_array2 so that reserved filenames aren't silently
    ignored.

* subversion/svn/commit-cmd.c:
  (svn_cl__commit): Use svn_cl__args_to_target_array_print_reserved instead of
    svn_opt_args_to_target_array2 so that reserved filenames aren't silently
    ignored.

* subversion/svn/add-cmd.c:
  (svn_cl__add): Use svn_cl__args_to_target_array_print_reserved instead of
    svn_opt_args_to_target_array2 so that reserved filenames aren't silently
    ignored.

* subversion/svn/propset-cmd.c:
  (svn_cl__propset): Use svn_cl__args_to_target_array_print_reserved instead of
    svn_opt_args_to_target_array2 so that reserved filenames aren't silently
    ignored. Updated comment to reflect this.

* subversion/svn/switch-cmd.c:
  (svn_cl__switch): Use svn_cl__args_to_target_array_print_reserved instead of
    svn_opt_args_to_target_array2 so that reserved filenames aren't silently
    ignored.

* subversion/svn/delete-cmd.c:
  (svn_cl__delete): Use svn_cl__args_to_target_array_print_reserved instead of
    svn_opt_args_to_target_array2 so that reserved filenames aren't silently
    ignored.

* subversion/svn/import-cmd.c:
  (svn_cl__import): Use svn_cl__args_to_target_array_print_reserved instead of
    svn_opt_args_to_target_array2 so that reserved filenames aren't silently
    ignored.

* subversion/svn/proplist-cmd.c:
  (svn_cl__proplist): Use svn_cl__args_to_target_array_print_reserved instead of
    svn_opt_args_to_target_array2 so that reserved filenames aren't silently
    ignored. Updated comment to reflect this.

* subversion/svn/export-cmd.c:
  (svn_cl__export): Use svn_cl__args_to_target_array_print_reserved instead of
    svn_opt_args_to_target_array2 so that reserved filenames aren't silently
    ignored. Updated comment to reflect this.

* subversion/svn/propdel-cmd.c:
  (svn_cl__propdel): Use svn_cl__args_to_target_array_print_reserved instead of
    svn_opt_args_to_target_array2 so that reserved filenames aren't silently
    ignored.

* subversion/svn/status-cmd.c:
  (svn_cl__status): Use svn_cl__args_to_target_array_print_reserved instead of
    svn_opt_args_to_target_array2 so that reserved filenames aren't silently
    ignored. Updated comment to reflect this.

* subversion/svn/propedit-cmd.c:
  (svn_cl__propdel): Use svn_cl__args_to_target_array_print_reserved instead of
    svn_opt_args_to_target_array2 so that reserved filenames aren't silently
    ignored.

* subversion/svn/lock-cmd.c:
  (svn_cl__lock): Use svn_cl__args_to_target_array_print_reserved instead of
    svn_opt_args_to_target_array2 so that reserved filenames aren't silently
    ignored. Updated comment to reflect this.

* subversion/svn/info-cmd.c:
  (svn_cl__info): Use svn_cl__args_to_target_array_print_reserved instead of
    svn_opt_args_to_target_array2 so that reserved filenames aren't silently
    ignored. Updated comment to reflect this.

* subversion/svn/unlock-cmd.c:
  (svn_cl__unlock): Use svn_cl__args_to_target_array_print_reserved instead of
    svn_opt_args_to_target_array2 so that reserved filenames aren't silently
    ignored. Updated comment to reflect this.

Patch by: Augie Fackler: <durin42_at_gmail.com>
]]]

Index: subversion/include/svn_error_codes.h
===================================================================
--- subversion/include/svn_error_codes.h (revision 29117)
+++ subversion/include/svn_error_codes.h (working copy)
@@ -1124,6 +1124,10 @@
   SVN_ERRDEF(SVN_ERR_UNKNOWN_CHANGELIST,
              SVN_ERR_MISC_CATEGORY_START + 24,
              "Unknown changelist")
+
+ SVN_ERRDEF(SVN_ERR_RESERVED_FILENAME_SPECIFIED,
+ SVN_ERR_MISC_CATEGORY_START + 25,
+ "Reserved directory name in command line arguments")
 
   /* command-line client errors */
 
Index: subversion/include/svn_opt.h
===================================================================
--- subversion/include/svn_opt.h (revision 29117)
+++ subversion/include/svn_opt.h (working copy)
@@ -490,7 +490,19 @@
                               apr_array_header_t *known_targets,
                               apr_pool_t *pool);
 
+/**
+ * This is the same as svn_opt_args_to_target_array2() except that it returns
+ * errors when a path has the same name as a working copy directory.
+ *
+ * @since New in 1.5.
+ */
+svn_error_t *
+svn_opt_args_to_target_array3(apr_array_header_t **targets_p,
+ apr_getopt_t *os,
+ apr_array_header_t *known_targets,
+ apr_pool_t *pool);
 
+
 /**
  * The same as svn_opt_args_to_target_array2() except that, in
  * addition, if @a extract_revisions is set, then look for trailing
Index: subversion/libsvn_wc/adm_files.c
===================================================================
--- subversion/libsvn_wc/adm_files.c (revision 29117)
+++ subversion/libsvn_wc/adm_files.c (working copy)
@@ -76,7 +76,7 @@
 
      FIXME:
      An identical list is used in
- libsvn_subr/opt.c:svn_opt_args_to_target_array2(),
+ libsvn_subr/opt.c:svn_opt_args_to_target_array3(),
      but that function can't use this list, because that use would
      create a circular dependency between libsvn_wc and libsvn_subr.
      Make sure changes to the lists are always synchronized! */
Index: subversion/libsvn_subr/opt.c
===================================================================
--- subversion/libsvn_subr/opt.c (revision 29117)
+++ subversion/libsvn_subr/opt.c (working copy)
@@ -872,7 +872,30 @@
                               apr_array_header_t *known_targets,
                               apr_pool_t *pool)
 {
+ svn_error_t *error = svn_opt_args_to_target_array3(targets_p,
+ os,
+ known_targets,
+ pool);
+ if (error)
+ {
+ if (error->apr_err == SVN_ERR_RESERVED_FILENAME_SPECIFIED)
+ svn_error_clear(error);
+ else
+ return error;
+ }
+ return SVN_NO_ERROR;
+
+}
+
+
+svn_error_t *
+svn_opt_args_to_target_array3(apr_array_header_t **targets_p,
+ apr_getopt_t *os,
+ apr_array_header_t *known_targets,
+ apr_pool_t *pool)
+{
   int i;
+ svn_error_t *error = 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 =
@@ -1010,7 +1033,14 @@
              synchronized! */
           if (0 == strcmp(base_name, ".svn")
               || 0 == strcmp(base_name, "_svn"))
- continue;
+ {
+ char *error_str = apr_psprintf(pool, _("'%s' ends in a "
+ "reserved name"), target);
+ error = svn_error_create(SVN_ERR_RESERVED_FILENAME_SPECIFIED,
+ error,
+ error_str);
+ continue;
+ }
         }
 
       /* Append the peg revision back to the canonicalized target if
@@ -1026,6 +1056,8 @@
      passing it to the cmd_func. */
 
   *targets_p = output_targets;
+ if (error)
+ return error;
   return SVN_NO_ERROR;
 }
 
Index: subversion/bindings/swig/core.i
===================================================================
--- subversion/bindings/swig/core.i (revision 29117)
+++ subversion/bindings/swig/core.i (working copy)
@@ -680,6 +680,7 @@
 %ignore svn_commit_info_dup;
 
 %ignore svn_opt_args_to_target_array2;
+%ignore svn_opt_args_to_target_array3;
 %ignore svn_opt_parse_num_args;
 %ignore svn_opt_parse_all_args;
 #endif
Index: subversion/svn/merge-cmd.c
===================================================================
--- subversion/svn/merge-cmd.c (revision 29117)
+++ subversion/svn/merge-cmd.c (working copy)
@@ -50,8 +50,9 @@
     peg_revision2;
   apr_array_header_t *options, *ranges_to_merge = opt_state->revision_ranges;
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- opt_state->targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ opt_state->targets,
+ pool));
 
   /* Parse at least one, and possible two, sources. */
   if (targets->nelts >= 1)
Index: subversion/svn/cl.h
===================================================================
--- subversion/svn/cl.h (revision 29117)
+++ subversion/svn/cl.h (working copy)
@@ -561,6 +561,12 @@
                                       svn_client_ctx_t *ctx,
                                       apr_pool_t *pool);
 
+svn_error_t *
+svn_cl__args_to_target_array_print_reserved(apr_array_header_t **targets_p,
+ apr_getopt_t *os,
+ apr_array_header_t *known_targets,
+ apr_pool_t *pool);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */
Index: subversion/svn/propdel-cmd.c
===================================================================
--- subversion/svn/propdel-cmd.c (revision 29117)
+++ subversion/svn/propdel-cmd.c (working copy)
@@ -56,9 +56,11 @@
      properties, and it may even be useful to allow, in case invalid
      properties sneaked through somehow. */
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- opt_state->targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ opt_state->targets,
+ pool));
 
+
   /* Add "." if user passed 0 file arguments */
   svn_opt_push_implicit_dot_target(targets, pool);
 
Index: subversion/svn/checkout-cmd.c
===================================================================
--- subversion/svn/checkout-cmd.c (revision 29117)
+++ subversion/svn/checkout-cmd.c (working copy)
@@ -70,8 +70,9 @@
   const char *repos_url;
   int i;
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- opt_state->targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ opt_state->targets,
+ pool));
 
   if (! targets->nelts)
     return svn_error_create(SVN_ERR_CL_INSUFFICIENT_ARGS, 0, NULL);
Index: subversion/svn/move-cmd.c
===================================================================
--- subversion/svn/move-cmd.c (revision 29117)
+++ subversion/svn/move-cmd.c (working copy)
@@ -46,8 +46,9 @@
   svn_commit_info_t *commit_info = NULL;
   svn_error_t *err;
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- opt_state->targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ opt_state->targets,
+ pool));
 
   if (targets->nelts < 2)
     return svn_error_create(SVN_ERR_CL_INSUFFICIENT_ARGS, 0, NULL);
Index: subversion/svn/mkdir-cmd.c
===================================================================
--- subversion/svn/mkdir-cmd.c (revision 29117)
+++ subversion/svn/mkdir-cmd.c (working copy)
@@ -45,8 +45,9 @@
   svn_commit_info_t *commit_info = NULL;
   svn_error_t *err;
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- opt_state->targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ opt_state->targets,
+ pool));
 
   if (! targets->nelts)
     return svn_error_create(SVN_ERR_CL_INSUFFICIENT_ARGS, 0, NULL);
Index: subversion/svn/cat-cmd.c
===================================================================
--- subversion/svn/cat-cmd.c (revision 29117)
+++ subversion/svn/cat-cmd.c (working copy)
@@ -43,8 +43,9 @@
   svn_stream_t *out;
   apr_pool_t *subpool = svn_pool_create(pool);
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- opt_state->targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ opt_state->targets,
+ pool));
 
   /* Cat cannot operate on an implicit '.' so a filename is required */
   if (! targets->nelts)
Index: subversion/svn/revert-cmd.c
===================================================================
--- subversion/svn/revert-cmd.c (revision 29117)
+++ subversion/svn/revert-cmd.c (working copy)
@@ -43,8 +43,9 @@
   apr_array_header_t *targets = NULL;
   svn_error_t *err;
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- opt_state->targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&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/svn/diff-cmd.c
===================================================================
--- subversion/svn/diff-cmd.c (revision 29117)
+++ subversion/svn/diff-cmd.c (working copy)
@@ -188,8 +188,9 @@
       SVN_ERR(svn_cl__error_checked_fputs(sb->data, stdout));
     }
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- opt_state->targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ opt_state->targets,
+ pool));
 
   if (! opt_state->old_target && ! opt_state->new_target
       && (targets->nelts == 2)
@@ -228,7 +229,8 @@
                                            : APR_ARRAY_IDX(tmp, 0,
                                                            const char *));
 
- SVN_ERR(svn_opt_args_to_target_array2(&tmp2, os, tmp, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&tmp2, os, tmp,
+ pool));
       SVN_ERR(svn_opt_parse_path(&old_rev, &old_target,
                                  APR_ARRAY_IDX(tmp2, 0, const char *),
                                  pool));
Index: subversion/svn/copy-cmd.c
===================================================================
--- subversion/svn/copy-cmd.c (revision 29117)
+++ subversion/svn/copy-cmd.c (working copy)
@@ -47,8 +47,9 @@
   svn_error_t *err;
   int i;
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- opt_state->targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ opt_state->targets,
+ pool));
   if (targets->nelts < 2)
     return svn_error_create(SVN_ERR_CL_INSUFFICIENT_ARGS, 0, NULL);
 
Index: subversion/svn/list-cmd.c
===================================================================
--- subversion/svn/list-cmd.c (revision 29117)
+++ subversion/svn/list-cmd.c (working copy)
@@ -218,8 +218,9 @@
   apr_uint32_t dirent_fields;
   struct print_baton pb;
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- opt_state->targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ opt_state->targets,
+ pool));
 
   /* Add "." if user passed 0 arguments */
   svn_opt_push_implicit_dot_target(targets, pool);
Index: subversion/svn/mergeinfo-cmd.c
===================================================================
--- subversion/svn/mergeinfo-cmd.c (revision 29117)
+++ subversion/svn/mergeinfo-cmd.c (working copy)
@@ -131,8 +131,9 @@
   apr_pool_t *subpool = svn_pool_create(pool);
   int i;
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- opt_state->targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ opt_state->targets,
+ pool));
 
   /* Add "." if user passed 0 arguments. */
   svn_opt_push_implicit_dot_target(targets, pool);
Index: subversion/svn/util.c
===================================================================
--- subversion/svn/util.c (revision 29117)
+++ subversion/svn/util.c (working copy)
@@ -1010,6 +1010,28 @@
 }
 
 
+svn_error_t *
+svn_cl__args_to_target_array_print_reserved(apr_array_header_t **targets,
+ apr_getopt_t *os,
+ apr_array_header_t *known_targets,
+ apr_pool_t *pool)
+{
+ svn_error_t *error = svn_opt_args_to_target_array3(targets, os,
+ known_targets, pool);
+ if (error)
+ {
+ if (error->apr_err == SVN_ERR_RESERVED_FILENAME_SPECIFIED)
+ {
+ svn_handle_error2(error, stderr, FALSE, "svn: Skipping argument: ");
+ svn_error_clear(error);
+ }
+ else
+ return error;
+ }
+ return SVN_NO_ERROR;
+}
+
+
 /* Helper for svn_cl__get_changelist(); implements
    svn_changelist_receiver_t. */
 static svn_error_t *
Index: subversion/svn/blame-cmd.c
===================================================================
--- subversion/svn/blame-cmd.c (revision 29117)
+++ subversion/svn/blame-cmd.c (working copy)
@@ -192,8 +192,9 @@
   svn_boolean_t end_revision_unspecified = FALSE;
   svn_diff_file_options_t *diff_options = svn_diff_file_options_create(pool);
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- opt_state->targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ opt_state->targets,
+ pool));
 
   /* Blame needs a file on which to operate. */
   if (! targets->nelts)
Index: subversion/svn/propget-cmd.c
===================================================================
--- subversion/svn/propget-cmd.c (revision 29117)
+++ subversion/svn/propget-cmd.c (working copy)
@@ -180,8 +180,9 @@
                              _("'%s' is not a valid Subversion property name"),
                              pname_utf8);
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- opt_state->targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ opt_state->targets,
+ pool));
 
   /* Add "." if user passed 0 file arguments */
   svn_opt_push_implicit_dot_target(targets, pool);
Index: subversion/svn/changelist-cmd.c
===================================================================
--- subversion/svn/changelist-cmd.c (revision 29117)
+++ subversion/svn/changelist-cmd.c (working copy)
@@ -58,8 +58,9 @@
     }
 
   /* Parse the remaining arguments as paths. */
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- opt_state->targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ opt_state->targets,
+ pool));
 
   /* Add "." if user passed 0 arguments */
   svn_opt_push_implicit_dot_target(targets, pool);
Index: subversion/svn/log-cmd.c
===================================================================
--- subversion/svn/log-cmd.c (revision 29117)
+++ subversion/svn/log-cmd.c (working copy)
@@ -466,8 +466,9 @@
                                   " XML mode"));
     }
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- opt_state->targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ opt_state->targets,
+ pool));
 
   /* Add "." if user passed 0 arguments */
   svn_opt_push_implicit_dot_target(targets, pool);
Index: subversion/svn/update-cmd.c
===================================================================
--- subversion/svn/update-cmd.c (revision 29117)
+++ subversion/svn/update-cmd.c (working copy)
@@ -46,7 +46,7 @@
   svn_depth_t depth;
   svn_boolean_t depth_is_sticky;
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
+ SVN_ERR(svn_opt_args_to_target_array3(&targets, os,
                                         opt_state->targets, pool));
 
   /* Add "." if user passed 0 arguments */
Index: subversion/svn/resolved-cmd.c
===================================================================
--- subversion/svn/resolved-cmd.c (revision 29117)
+++ subversion/svn/resolved-cmd.c (working copy)
@@ -68,8 +68,9 @@
                               _("invalid 'accept' ARG"));
     }
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- opt_state->targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ opt_state->targets,
+ pool));
   if (! targets->nelts)
     return svn_error_create(SVN_ERR_CL_INSUFFICIENT_ARGS, 0, NULL);
 
Index: subversion/svn/cleanup-cmd.c
===================================================================
--- subversion/svn/cleanup-cmd.c (revision 29117)
+++ subversion/svn/cleanup-cmd.c (working copy)
@@ -43,8 +43,9 @@
   apr_pool_t *subpool;
   int i;
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- opt_state->targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ opt_state->targets,
+ pool));
 
   /* Add "." if user passed 0 arguments */
   svn_opt_push_implicit_dot_target(targets, pool);
Index: subversion/svn/commit-cmd.c
===================================================================
--- subversion/svn/commit-cmd.c (revision 29117)
+++ subversion/svn/commit-cmd.c (working copy)
@@ -51,8 +51,9 @@
   svn_boolean_t no_unlock = FALSE;
   svn_commit_info_t *commit_info = NULL;
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- opt_state->targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ opt_state->targets,
+ pool));
 
   /* Add "." if user passed 0 arguments. */
   svn_opt_push_implicit_dot_target(targets, pool);
Index: subversion/svn/add-cmd.c
===================================================================
--- subversion/svn/add-cmd.c (revision 29117)
+++ subversion/svn/add-cmd.c (working copy)
@@ -45,8 +45,9 @@
   int i;
   apr_pool_t *subpool;
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- opt_state->targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ opt_state->targets,
+ pool));
 
   if (! targets->nelts)
     return svn_error_create(SVN_ERR_CL_INSUFFICIENT_ARGS, 0, NULL);
Index: subversion/svn/propset-cmd.c
===================================================================
--- subversion/svn/propset-cmd.c (revision 29117)
+++ subversion/svn/propset-cmd.c (working copy)
@@ -89,9 +89,11 @@
          _("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_array2(&targets, os,
- opt_state->targets, pool));
 
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ opt_state->targets,
+ pool));
+
   /* Implicit "." is okay for revision properties; it just helps
      us find the right repository. */
   if (opt_state->revprop)
Index: subversion/svn/switch-cmd.c
===================================================================
--- subversion/svn/switch-cmd.c (revision 29117)
+++ subversion/svn/switch-cmd.c (working copy)
@@ -99,8 +99,9 @@
   /* 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_array2(&targets, os,
- opt_state->targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ opt_state->targets,
+ pool));
 
   /* handle only-rewrite case specially */
   if (opt_state->relocate)
Index: subversion/svn/delete-cmd.c
===================================================================
--- subversion/svn/delete-cmd.c (revision 29117)
+++ subversion/svn/delete-cmd.c (working copy)
@@ -44,8 +44,9 @@
   svn_commit_info_t *commit_info = NULL;
   svn_error_t *err;
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- opt_state->targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ opt_state->targets,
+ pool));
 
   if (! targets->nelts)
     return svn_error_create(SVN_ERR_CL_INSUFFICIENT_ARGS, 0, NULL);
Index: subversion/svn/import-cmd.c
===================================================================
--- subversion/svn/import-cmd.c (revision 29117)
+++ subversion/svn/import-cmd.c (working copy)
@@ -73,8 +73,9 @@
    * ### kff todo: review above behaviors.
    */
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- opt_state->targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ opt_state->targets,
+ pool));
 
   if (targets->nelts < 1)
     return svn_error_create
Index: subversion/svn/proplist-cmd.c
===================================================================
--- subversion/svn/proplist-cmd.c (revision 29117)
+++ subversion/svn/proplist-cmd.c (working copy)
@@ -112,8 +112,9 @@
   apr_array_header_t *targets;
   int i;
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- opt_state->targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ opt_state->targets,
+ pool));
 
   /* Add "." if user passed 0 file arguments */
   svn_opt_push_implicit_dot_target(targets, pool);
Index: subversion/svn/export-cmd.c
===================================================================
--- subversion/svn/export-cmd.c (revision 29117)
+++ subversion/svn/export-cmd.c (working copy)
@@ -46,8 +46,9 @@
   svn_opt_revision_t peg_revision;
   const char *truefrom;
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- opt_state->targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ opt_state->targets,
+ pool));
 
   /* We want exactly 1 or 2 targets for this subcommand. */
   if (targets->nelts < 1)
Index: subversion/svn/status-cmd.c
===================================================================
--- subversion/svn/status-cmd.c (revision 29117)
+++ subversion/svn/status-cmd.c (working copy)
@@ -216,8 +216,9 @@
   svn_opt_revision_t rev;
   struct status_baton sb;
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- opt_state->targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ opt_state->targets,
+ pool));
 
   /* Add "." if user passed 0 arguments */
   svn_opt_push_implicit_dot_target(targets, pool);
Index: subversion/svn/propedit-cmd.c
===================================================================
--- subversion/svn/propedit-cmd.c (revision 29117)
+++ subversion/svn/propedit-cmd.c (working copy)
@@ -61,8 +61,9 @@
                              pname_utf8);
 
   /* Suck up all the remaining arguments into a targets array */
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- opt_state->targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ opt_state->targets,
+ pool));
 
   if (opt_state->revprop) /* operate on a revprop */
     {
Index: subversion/svn/lock-cmd.c
===================================================================
--- subversion/svn/lock-cmd.c (revision 29117)
+++ subversion/svn/lock-cmd.c (working copy)
@@ -85,8 +85,9 @@
   apr_array_header_t *targets;
   const char *comment;
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- opt_state->targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ opt_state->targets,
+ pool));
 
   /* We only support locking files, so '.' is not valid. */
   if (! targets->nelts)
Index: subversion/svn/info-cmd.c
===================================================================
--- subversion/svn/info-cmd.c (revision 29117)
+++ subversion/svn/info-cmd.c (working copy)
@@ -450,8 +450,9 @@
   svn_opt_revision_t peg_revision;
   svn_info_receiver_t receiver;
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- opt_state->targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ opt_state->targets,
+ pool));
 
   /* Add "." if user passed 0 arguments. */
   svn_opt_push_implicit_dot_target(targets, pool);
Index: subversion/svn/unlock-cmd.c
===================================================================
--- subversion/svn/unlock-cmd.c (revision 29117)
+++ subversion/svn/unlock-cmd.c (working copy)
@@ -44,8 +44,9 @@
   svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx;
   apr_array_header_t *targets;
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- opt_state->targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ opt_state->targets,
+ pool));
 
   /* We don't support unlock on directories, so "." is not relevant. */
   if (! targets->nelts)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-02-01 03:09:44 CET

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.