It may be handy to export the specific Subversion repository branch after a commit, using a post-commit hook.
E.g. to update a website after a commit or to update a development branch for testing.
Is there any instruction or sample of such a hook?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The best choice for writing a hook script for Subversion in Windows environment (e.g. VisualSVN Server) is to use Windows PowerShell scripting language or good ol’ Windows batch command-line.
Here is the sample code of post-commit.bat and post-commit.ps1 that should be used together to export a committed revision to
C:\Test. Put them into your repository ‘hooks’ folder, e.g.C:\Repositories\repository\hooks\post-commit.ps1
post-commit.bat