Search code examples
svnvisualsvn-servervisualsvn

Pre-commit hook fails due to "E205000: Invalid revision number supplied"


Im trying to setup a pre-commit hook for email notification using VisualSVN. When I try to add a test file to the repository and commit it, I get an error that includes verbage such as "VisualSVNServerHooks: E205000: Invalid revision number supplied..."

Im using the basic email notification setup referenced from here https://www.visualsvn.com/support/topic/00018/

What Im using (settings changed)

"%VISUALSVN_SERVER%\bin\VisualSVNServerHooks.exe" ^
    commit-notification "%1" -r %2 ^
    --from "[email protected]" --to "[email protected] " ^
    --smtp-server mail.something.com

If I dummy up the command and replate %2 with 123, it works. Could the 2nd argument not be getting supplied to the command?


Solution

  • It has to be a post-commit hook, not pre-commit. Pre-commit hook runs before new revision is created in a repository, therefore it does not supply a revision number as %2 input parameter.