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

Re: [PATCH] Re: Incorrect usage shouldn't give a long help message

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2005-11-08 18:49:46 CET

Hyrum K. Wright wrote:
> Julian Foad wrote:
>>Incorrect usage should result in an error message, consistently for all
>>commands. It's been on my "to do" list for years. Perhaps now I'll do it.
> Sounds reasonable. Here's a patch to print an error instead of the
> online help for the move command.
> -Hyrum
> [[[
> * subversion/clients/cmdline/move-cmd.c
> (svn_cl__move): Change the error from NULL to something useful, thus
> preventing the display of the online help when there aren't enough
> arguments.
> - return svn_error_create (SVN_ERR_CL_ARG_PARSING_ERROR, 0, NULL);
> + return svn_error_create (SVN_ERR_CL_ARG_PARSING_ERROR, 0,
> + _("No source and/or destination path given"));

Well, that's one way to do it. I was thinking, instead, of removing all the
code that prints extra help, as in the attached patch. (My favourite type of
programming: removing needless complexity. :-)

The only concerns I have with my patch are (1) some people are likely to be
uncomfortable with the whole idea, so we need a little time for consultation;
and (2) some of the error messages that will now appear may be not as good as
we would wish, but I think we can improve them separately.

- Julian

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Nov 8 18:50:54 2005

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.