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

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

From: Augie Fackler <durin42_at_gmail.com>
Date: 2007-11-27 03:18:40 CET

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.

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@gmail.com>
]]]

Index: subversion/include/svn_error_codes.h
===================================================================
--- subversion/include/svn_error_codes.h (revision 28046)
+++ subversion/include/svn_error_codes.h (working copy)
@@ -1121,6 +1121,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 28046)
+++ subversion/include/svn_opt.h (working copy)
@@ -471,7 +471,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 28046)
+++ 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 28046)
+++ 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 28046)
+++ subversion/bindings/swig/core.i (working copy)
@@ -684,6 +684,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 28046)
+++ subversion/svn/merge-cmd.c (working copy)
@@ -50,8 +50,9 @@
     peg_revision2;
   apr_array_header_t *options;
 
- 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)
     {
       SVN_ERR(svn_opt_parse_path(&peg_revision1, &sourcepath1,
Index: subversion/svn/cl.h
===================================================================
--- subversion/svn/cl.h (revision 28046)
+++ subversion/svn/cl.h (working copy)
@@ -599,6 +599,12 @@
                                     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 28046)
+++ subversion/svn/propdel-cmd.c (working copy)
@@ -57,9 +57,9 @@
      properties, and it may even be useful to allow, in case invalid
      properties sneaked through somehow. */
 
- /* Before allowing svn_opt_args_to_target_array2() to canonicalize
- all the targets, we need to build a list of targets made of both
- ones the user typed, as well as any specified by --changelist. */
+ /* Before allowing svn_cl__args_to_target_array_print_reserved() to
+ canonicalize all the targets, we need to build a list of targets made
+ of both ones the user typed, as well as any specified by --changelist. */
   if (opt_state->changelist)
     {
       SVN_ERR(svn_client_get_changelist(&changelist_targets,
@@ -81,8 +81,8 @@
   else if (changelist_targets)
     combined_targets = changelist_targets;
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- combined_targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ combined_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 28046)
+++ 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 28046)
+++ 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 28046)
+++ 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 28046)
+++ 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 28046)
+++ subversion/svn/revert-cmd.c (working copy)
@@ -44,9 +44,9 @@
   apr_array_header_t *changelist_targets = NULL, *combined_targets = NULL;
   svn_error_t *err;
 
- /* Before allowing svn_opt_args_to_target_array2() to canonicalize
- all the targets, we need to build a list of targets made of both
- ones the user typed, as well as any specified by --changelist. */
+ /* Before allowing svn_cl__args_to_target_array_print_reserved() to
+ canonicalize all the targets, we need to build a list of targets made
+ of both ones the user typed, as well as any specified by --changelist. */
   if (opt_state->changelist)
     {
       SVN_ERR(svn_client_get_changelist(&changelist_targets,
@@ -68,7 +68,8 @@
   else if (changelist_targets)
     combined_targets = changelist_targets;
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os, combined_targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ combined_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 28046)
+++ subversion/svn/diff-cmd.c (working copy)
@@ -189,7 +189,7 @@
       SVN_ERR(svn_cl__error_checked_fputs(sb->data, stdout));
     }
 
- /* Before allowing svn_opt_args_to_target_array2() to canonicalize
+ /* Before allowing svn_cl__args_to_target_array_print_reserved() to canonicalize
      all the targets, we need to build a list of targets made of both
      ones the user typed, as well as any specified by --changelist. */
   if (opt_state->changelist)
@@ -213,8 +213,8 @@
   else if (changelist_targets)
     combined_targets = changelist_targets;
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- combined_targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ combined_targets, pool));
 
   if (! opt_state->old_target && ! opt_state->new_target
       && (targets->nelts == 2)
@@ -253,7 +253,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 28046)
+++ 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/mergeinfo-cmd.c
===================================================================
--- subversion/svn/mergeinfo-cmd.c (revision 28046)
+++ subversion/svn/mergeinfo-cmd.c (working copy)
@@ -72,8 +72,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/list-cmd.c
===================================================================
--- subversion/svn/list-cmd.c (revision 28046)
+++ 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/util.c
===================================================================
--- subversion/svn/util.c (revision 28046)
+++ subversion/svn/util.c (working copy)
@@ -1006,3 +1006,25 @@
       return "";
     }
 }
+
+
+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;
+}
Index: subversion/svn/propget-cmd.c
===================================================================
--- subversion/svn/propget-cmd.c (revision 28046)
+++ subversion/svn/propget-cmd.c (working copy)
@@ -181,9 +181,9 @@
                              _("'%s' is not a valid Subversion property name"),
                              pname_utf8);
 
- /* Before allowing svn_opt_args_to_target_array2() to canonicalize
- all the remaining targets, we need to build a list of targets made of both
- ones the user typed, as well as any specified by --changelist. */
+ /* Before allowing svn_cl__args_to_target_array_print_reserved() to
+ canonicalize all the targets, we need to build a list of targets made
+ of both ones the user typed, as well as any specified by --changelist. */
   if (opt_state->changelist)
     {
       SVN_ERR(svn_client_get_changelist(&changelist_targets,
@@ -205,8 +205,8 @@
   else if (changelist_targets)
     combined_targets = changelist_targets;
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- combined_targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ combined_targets, pool));
 
   /* Add "." if user passed 0 file arguments */
   svn_opt_push_implicit_dot_target(targets, pool);
Index: subversion/svn/blame-cmd.c
===================================================================
--- subversion/svn/blame-cmd.c (revision 28046)
+++ 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/log-cmd.c
===================================================================
--- subversion/svn/log-cmd.c (revision 28046)
+++ subversion/svn/log-cmd.c (working copy)
@@ -467,9 +467,9 @@
                                   " XML mode"));
     }
 
- /* Before allowing svn_opt_args_to_target_array2() to canonicalize
- all the targets, we need to build a list of targets made of both
- ones the user typed, as well as any specified by --changelist. */
+ /* Before allowing svn_cl__args_to_target_array_print_reserved() to
+ canonicalize all the targets, we need to build a list of targets made
+ of both ones the user typed, as well as any specified by --changelist. */
   if (opt_state->changelist)
     {
       SVN_ERR(svn_client_get_changelist(&changelist_targets,
@@ -491,8 +491,8 @@
   else if (changelist_targets)
     combined_targets = changelist_targets;
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- combined_targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ combined_targets, pool));
 
   /* Add "." if user passed 0 arguments */
   svn_opt_push_implicit_dot_target(targets, pool);
Index: subversion/svn/changelist-cmd.c
===================================================================
--- subversion/svn/changelist-cmd.c (revision 28046)
+++ subversion/svn/changelist-cmd.c (working copy)
@@ -47,9 +47,9 @@
   apr_array_header_t *paths;
   int i;
 
- /* Before allowing svn_opt_args_to_target_array2() to canonicalize
- all the targets, we need to build a list of targets made of both
- ones the user typed, as well as any specified by --changelist. */
+ /* Before allowing svn_cl__args_to_target_array_print_reserved() to
+ canonicalize all the targets, we need to build a list of targets made
+ of both ones the user typed, as well as any specified by --changelist. */
   if (opt_state->changelist)
     {
       SVN_ERR(svn_client_get_changelist(&changelist_targets,
@@ -71,8 +71,8 @@
   else if (changelist_targets)
     combined_targets = changelist_targets;
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- combined_targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ combined_targets, pool));
 
   if (opt_state->remove)
     {
Index: subversion/svn/update-cmd.c
===================================================================
--- subversion/svn/update-cmd.c (revision 28046)
+++ subversion/svn/update-cmd.c (working copy)
@@ -45,9 +45,9 @@
   apr_array_header_t *targets;
   apr_array_header_t *changelist_targets = NULL, *combined_targets = NULL;
 
- /* Before allowing svn_opt_args_to_target_array2() to canonicalize
- all the targets, we need to build a list of targets made of both
- ones the user typed, as well as any specified by --changelist. */
+ /* Before allowing svn_cl__args_to_target_array_print_reserved() to
+ canonicalize all the targets, we need to build a list of targets made
+ of both ones the user typed, as well as any specified by --changelist. */
   if (opt_state->changelist)
     {
       SVN_ERR(svn_client_get_changelist(&changelist_targets,
@@ -69,8 +69,7 @@
   else if (changelist_targets)
     combined_targets = changelist_targets;
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- combined_targets, pool));
+ SVN_ERR(svn_opt_args_to_target_array3(&targets, os, combined_targets, pool));
 
   /* Add "." if user passed 0 arguments */
   svn_opt_push_implicit_dot_target(targets, pool);
Index: subversion/svn/resolved-cmd.c
===================================================================
--- subversion/svn/resolved-cmd.c (revision 28046)
+++ 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 28046)
+++ 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/add-cmd.c
===================================================================
--- subversion/svn/add-cmd.c (revision 28046)
+++ 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/commit-cmd.c
===================================================================
--- subversion/svn/commit-cmd.c (revision 28046)
+++ 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/propset-cmd.c
===================================================================
--- subversion/svn/propset-cmd.c (revision 28046)
+++ subversion/svn/propset-cmd.c (working copy)
@@ -91,9 +91,9 @@
 
   /* Suck up all the remaining arguments into a targets array */
 
- /* Before allowing svn_opt_args_to_target_array2() to canonicalize
- all the targets, we need to build a list of targets made of both
- ones the user typed, as well as any specified by --changelist. */
+ /* Before allowing svn_cl__args_to_target_array_print_reserved() to
+ canonicalize all the targets, we need to build a list of targets made
+ of both ones the user typed, as well as any specified by --changelist. */
   if (opt_state->changelist)
     {
       SVN_ERR(svn_client_get_changelist(&changelist_targets,
@@ -115,8 +115,8 @@
   else if (changelist_targets)
     combined_targets = changelist_targets;
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- combined_targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ combined_targets, pool));
 
   if (opt_state->revprop) /* operate on a revprop */
     {
Index: subversion/svn/switch-cmd.c
===================================================================
--- subversion/svn/switch-cmd.c (revision 28046)
+++ subversion/svn/switch-cmd.c (working copy)
@@ -97,8 +97,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 28046)
+++ 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 28046)
+++ 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 28046)
+++ subversion/svn/proplist-cmd.c (working copy)
@@ -113,9 +113,9 @@
   apr_array_header_t *changelist_targets = NULL, *combined_targets = NULL;
   int i;
 
- /* Before allowing svn_opt_args_to_target_array2() to canonicalize
- all the targets, we need to build a list of targets made of both
- ones the user typed, as well as any specified by --changelist. */
+ /* Before allowing svn_cl__args_to_target_array_print_reserved() to
+ canonicalize all the targets, we need to build a list of targets made
+ of both ones the user typed, as well as any specified by --changelist. */
   if (opt_state->changelist)
     {
       SVN_ERR(svn_client_get_changelist(&changelist_targets,
@@ -137,8 +137,8 @@
   else if (changelist_targets)
     combined_targets = changelist_targets;
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- combined_targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ combined_targets, pool));
 
   /* Add "." if user passed 0 arguments */
   svn_opt_push_implicit_dot_target(targets, pool);
Index: subversion/svn/export-cmd.c
===================================================================
--- subversion/svn/export-cmd.c (revision 28046)
+++ 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 28046)
+++ subversion/svn/status-cmd.c (working copy)
@@ -216,9 +216,9 @@
   svn_opt_revision_t rev;
   struct status_baton sb;
 
- /* Before allowing svn_opt_args_to_target_array2() to canonicalize
- all the targets, we need to build a list of targets made of both
- ones the user typed, as well as any specified by --changelist. */
+ /* Before allowing svn_cl__args_to_target_array_print_reserved() to
+ canonicalize all the targets, we need to build a list of targets made
+ of both ones the user typed, as well as any specified by --changelist. */
   if (opt_state->changelist)
     {
       SVN_ERR(svn_client_get_changelist(&changelist_targets,
@@ -240,8 +240,8 @@
   else if (changelist_targets)
     combined_targets = changelist_targets;
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- combined_targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ combined_targets, pool));
 
   /* We want our -u statuses to be against HEAD. */
   rev.kind = svn_opt_revision_head;
Index: subversion/svn/propedit-cmd.c
===================================================================
--- subversion/svn/propedit-cmd.c (revision 28046)
+++ 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 28046)
+++ subversion/svn/lock-cmd.c (working copy)
@@ -86,9 +86,9 @@
   apr_array_header_t *changelist_targets = NULL, *combined_targets = NULL;
   const char *comment;
 
- /* Before allowing svn_opt_args_to_target_array2() to canonicalize
- all the targets, we need to build a list of targets made of both
- ones the user typed, as well as any specified by --changelist. */
+ /* Before allowing svn_cl__args_to_target_array_print_reserved() to
+ canonicalize all the targets, we need to build a list of targets made
+ of both ones the user typed, as well as any specified by --changelist. */
   if (opt_state->changelist)
     {
       SVN_ERR(svn_client_get_changelist(&changelist_targets,
@@ -110,8 +110,8 @@
   else if (changelist_targets)
     combined_targets = changelist_targets;
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- combined_targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ combined_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 28046)
+++ subversion/svn/info-cmd.c (working copy)
@@ -451,9 +451,9 @@
   svn_opt_revision_t peg_revision;
   svn_info_receiver_t receiver;
 
- /* Before allowing svn_opt_args_to_target_array2() to canonicalize
- all the targets, we need to build a list of targets made of both
- ones the user typed, as well as any specified by --changelist. */
+ /* Before allowing svn_cl__args_to_target_array_print_reserved() to
+ canonicalize all the targets, we need to build a list of targets made
+ of both ones the user typed, as well as any specified by --changelist. */
   if (opt_state->changelist)
     {
       SVN_ERR(svn_client_get_changelist(&changelist_targets,
@@ -475,8 +475,8 @@
   else if (changelist_targets)
     combined_targets = changelist_targets;
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- combined_targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ combined_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 28046)
+++ subversion/svn/unlock-cmd.c (working copy)
@@ -45,9 +45,9 @@
   apr_array_header_t *targets;
   apr_array_header_t *changelist_targets = NULL, *combined_targets = NULL;
 
- /* Before allowing svn_opt_args_to_target_array2() to canonicalize
- all the targets, we need to build a list of targets made of both
- ones the user typed, as well as any specified by --changelist. */
+ /* Before allowing svn_cl__args_to_target_array_print_reserved() to
+ canonicalize all the targets, we need to build a list of targets made
+ of both ones the user typed, as well as any specified by --changelist. */
   if (opt_state->changelist)
     {
       SVN_ERR(svn_client_get_changelist(&changelist_targets,
@@ -69,8 +69,8 @@
   else if (changelist_targets)
     combined_targets = changelist_targets;
 
- SVN_ERR(svn_opt_args_to_target_array2(&targets, os,
- combined_targets, pool));
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ combined_targets, pool));
 
   /* We don't support unlock on directories, so "." is not relevant. */
   if (! targets->nelts)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Nov 27 03:18:54 2007

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.