BitShift
BitShift

Reputation: 123

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?

Upvotes: 0

Views: 938

Answers (1)

bahrep
bahrep

Reputation: 30662

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.

Upvotes: 1

Related Questions