[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Issue 443 : post-commit hook (error) output lost: Step 6

From: Madan U Sreenivasan <madan_at_collab.net>
Date: 2005-10-20 02:01:00 CEST

On Thu, 2005-10-20 at 03:10, Philip Martin wrote:
> Madan U Sreenivasan <madan@collab.net> writes:
>
> > --- subversion/mod_dav_svn/version.c (revision 16776)
> > +++ subversion/mod_dav_svn/version.c (working copy)
> > @@ -1614,6 +1614,7 @@
> > svn_fs_txn_t *txn;
> > const char *conflict;
> > svn_error_t *serr;
> > + char *post_commit_err = NULL;
> > svn_revnum_t new_rev;
> > apr_hash_t *locks;
> > svn_boolean_t disable_merge_response = FALSE;
> > @@ -1694,7 +1695,11 @@
> > return dav_svn_convert_err(serr, HTTP_CONFLICT, msg, pool);
> > }
> > else if (serr)
> > - svn_error_clear(serr);
> > + {
> > + if (serr->child->message)
> > + post_commit_err = apr_pstrdup (pool, serr->child->message);
>
> If serr->child is NULL you dump core.
we need a NULL check here. Thanks.
> It all looks a bit dodgy, you
> are building detailed knowledge of the structure of the repository
> error chain into mod_dav_svn. I'm not quite sure what you are trying
> to do, but if you are looking for a particular error then perhaps you
> should iterate through the list checking apr_err?
theres only one level of error message, in this case.. I think iterating
would be overkill...

Thanks for the review.

Regards,
Madan.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Oct 20 01:53:02 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.