PhilJollans / AnkhSVN2019

Fork of AnkhSVN for Visual Studio 2019
Apache License 2.0
55 stars 13 forks source link

Client-Side Hook Scripts are not executed #17

Open SirViver opened 4 years ago

SirViver commented 4 years ago

It appears the "Enable Client-Side Hooks" option does not work with this VS2019-compatible version of AnkhSVN, but I remember it working correctly with the original. For example any pre-commit hooks that should theoretically abort the commit are completely ignored when committing via AnkhSVN, whereas they trigger fine when using TortoiseSVN to commit the same file.

SirViver commented 4 years ago

Actually I found out what the problem is: SharpSVN is compiled against SVN 1.9 whereas my TortoiseSVN installation is for SVN 1.13. SharpSVN does an internal check against the version and if it doesn't match it just doesn't load the hooks at all, even though it doesn't seem to care about the version discrepancy for other operations.

A workaround that I tested locally would be to temporarily change the HKEY_CURRENT_USER\Software\TortoiseSVN\CurrentVersion registry entry to "1.9.0.0" while executing the SvnClient.Commit(...) command.