2
votes

I have a pre-commit hook working that checks that the message was not empty and requires at least x number of characters. We are using JIRA for tracking issues and are 'tagging' our issues in the commit message log. However, not every commit relates to a JIRA issue.

So, I was thinking that it could check if the message contained our JIRA keyword, if not then ask the user if they still want to commit, if they type 'y' then commit if they type 'n' then do not commit.

Is it possible to get user input/keyboard feedback in this way?

NOTE: I am using Windows and TortoiseSVN

2

2 Answers

5
votes

No. The hook is executed at server (repo) side, and not on the user's machine.

2
votes

Client side pre-commit hooks are possible in Tortoisesvn.

see: http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-settings.html#tsvn-dug-settings-hooks

Though I'm not sure about 'yes'/'no' interaction. I think it should be possible.