You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Daniel Shahaf <d....@daniel.shahaf.name> on 2012/10/09 20:29:48 UTC

[PATCH] match svnauthz-validate exit code to --help promise

svnauthz-validate --help promises exitcode==2 in most code paths:

Index: tools/server-side/svnauthz-validate.c
===================================================================
--- tools/server-side/svnauthz-validate.c	(revision 1396152)
+++ tools/server-side/svnauthz-validate.c	(working copy)
@@ -88,10 +88,12 @@ main(int argc, const char **argv)
   /* Repeat svn_cmdline__getopt_init() inline. */
   apr_err = apr_getopt_init(&os, pool, argc, argv);
   if (apr_err)
-    return svn_cmdline_handle_exit_error(
-             svn_error_wrap_apr(apr_err,
-                                ("Error initializing command line arguments")),
-             pool, "svn-rep-sharing-stats: ");
+    {
+       err = svn_error_wrap_apr(apr_err,
+                                ("Error initializing command line arguments"));
+       svn_handle_warning2(stderr, err, "svnauthz-validate: ");
+       return 2;
+    }
 
   os->interleave = 1;
   while (1)
@@ -131,8 +133,15 @@ main(int argc, const char **argv)
     }
 
   /* Grab AUTHZ_FILE from argv. */
-  SVN_INT_ERR(svn_utf_cstring_to_utf8(&opts.authz_file, os->argv[os->ind],
-                                      pool));
+  err = svn_utf_cstring_to_utf8(&opts.authz_file, os->argv[os->ind],
+                                pool);
+  if (err)
+    {
+      svn_handle_warning2(stderr, err, "svnauthz-validate: ");
+      svn_error_clear(err);
+      return 2;
+    }
+
   opts.authz_file = svn_dirent_internal_style(opts.authz_file, pool);
 
   /* Read the access file and validate it. */

Re: [PATCH] match svnauthz-validate exit code to --help promise

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
C. Michael Pilato wrote on Thu, Nov 29, 2012 at 14:58:07 -0500:
> On 10/09/2012 02:29 PM, Daniel Shahaf wrote:
> > svnauthz-validate --help promises exitcode==2 in most code paths:
> 
> r1415344.

Thanks.

Re: [PATCH] match svnauthz-validate exit code to --help promise

Posted by "C. Michael Pilato" <cm...@collab.net>.
On 10/09/2012 02:29 PM, Daniel Shahaf wrote:
> svnauthz-validate --help promises exitcode==2 in most code paths:

r1415344.

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Enterprise Cloud Development