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

Re: svn commit: rev 2547 - trunk/subversion/clients/cmdline

From: Karl Fogel <kfogel_at_newton.ch.collab.net>
Date: 2002-07-16 19:11:21 CEST

gstein@tigris.org writes in merge-cmd.c:
> + /* If there are no targets at all, then let's just give the user a
> + friendly help message, rather than spewing an error. */
> + if (targets->nelts == 0)
> + {
> + return svn_error_create (SVN_ERR_CL_ARG_PARSING_ERROR, 0, 0, pool,
> + "" /* message is unused */);
> + }
> +

That seems odd. Maybe it would be better if we patched this code in
main.c:

     if (err)
       {
         if (err->apr_err == SVN_ERR_CL_ARG_PARSING_ERROR)
           svn_cl__subcommand_help (subcommand->name, pool);
         else
           svn_handle_error (err, stderr, 0);
         svn_pool_destroy (pool);
         return EXIT_FAILURE;
       }

So that in the SVN_ERR_CL_ARG_PARSING_ERROR case, it would first
handles the error, and then do svn_cl__subcommand_help? That way
information which is available only at the point of original error
generation does not have to be lost; we can have our cake and eat it
too.

Thoughts?

-K

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jul 16 19:23:08 2002

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.