Author: rhuijben Date: Tue Sep 20 10:07:34 2016 New Revision: 1761547 URL: http://svn.apache.org/viewvc?rev=1761547&view=rev Log: Make svnmucc print the post commit error texts, just like svn does.
* subversion/include/svn_types.h (svn_commit_callback2_t): Extend comment by adding pointer to svn_ra_get_commit_editor3() documentation. * subversion/svnmucc/svnmucc.c (commit_callback): Document implemented api. Print post commit error if any. Modified: subversion/trunk/subversion/include/svn_types.h subversion/trunk/subversion/svnmucc/svnmucc.c Modified: subversion/trunk/subversion/include/svn_types.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_types.h?rev=1761547&r1=1761546&r2=1761547&view=diff ============================================================================== --- subversion/trunk/subversion/include/svn_types.h (original) +++ subversion/trunk/subversion/include/svn_types.h Tue Sep 20 10:07:34 2016 @@ -1078,6 +1078,11 @@ typedef svn_error_t *(*svn_log_message_r * @a commit_info, along with the @a baton closure. * @a pool can be used for temporary allocations. * + * @note Implementers of this callback that pass this callback to + * svn_ra_get_commit_editor3() should be careful with returning errors + * as these might be returned as commit errors. See the documentation + * of svn_ra_get_commit_editor3() for more details. + * * @since New in 1.4. */ typedef svn_error_t *(*svn_commit_callback2_t)( Modified: subversion/trunk/subversion/svnmucc/svnmucc.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnmucc/svnmucc.c?rev=1761547&r1=1761546&r2=1761547&view=diff ============================================================================== --- subversion/trunk/subversion/svnmucc/svnmucc.c (original) +++ subversion/trunk/subversion/svnmucc/svnmucc.c Tue Sep 20 10:07:34 2016 @@ -74,6 +74,7 @@ check_lib_versions(void) return svn_ver_check_list2(&my_version, checklist, svn_ver_equal); } +/* Implements svn_commit_callback2_t */ static svn_error_t * commit_callback(const svn_commit_info_t *commit_info, void *baton, @@ -84,6 +85,15 @@ commit_callback(const svn_commit_info_t (commit_info->author ? commit_info->author : "(no author)"), commit_info->date)); + + /* Writing to stdout, as there maybe systems that consider the + * presence of stderr as an indication of commit failure. + * OTOH, this is only of informational nature to the user as + * the commit has succeeded. */ + if (commit_info->post_commit_err) + SVN_ERR(svn_cmdline_printf(pool, _("\nWarning: %s\n"), + commit_info->post_commit_err)); + return SVN_NO_ERROR; }