You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by wuzhouhui <wu...@mails.ucas.ac.cn> on 2019/02/25 09:11:25 UTC
working copy hook
Could Subversion support working copy hook? Because I want to ensure
new commit won't introduce any building error, e.g. always running
"make html" before "svn commit".
Thanks.
Re: working copy hook
Posted by Andreas Stieger <An...@gmx.de>.
Hi,
> Could Subversion support working copy hook? Because I want to ensure
> new commit won't introduce any building error, e.g. always running
> "make html" before "svn commit".
This is not implemented in plain svn (and has serious security issues)
However some IDEs and UI integrations have this. e.g. https://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-settings.html#tsvn-dug-settings-hooks
Andreas
Re: working copy hook
Posted by Stefan Sperling <st...@elego.de>.
On Mon, Feb 25, 2019 at 05:11:25PM +0800, wuzhouhui wrote:
> Could Subversion support working copy hook? Because I want to ensure
> new commit won't introduce any building error, e.g. always running
> "make html" before "svn commit".
>
> Thanks.
There are only server-side hooks.
But you can use branches to solve this problem.
You could commit to a "staging" branch, and have a post-commit hook on the
server which runs a build test on commits to this branch, and then performs
an automatic merge to a "production" branch if the build was successful.
If the build fails, such a server-side hook could avoid merging changes to
the "production" branch until the "staging" branch has been fixed in a
future commit.