Since much of the command-line parsing stuffs was abstracted into
libsvn_subr from its original location in 'svn' (the command-line client),
there is a particular annoyance that shows up in certain circumstances. See
if you can spot it:
$ svnsync init file://`pwd`/mirror
subversion/libsvn_subr/opt.c:659: (apr_err=205001)
svnsync: Not enough arguments provided; try 'svn help' for more info
Right. 'svn help' ain't gonna tell me a blessed thing about how to wield
svnsync. Turns out this string is the default one for the
SVN_ERR_CL_INSUFFICIENT_ARGS code:
SVN_ERRDEF(SVN_ERR_CL_INSUFFICIENT_ARGS,
SVN_ERR_CL_CATEGORY_START + 1,
"Not enough arguments provided; try 'svn help' for more info")
I presume that we've decided that that block of error codes is for *all*
Subversion command-line applications to use, else they wouldn't live in our
public header file. So I think we need to make some tweaks to remove
references to 'svn' and 'client' from those error codes. Further, we need
to purge a bunch of error codes that are *only* used by the 'svn' client
(like SVN_ERR_CL_BAD_LOG_MESSAGE, for example) from that list, and move them
into that client's codebase as custom error codes in the "user error" space.
Regardless, looks like I've got to trap errors with the
SVN_ERR_CL_INSUFFICIENT_ARGS code and try to override the string attached to
them with something that refers to 'svnsync help'.
--
C. Michael Pilato <cmpilato@collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand
Received on Thu Aug 3 22:15:25 2006