In many places in the command line client application, we return a
SVN_ERR_CL_ARG_PARSING_ERR when we try to run a command that needs
arguments. One notable except is the merge command, which returns a
SVN_ERR_CL_INSUFFICIENT_ARGS error instead. This more closely matches
the nature of the error, we haven't errored because we can't parse the
arguments, we've errored because there are an insufficient number of them.
Because this error occurs when the user hasn't fed us enough arguments,
the generic error message has also been changed to suggest they run help
for more information.
Also, the method of checking the number of arguments was a little
inconsistent between commands, so I've fixed that as well.
This patch complements Julian Foad's patch, because it causes a
semi-useful error message to be displayed, instead of running the
command help when no arguments are passed. These error messages should
probably be touched up to reflect the individual nature of the commands,
but that can be done in another patch.
Replace some occurrences of SVN_ERR_CL_ARG_PARSING_ERR in favor of
SVN_ERR_CL_INSUFFICIENT_ARGS. INSUFFICIENT_ARGS better matches the
meaning of what we were using ARG_PARSING_ERR for. Also, update the
generic error message to suggest running help.
(SVN_ERR_CL_INSUFFICIENT_ARGS): Add suggestion to run svn help.
(svn_opt_parse_num_args): Replace SVN_ERR_CL_ARG_PARSING_ERR in favor
(svn_cl__checkout): Replace SVN_ERR_CL_ARG_PARSING_ERR in favor
of SVN_ERR_CL_INSUFFICIENT_ARGS, and update a comment.
(svn_cl__import): Split the conditional checking for arguments and
replace SVN_ERR_CL_ARG_PARSING_ERR in favor of
SVN_ERR_CL_INSUFFICIENT_ARGS. This is consistent with svn_cl__export.
* mkdir-cmd.c (svn_cl__mkdir),
unlock-cmd.c (svn_cl__unlock): Replace SVN_ERR_CL_ARG_PARSING_ERR in
favor of SVN_ERR_CL_INSUFFICIENT_ARGS.
Received on Thu Nov 10 04:38:38 2005