[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: <cmpilato_at_collab.net>
Date: 2002-07-16 19:24:41 CEST

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

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.