Karl Fogel <kfogel@newton.ch.collab.net> writes:
> 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?
So, in this case, you want to see a regular svn error output, with
something like: "Merge command is missing args", followed by `svn
help merge' output?
Seems fine, though I'd like to think our usage messages should be good
enough that we don't need to be that verbose.
---------------------------------------------------------------------
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:27:01 2002