You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2012/08/01 21:43:00 UTC
svn commit: r1368217 - in /subversion/trunk/subversion: svn/main.c
svnadmin/main.c
Author: julianfoad
Date: Wed Aug 1 19:42:59 2012
New Revision: 1368217
URL: http://svn.apache.org/viewvc?rev=1368217&view=rev
Log:
Simplify error handling by calling an existing subroutine.
* subversion/svnadmin/main.c,
subversion/svn/main.c
(main): Use svn_cmdline_handle_exit_error().
Modified:
subversion/trunk/subversion/svn/main.c
subversion/trunk/subversion/svnadmin/main.c
Modified: subversion/trunk/subversion/svn/main.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/main.c?rev=1368217&r1=1368216&r2=1368217&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/main.c (original)
+++ subversion/trunk/subversion/svn/main.c Wed Aug 1 19:42:59 2012
@@ -2792,19 +2792,7 @@ main(int argc, const char *argv[])
"(type 'svn help cleanup' for details)"));
}
- /* Issue #3014:
- * Don't print anything on broken pipes. The pipe was likely
- * closed by the process at the other end. We expect that
- * process to perform error reporting as necessary.
- *
- * ### This assumes that there is only one error in a chain for
- * ### SVN_ERR_IO_PIPE_WRITE_ERROR. See svn_cmdline_fputs(). */
- if (err->apr_err != SVN_ERR_IO_PIPE_WRITE_ERROR)
- svn_handle_error2(err, stderr, FALSE, "svn: ");
-
- svn_error_clear(err);
- svn_pool_destroy(pool);
- return EXIT_FAILURE;
+ return svn_cmdline_handle_exit_error(err, pool, "svn: ");
}
else
{
Modified: subversion/trunk/subversion/svnadmin/main.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnadmin/main.c?rev=1368217&r1=1368216&r2=1368217&view=diff
==============================================================================
--- subversion/trunk/subversion/svnadmin/main.c (original)
+++ subversion/trunk/subversion/svnadmin/main.c Wed Aug 1 19:42:59 2012
@@ -2132,17 +2132,7 @@ main(int argc, const char *argv[])
err = svn_cmdline_fflush(stdout);
if (err)
{
- /* Issue #3014:
- * Don't print anything on broken pipes. The pipe was likely
- * closed by the process at the other end. We expect that
- * process to perform error reporting as necessary.
- *
- * ### This assumes that there is only one error in a chain for
- * ### SVN_ERR_IO_PIPE_WRITE_ERROR. See svn_cmdline_fputs(). */
- if (err->apr_err != SVN_ERR_IO_PIPE_WRITE_ERROR)
- svn_handle_error2(err, stderr, FALSE, "svnadmin: ");
- svn_error_clear(err);
- return EXIT_FAILURE;
+ return svn_cmdline_handle_exit_error(err, NULL, "svnadmin: ");
}
return EXIT_SUCCESS;
}