PATCH: client shows help instead of certain specific error messages
From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2003-04-09 01:30:21 CEST
For certain argument parsing errors, "svn diff" and other commands show help text even though a specific error message has been set up by the code that detected the error.
Reproduction transcript:
> ~/src/subversion> svn diff http://any.url/
This is what it wanted to display (the code in diff-cmd.c sets up this error message):
> ~/src/subversion> svn diff http://any.url/
The current behaviour was introduced in revision 1882 to ensure that something useful would be displayed for argument parsing errors, rather than nothing at all. Presumably at that time specific error messages were not being created, but now in some cases they are.
Here is a log message for the attached patch to improve the behaviour:
For argument parsing errors, do not just show the help message, because useful
* subversion/clients/cmdline/main.c:
This patch assumes that null error messages are represented by an empty string rather than by a null pointer, which is the case throughout the command-line client at present. I do not know whether this policy is or should be written down anywhere - perhaps it should be in the documentation of svn_error_create.
- Julian
Index: subversion/clients/cmdline/main.c
---------------------------------------------------------------------
|
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.