I'm writing a pre-committed hook, or better, I'm editing hook which is standard on Tigris SVN Comes release.
My goal is trivial, I just want to write an error message to the person who committed without giving a committed message.
So my idea is just stderr with a simple error message but for some reason, my messages never come.
Everyone on the Internet says that I must write stderr. But by no means does it work.
REPOS = "$ 1" TXN = "$ 2" LOG = "" # where it looks wrong #if [$ {# LOG} -lt 1] Not given, please try again. " 2 & gt; & Amp # 1 # FIE Resonance # Ensure that the log message includes some text SVNLOOK = / usr / bin / svnlook $ SVNLOOK log-T "$ TXN" "$ REPOS" | \ Grep "[a-zA-Z0-9]" & gt; LOG || Exit 1 # Exit All Errors Set-E # All checks have been passed, so allow the committed. Exit 0 You must forgive that this is a silly question, but I am a Linux novice, so I apologize in advance.
Thank you, Jasper
You have a wrong way to determine the log message. Try it instead:
SVNLOOK = / usr / bin / svnlook LOGMSG = '$ SVNLOOK log-t' Line $ TXNâ ???? One ???? $ REPOS | Grep â ???? [A-zA-Z0- 9] One ???? | Wc -c` if ["$ LOGMSG" -lt 1]; Then echo-e â ???? Please make a meaningful comment while making the changes. 1 & gt; And 2 exits 1 fi
Comments
Post a Comment