Marc Pawlowsky wrote on Fri, Dec 02, 2016 at 20:48:16 -0500: > However I believe a supported, documented, and forward compatible way is > preferable; given the volume of questions that come up when googling it > seems to be a popular item. >
I don't recall it ever being asked before on this list. That said, using the error codes should be forward compatible. The other error code you should watch for is SVN_ERR_WC_UNSUPPORTED_FORMAT: % svn co -q file://$PWD/r wc % rm wc/.svn/wc.db % echo 99 >wc/.svn/format % echo 99 >wc/.svn/entries % svn info wc svn: E155021: This client is too old to work with the working copy at '/tmp/tmp.P4dTltFcw5/wc' (format 99). > The problem I am working on is to have a bash script exit early with a > clear error message if: > > - the script was checked out in a svn workspace version that is not > expected, older or newer. > - the script is executed on a host that has an old version of svn that > cannot work with the workspace. > - the script is executed on a host that has a newer version of svn, such > that the workspace would have to be upgraded. Using SVN_ERR_WC_UNSUPPORTED_FORMAT, SVN_ERR_WC_UPGRADE_REQUIRED, and `svn --version -q`, you can implement your script without reliance on any implementation details. You should probably handle SVN_ERR_WC_CLEANUP_REQUIRED too: % ./tools/dev/which-error.py list | grep CLEANUP 00155037 SVN_ERR_WC_CLEANUP_REQUIRED Cheers, Daniel