subversion pre-commit hook that requires user type 'y/n' in console?
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开发者_Go百科 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
No. The hook is executed at server (repo) side, and not on the user's machine.
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.
精彩评论