Using post commit hook to export in VisualSVN Server
Solution 1
Do the following in the VisualSVN Server Manager MMC console:
Select your repository
Right click Properties
Select the Hooks tab
Select the post-commit hook
-
Click the Edit button. Enter a line like this into the textbox:
"%VISUALSVN_SERVER%bin\svn.exe" export https://svn.yourserver.com:4433/svn/YourRepository/Websites/YourWebsite/ C:\inetpub\wwwroot\YourWebsite --quiet --non-interactive --force --username <youruser> --password <yourpassword>
Click Ok.
Solution 2
If you install the svn command-line client you can write a simple post-commit hook script like this:
path\to\svn.exe export file:///%1/trunk path\to\where\you\want\to\export\to
I'm not sure whether the VisualSVN Server commit hook dialog creates a .bat
/ .cmd
file or just expects to run the command. If the first, the line above would be enough. If the latter, first create a .bat
file with the above line in it, then put in the dialog:
cmd.exe /C path\to\your\batfile
![Admin](/assets/logo_square_200-5d0d61d6853298bd2a4fe063103715b4daf2819fc21225efa21dfb93e61952ea.png)
Admin
Updated on June 11, 2022Comments
-
Admin about 2 years
What is the easiest way to use post-commit hook with VisualSVN Server to export from the repository to a directory for staging / testing after a developer commits his changes?