错误类型一:
svn: E165001: 提交失败(细节如下):
svn: E165001: 提交 被 pre-commit 钩子阻塞(退出代码 255) 没有输出。
解决方法:为svn仓库中$REPO/hooks/pre-commit配置权限 chmod a+x pre-commit
错误类型二:
svn: E165001: 提交 被 pre-commit 钩子阻塞(退出代码 1) 输出:
Traceback (most recent call last):
File "/usr/bin/strict_review", line 9, in <module>
load_entry_point('reviewboard-svn-hooks==0.2.1-r20', 'console_scripts', 'strict_review')()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 378, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2566, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2260, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/lib/python2.7/site-packages/reviewboard_svn_hooks-0.2.1_r20-py2.7.egg/reviewboardsvnhooks/strict_review.py", line 72, in <module>
ignore_path = conf.get('rule', 'ignore_path')
File "/usr/lib64/python2.7/ConfigParser.py", line 618, in get
raise NoOptionError(option, section)
ConfigParser.NoOptionError: No option 'ignore_path' in section: 'rule'
解决方法:修改/etc/reviewboard-svn-hooks/conf.ini文件,增加ignore= 字段。
附pre-commit文件内容:
#!/bin/sh
REPOS="$1"
TXN="$2"
strict_review $REPOS $TXN
exit $?
附/etc/reviewboard-svn-hooks/conf.ini内容
[common]
debug = 0
[reviewboard]
url= http://192.168.100.218/reviewboard/
username= admin
password= *
[rule]
min_ship_it_count= 2
min_expert_ship_it_count= 0
experts= *
review_path=
ignore_path=