You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Garrett Rooney <ro...@electricjellyfish.net> on 2005/11/01 23:40:13 UTC
Re: [PATCH] Issue 443 : post-commit hook (error) output lost: Step 6 V2
On 10/31/05, Madan U Sreenivasan <ma...@collab.net> wrote:
In the change to subversion/libsvn_repos/commit.c:
+++ subversion/libsvn_repos/commit.c (working copy)
@@ -664,6 +664,7 @@
svn_revnum_t new_revision = SVN_INVALID_REVNUM;
svn_error_t *err;
const char *conflict;
+ char *post_commit_err = NULL;
/* If no transaction has been created (ie. if open_root wasn't
called before close_edit), abort the operation here with an
@@ -702,12 +703,13 @@
}
else if (err)
{
- /* ### TODO: ra_local is the only RA layer that currently
- understands SVN_ERR_REPOS_POST_COMMIT_HOOK_FAILED. And as of
- at least r12960, svn_repos_fs_commit_txn() would never return
- that anyway. If someone who knows ra_svn better can add
- handling for this special case, this whole "else if" block
- can go away (again). */
+ /* Post-commit hook's failure output can be passed back to the
+ client. However, this cannot be a commit failure. Hence
+ passing back the post-commit error message as a string to
+ be displayed as a warning. */
+ if (err->child->message)
+ post_commit_err = apr_pstrdup (pool, err->child->message) ;
+
Is there any chance that err->child could be NULL?
Also, this file doesn't appear in the log message.
-garrett
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Issue 443 : post-commit hook (error) output lost: Step
6 V2
Posted by Madan U Sreenivasan <ma...@collab.net>.
On Thu, 2005-11-03 at 03:01, Madan U Sreenivasan wrote:
> On Wed, 2005-11-02 at 05:10, Garrett Rooney wrote:
> > On 10/31/05, Madan U Sreenivasan <ma...@collab.net> wrote:
> >
> > In the change to subversion/libsvn_repos/commit.c:
> [snip]
> > + if (err->child->message)
> > + post_commit_err = apr_pstrdup (pool, err->child->message) ;
> > +
> >
> > Is there any chance that err->child could be NULL?
> If the post-commit hook errors out, but doesnt have any info in
> stderr...
> > Also, this file doesn't appear in the log message.
> oh, yes. I just noticed. I must have it in the earlier copies of the
> log(yes, I have multiple copies of the log as I go ;) )...will fix this.
> Thanks.
here they come.
>
> Regards,
> Madan.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Issue 443 : post-commit hook (error) output lost: Step
6 V2
Posted by Madan U Sreenivasan <ma...@collab.net>.
On Wed, 2005-11-02 at 05:10, Garrett Rooney wrote:
> On 10/31/05, Madan U Sreenivasan <ma...@collab.net> wrote:
>
> In the change to subversion/libsvn_repos/commit.c:
[snip]
> + if (err->child->message)
> + post_commit_err = apr_pstrdup (pool, err->child->message) ;
> +
>
> Is there any chance that err->child could be NULL?
If the post-commit hook errors out, but doesnt have any info in
stderr...
> Also, this file doesn't appear in the log message.
oh, yes. I just noticed. I must have it in the earlier copies of the
log(yes, I have multiple copies of the log as I go ;) )...will fix this.
Thanks.
Regards,
Madan.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org