[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: Gustavo Niemeyer <niemeyer_at_conectiva.com>
Date: 2002-09-03 19:29:52 CEST

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

:-)

> > dav_svn_convert_err() in a non-fatal way?
>
> 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. But in the
future, I'd like to see a different scheme which allowed messages to
be sent to the client even when no errors happened at all, allowing
hooks to print messages like "Hey, warn here! You've just committed
something strange, but I'll go on nevertheless.". I don't know
subversion internals well enough to tell which would be the right
way to pass such hook output to the client.

> I *think* that might work, but I haven't tried it. Care to give it a
> go?

Unfortunately, I must finish some stuff here and don't have time to work
on it right now. :-( OTOH, I really appreciate the work you're doing in
subversion, and would be a pleasure to contribute with this or other
issues once I have time.

> Even without such an enhancement, I think your patch is an improvement.

Thank you!

We're using it here in a repository system I'm working on. I wouldn't be
able to use the beautiful access control offered by the hook scheme if
the committing user didn't know what was going on.

-- 
Gustavo Niemeyer
[ 2AAC 7928 0FBF 0299 5EB5  60E2 2253 B29A 6664 3A0C ]
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Sep 3 19:30:58 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.