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

Re: svn commit: r29127 - in trunk/subversion: bindings/swig include libsvn_subr libsvn_wc svn tests/cmdline

From: Augie Fackler <durin42_at_gmail.com>
Date: Fri, 1 Feb 2008 14:36:43 -0600

On Feb 1, 2008, at 1:51 PM, David Glasser wrote:

> On Feb 1, 2008 11:09 AM, Augie Fackler <durin42_at_gmail.com> wrote:
>> I'll start working on making these two fixes. Can anyone point me to
>> the "correct" way to return multiple errors from a function?
> I think what you did should work, although it's not something we do
> much in our code. In general we don't have a great way of supporting
> this sort of feedback (without the full overhead of the WC notifier).
> Alternatively, you can push the names into an array and join them
> together into one (possibly arbitrarily long) error message, which
> also isn't great.

Given there isn't any particular way to do this, I'll just leave them
chained - it works well enough. here's a patch that fixes the
documentation to be (I hope) up to spec. Log message is in the
attachment as well. As usual, I'm open to suggestions on the doc fixes
- writing good API docs is a newish thing for me.


Fix some documentation on svn_opt_args_to_target_array3() and
svn_opt_args_to_target_array2(). Also, put the newest version first in the

* subversion/include/svn_opt.h
  (svn_opt_args_to_target_array3): Updated documentation to describe how the
    errors work, and make this the version against which the old is compared.
  (svn_opt_args_to_target_array2): Update the documentation so this describes
    how it is different from svn_opt_args_to_target_array3().
Index: subversion/include/svn_opt.h
--- subversion/include/svn_opt.h (revision 29145)
+++ subversion/include/svn_opt.h (working copy)
@@ -477,27 +477,30 @@
  * On each URL target, do some IRI-to-URI encoding and some
  * auto-escaping. On each local path, canonicalize case and path
- * separators, and silently skip it if it has the same name as a
- * Subversion working copy administrative directory.
+ * separators. If a path has the same name as a Subversion working copy
+ * administrative directory, an SVN_ERR_RESERVED_FILENAME_SPECIFIED is returned.
+ * If multiple reserved paths are encountered, the errors will be placed in a
+ * chain together which will contain only SVN_ERR_RESERVED_FILENAME_SPECIFIED
+ * errors. The operation still completes if this is the only error encountered.
  * Allocate @a *targets_p and its elements in @a pool.
- * @since New in 1.2.
+ * @since New in 1.5.
 svn_error_t *
-svn_opt_args_to_target_array2(apr_array_header_t **targets_p,
+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);
- * 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.
+ * This is the same as svn_opt_args_to_target_array3() except that it silently
+ * ignores a path that has the same name as an administrative directory.
- * @since New in 1.5.
+ * @since New in 1.2.
 svn_error_t *
-svn_opt_args_to_target_array3(apr_array_header_t **targets_p,
+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);

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 21:36:58 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.