1. 程式人生 > >SVN提交報錯"Commit blocked by pre-commit hook"的解決辦法

SVN提交報錯"Commit blocked by pre-commit hook"的解決辦法

參考:

【問題】

Linux命令列下用 svn commit -m "XXX" 的方式提交程式碼改動,失敗。錯誤提示如下:

Transmitting file data .svn: Commit failed (details follow):
svn: Commit blocked by pre-commit hook (exit code 1) with output:
False [] range "\w-" in regex; marked by <-- HERE in m/^(?:[\w- <-- HERE _]+\/){0-1}branches\// at /local/svn/minsvn/current/lib/SVN/Property.pm line 246.


【可能的原因】

【解決】

在提交的命令列的Comment中多加些字元,再提交。比如,將

svn commit -m "XXX"

改成

svn commit -m "Add some code for Case 1"

然後再提交。就成功了。