subversion/libsvn_repos/commit.c:648: no previous prototype for 'svn_repos__post_commit_error_str'
- Julian bl...@apache.org wrote: > Add a private function that takes the error returned from > svn_repos_fs_commit_txn() and builds a error message string containing > either or both of the svn_fs_commit_txn() error and the > SVN_ERR_REPOS_POST_COMMIT_HOOK_FAILED wrapped post-commit error. The > function skips over tracing errors. > > * subversion/include/private/svn_repos_private.h > (svn_repos__post_commit_error_str): > New private function. > > * subversion/libsvn_repos/commit.c > (svn_repos__post_commit_error_str): > Implement. > (close_edit): > Use svn_repos__post_commit_error_str() instead of processing the > SVN_ERR_REPOS_POST_COMMIT_HOOK_FAILED wrapped error. [...] > Modified: subversion/trunk/subversion/include/private/svn_repos_private.h > URL: > http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_repos_private.h?rev=1051763&r1=1051762&r2=1051763&view=diff > ============================================================================== > --- subversion/trunk/subversion/include/private/svn_repos_private.h (original) > +++ subversion/trunk/subversion/include/private/svn_repos_private.h Wed Dec > 22 05:46:45 2010 > @@ -84,6 +84,25 @@ svn_repos__validate_prop(const char *nam > const svn_string_t *value, > apr_pool_t *pool); > > +/** > + * Given the error @a err from svn_repos_fs_commit_txn(), return an > + * string containing either or both of the svn_fs_commit_txn() error > + * and the SVN_ERR_REPOS_POST_COMMIT_HOOK_FAILED wrapped error from > + * the post-commit hook. Any error tracing placeholders in the error > + * chain are skipped over. > + * > + * ### This method should not be necessary, but there are a few > + * ### places, e.g. mod_dav_svn, where only a single error message > + * ### string is returned to the caller and it is useful to have both > + * ### error messages included in the message. > + * > + * Use @a pool to allocate the string in. > + * > + * @since New in 1.7. > + */ > +const char * > +svn_repos__post_commit_error_str(svn_error_t *err, > + apr_pool_t *pool); > > #ifdef __cplusplus > } > > Modified: subversion/trunk/subversion/libsvn_repos/commit.c > URL: > http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/commit.c?rev=1051763&r1=1051762&r2=1051763&view=diff > ============================================================================== > --- subversion/trunk/subversion/libsvn_repos/commit.c (original) > +++ subversion/trunk/subversion/libsvn_repos/commit.c Wed Dec 22 05:46:45 2010 > @@ -644,7 +644,56 @@ change_dir_prop(void *dir_baton, > name, value, pool); > } > > +const char * > +svn_repos__post_commit_error_str(svn_error_t *err, > + apr_pool_t *pool) > +{ > + svn_error_t *hook_err1, *hook_err2; [...]