Using post commit hook to export in VisualSVN Server
Asked Answered
S

4

7

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?

Shadchan answered 23/12, 2008 at 18:57 Comment(0)
M
5

Do the following in the VisualSVN Server Manager MMC console:

  1. Select your repository

  2. Right click Properties

  3. Select the Hooks tab

  4. Select the post-commit hook

  5. 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>
    
  6. Click Ok.

Merat answered 20/1, 2011 at 20:17 Comment(0)
S
2
  1. Find your SVN server installation directory (I have C:\Program Files\VisualSVN Server\bin).

  2. Drop an executable or batch file that does whatever you want in there, and set the post-commit hook to something like this:

    postcommit.exe "%1" "%2"

Sander answered 12/2, 2009 at 10:45 Comment(0)
G
1

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
Gooseberry answered 25/12, 2008 at 20:25 Comment(0)
S
0

Will do the reading on Cruise Control integration with Subversion - first I've heard of it, though I do hate to throw yet another variable into the mix.

Looked at the VisualSVN link before posting the question, but it doesn't explain how to do anything with VisualSVNServerHooks.exe other than email notification. Can't help but wonder if that is the only feature VisualSVNServerHooks.exe supports, since I could not locate documentation of any other functionality with it on their site, docs, google groups, google search, etc.

Thanks for posting.

Shadchan answered 23/12, 2008 at 19:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.