[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-03 01:18:26 CEST

Gustavo Niemeyer <niemeyer@conectiva.com> writes:

> > > + SVN_ERR (run_hook_cmd ("post-commit", hook, args, FALSE, pool));
> >
> > Why did you choose to ignore post-commit errors? I suppose it's so
> > that the client carries out the post-commit processing and doesn't
> > abort. I think it would be better to define a specific error for this
>
> Indeed. It wasn't checking errors before, so I've just used the same
> principles.
>
> > case, return that instead of SVN_ERR_REPOS_HOOK_FAILURE, and get the
> > client to detect it, print the error message (svn_handle_error with
> > FATAL set FALSE probably) and continue.
>
> 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?

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 might work, but I haven't tried it. Care to give it a
go?

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

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Sep 3 01:19:04 2002

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