我有一个 ReviewBoard v1.6.13网站设置,以便我可以使用它通过 Perforce 使用 post-review 来托管审查请求。
我已使用以下命令将 [RBTools v0.4.2] 中的postreview.py python 脚本编译为postreview.exe:
- Python v2.7.3
- Python Win32 扩展 pywin32-218.win32-py2.7.exe
- PyInstaller v2.0
- (还下载了 DiffUtils v2.8.7-1 来测试 postreview 工具)
但是,当我运行 postreview.exe(甚至直接运行 .py 脚本)时,我不断得到相同的 python 调用堆栈:
Traceback (most recent call last):
File "F:\RBTools-0.4.2\rbtools\postreview.py", line 1314, in <module>
main()
File "F:\RBTools-0.4.2\rbtools\postreview.py", line 1296, in main
submit_as=options.submit_as)
File "F:\RBTools-0.4.2\rbtools\postreview.py", line 862, in tempt_fate
review_request = server.new_review_request(changenum, submit_as)
File "F:\RBTools-0.4.2\rbtools\postreview.py", line 441, in new_review_request
return rsp['review_request']
KeyError: 'review_request'
我用于测试的论点(由于明显的原因略有改变):
--server=http://myreviewboardsite --disable-proxy --submit-as=jdoe --publish --target-groups=Test --branch=//mydepot/test/ 191205 --debug --username=guest --password=helloworld
--debug
这是使用参数 后的完整输出。
>>> RBTools 0.4.2
>>> Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)]
>>> Running on Windows-7-6.1.7600
>>> Home = C:\Users\misterwilson\AppData\Roaming
>>> Current Directory = F:\pyinstaller-2.0\postreview\dist
>>> Checking the repository type. Errors shown below are mostly harmless.
DEBUG:root:Checking for a CVS repository...
DEBUG:root:Checking for a ClearCase repository...
DEBUG:root:Checking for a Git repository...
DEBUG:root:Checking for a Mercurial repository...
DEBUG:root:Checking for a Perforce repository...
DEBUG:root:Running: p4 info
DEBUG:root:Running: diff --version
DEBUG:root:repository info: Path: p4-devserver:1666, Base path: None, Supports changesets: True
>>> Finished checking the repository type.
>>> Disabling HTTP(s) proxy support
>>> HTTP GETting api/
>>> HTTP GETting http://myreviewboardsite/api/info/
>>> Using the new web API
INFO:root:Generating diff for changenum 191205
DEBUG:root:Running: p4 describe -s 191205
DEBUG:root:Processing edit of //mydepot/test/HelloWorld.xml
DEBUG:root:Writing "//mydepot/test/HelloWorld.xml#12" to "c:\users\misterwilson\appdata\local\temp\tmp_knbys"
DEBUG:root:Running: p4 print -o c:\users\misterwilson\appdata\local\temp\tmp_knbys -q //mydepot/test/HelloWorld.xml#12
DEBUG:root:Running: diff -urNp c:\users\misterwilson\appdata\local\temp\tmp_knbys F:\P4\1666\mydepot\test\HelloWorld.xml
DEBUG:root:Command exited with rc 1: ['diff', '-urNp', 'c:\\users\\misterwilson\\appdata\\local\\temp\\tmp_knbys', 'F:\\P4\\1666\\mydepot\\test\\HelloWorld\\LauncherVirtuos.xml']
--- c:\users\misterwilson\appdata\local\temp\tmp_knbys 2012-11-03 11:27:03.854484100 -0400
+++ F:\P4\1666\mydepot\test\HelloWorld.xml 2012-10-25 18:47:36.736320400 -0400
@@ -295,7 +295,7 @@ ´╗┐<?xml version="1.0" encoding="utf-8"
goto REMOVEOUTPUT
</if>
</operation>
- <operation name="VerifyPerforceClient" visible="0">
+ <operation name="VerifyPerforceClient" visible="0">
p4 clients -u [PerforceUsername] -e "[PerforceClientSpec]" | find "[PerforceClientSpec]" > nul
if not errorlevel 1 (
goto ChkHost
@@ -344,18 +344,18 @@ ´╗┐<?xml version="1.0" encoding="utf-8"
:VERIFY_END
</operation>
... More Perforce Diff output
---
>>> Attempting to create review request on p4-devserver:1666 for 191205
>>> Submitting the review request as jdoe
>>> HTTP POSTing to http://myreviewboardsite/api/review-requests/: {'changenum': '191205', 'submit_as': 'jdoe', 'repository': 'p4-devserver:1666'}
>>> Review request created
Traceback (most recent call last):
File "F:\RBTools-0.4.2\rbtools\postreview.py", line 1314, in <module>
main()
File "F:\RBTools-0.4.2\rbtools\postreview.py", line 1296, in main
submit_as=options.submit_as)
File "F:\RBTools-0.4.2\rbtools\postreview.py", line 862, in tempt_fate
review_request = server.new_review_request(changenum, submit_as)
File "F:\RBTools-0.4.2\rbtools\postreview.py", line 441, in new_review_request
return rsp['review_request']
KeyError: 'review_request'
谁能帮我解决问题可能是什么?
谢谢,
W先生