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

Re: [PATCH] show hook errors on client side

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-09-06 02:49:08 CEST

Gustavo Niemeyer <niemeyer@conectiva.com> writes:

[returning post-commit hook error to the client]

> > > I must confess I'm not sure how to do that. Is it possible to use
> >
> > I'm hoping it's quite simple :)
>
> :-)

It's not :-(

> > Does dav_svn_convert_err get in the way? If we have the post-commit
> > hook failure generate a specific SVN_ERR_REPOS_POST_COMMIT_FAILURE
> > error, say in svn_repos_fs_commit_txn, will ra_dav pass this error
> > back to the client?
>
> Well, I think that the main intention behind issuing the error is to
> let the user know what's going on, so it'd be nice to pass it across
> mod_dav.
>
> > If it does, then when the SVN_ERR_REPOS_POST_COMMIT_FAILURE gets to
> > svn_client_commit it will be returned by svn_client__do_commit. At
> > this stage the client can call svn_handle_error and then continue.
>
> I think that the best way to do that would be to use a more general
> approach, not requiring errors to be passed around. For now, it's ok,
> since those messages are really bounded to a fatal error.

Well, a post-commit hook failure is not really fatal, the commit has
succeeded!

I tried passing SVN_ERR_REPOS_POST_COMMIT_FAILURE and the error
passing works. However, that doesn't really solve the problem, if the
client is going to carry out its post-commit proccessing it needs to
get the normal successful commit response, with the new revision
number, etc. Simply having the client recognize a post-commit hook
error, print it and continue, is not sufficient.

I wonder if post-commit hook errors should be logged by Apache rather
than sent back to the client? That's not a solution for ra_local.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Sep 6 02:50:01 2002

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.