ある文字列が含まれていたらコミットを中断する hook
以下を参考に、Windowsのコマンドで使えるものを書いてみた。
http://mercurial.selenic.com/wiki/UsefulHooks
[hooks] pretxncommit.nocommit = hg export tip | findstr /R "^+.*NOCOMMIT" & if errorlevel 1 (exit /b 0) else (exit /b 1)
findstr が文字列が見つかった時に0を返すので、戻り値を反転してやる。