Question

I am trying to configure the built-in post-commit hook for VisualSVN Server. I configured the post-commit script directly through VisualSVN Server Manager and it is as follows:

"%VISUALSVN_SERVER%\bin\VisualSVNServerHooks.exe" ^
    commit-notification "%1" -r %2 ^
    --from aaron@posscribble.com --to aaron@posscribble.com ^
    --smtp-server mail.posscribble.com

The post-commit fails with the following error message:

Post-Commit Error

Can someone help me understand why VisualSVN is referencing the C:\Development\Source\format path? I have also tried replacing the environment variable (i.e. %VISUALSVN_SERVER%) with the direct path to the directory where VisualSVNServerHooks.exe is located to no avail. What am I doing wrong here?

Was it helpful?

Solution

After scouring web forums someone recommended taking the parenthesis off the first argument even though the path to the repository has parenthesis in it so that it is just %1 and that solved the problem. The working VisualSVN post-commit script is below:

"%VISUALSVN_SERVER%\bin\VisualSVNServerHooks.exe" ^
    commit-notification %1 -r %2 ^
    --from aaron@posscribble.com --to aaron@posscribble.com ^
    --smtp-server mail.posscribble.com

OTHER TIPS

The issue is quite irrelevant to the post-commit hook script. The error states that the repository lacks "format" file. It's expected that this file exists and contains the format number of this filesystem. So does the file exist?

If the file is missing, you can't do anything with the repository: you can't access the repository with Subversion client, can't run svnadmin commands and it's expected that the hook scripts fail (at least on latest SVN / VisualSVN Server versions).

The easiest way to solve the issue would be to take format file from another repository and copy it to "C:\Development\Source\". However you must ensure that the copied file has correct format number for the Source repository.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top