概括:
当我这样做时,post-review
我会在 上创建新评论reviewboard
,但是我没有diff
从我的CVS
项目中获得它。
A post-review
to a new request 使用调试选项显示命令行的差异。显示差异后,审核后脚本尝试将差异上传到服务器(它甚至显示差异有大小),在尝试上传后显示差异文件为空的消息。
在服务器端,日志抱怨 CVS 文件的绝对路径存在差异。
做其他阅读,绝对路径问题可以通过删除 cvs 根路径并使用相对路径而不是绝对路径来解决。在我项目的 CVS 目录中,该Repository
文件显示为相对路径。我相信需要更新的价值存在于某个地方的审查委员会服务器上。根据我的阅读,这听起来像是一个配置问题,但是我不确定我需要更新什么。
设置细节:
评论板服务器:
美分操作系统 6.0 审查委员会 1.7.11
客户:
Windows 7的 Python 2.7.3 RBTools 0.5.1 安装工具 0.7.7
更多细节:
我Reviewboard
过去曾在不同的服务器上使用 perforce 来帮助进行代码审查。我正在另一家公司从事一个新项目,该项目CVS
用作其源代码控制。
我将 Reviewboard 设置在与我们的 CVS 服务器不同的盒子上。Reviewboard
已设置并通过 连接到我的存储库pserver
。存储库从 Reviewboard 管理控制台正确连接。
为了让 post-review 连接到服务器,我.reviewboardrc
在项目目录中创建了一个文件,我试图从中发布评论。它看起来类似于:
REPOSITORY = "cvsroot"
REVIEWBOARD_URL = "http://10.100.10.231"
USERNAME = "user"
PASSWORD = "password"
当我运行时,差异看起来可以正常工作:post-review --output-diff
我得到:
C:\path>post-review --output-diff
cvs diff: ignoring __history (CVS/Entries missing)
cvs diff: Diffing .
Index: blob.cpp
===================================================================
RCS file: /home/cvsroot/path/on/server/blob.cpp,v
retrieving revision 1.3
diff -u -r1.3 blob.cpp
--- blob.cpp 28 Jun 2013 23:28:55 -0000 1.3
+++ blob.cpp 1 Jul 2013 19:56:57 -0000
@@ -31,7 +31,12 @@
__fastcall TformBlob::TformBlob(TComponent* Owner)
: TForm(Owner)
{
+<<<<<<< blob.cpp
+ // This is a test to see if I can get it into source control with review
board.
+ // test 2 after clean check in.
+=======
// jao: This is a test to see if I can get it into source control with r
eview board.
+>>>>>>> 1.3
}
//---------------------------------------------------------------------------
void __fastcall TformBlob::btnSelectFileClick(TObject *Sender)
cvs diff: Diffing Debug
cvs diff: Diffing Reports
C:\path>
当我执行 apost-review -r 1 -d
时,它会通过 diff 过程,但似乎在将 diff 上传到服务器时出现问题。以下包含错误消息:
cvs diff: Diffing Debug
cvs diff: Diffing Reports
---
>>> HTTP GETting api/
>>> HTTP GETting http://10.100.10.231/api/info/
>>> Using the new web API
>>> HTTP GETting http://10.100.10.231/api/review-requests/1/
>>> Uploading diff, size: 883
>>> HTTP POSTing to http://10.100.10.231/api/review-requests/1/diffs/: {}
>>> Got API Error 105 (HTTP code 400): One or more fields had errors
>>> Error data: {u'fields': {u'path': [u"cvs [checkout aborted]: Absolute module
reference invalid: `/home/cvsroot/path/on/server/blob.cpp'\n"
]}, u'stat': u'fail', u'err': {u'msg': u'One or more fields had errors', u'code'
: 105}}
Error uploading diff
Your review request still exists, but the diff is not attached.
最终结果是在审查板上创建了审查请求,但是请求中没有详细/差异信息。
我从评论板管理控制台打开了日志记录,当我发帖时,我得到:
None - user - /api/review-requests/1/diffs/ - Error uploading new diff: cvs [checkout aborted]: Absolute module reference invalid: `/home/cvsroot/path/on/server/blob.cpp'
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/ReviewBoard-1.7.11-py2.6.egg/reviewboard/webapi/resources.py", line 2040, in create
request.FILES.get('parent_diff_path'))
File "/usr/lib/python2.6/site-packages/ReviewBoard-1.7.11-py2.6.egg/reviewboard/reviews/forms.py", line 308, in create
history)
File "/usr/lib/python2.6/site-packages/ReviewBoard-1.7.11-py2.6.egg/reviewboard/diffviewer/forms.py", line 88, in create
diff_file, basedir, check_existance=(not parent_diff_file)))
File "/usr/lib/python2.6/site-packages/ReviewBoard-1.7.11-py2.6.egg/reviewboard/diffviewer/forms.py", line 189, in _process_files
self.request))):
File "/usr/lib/python2.6/site-packages/ReviewBoard-1.7.11-py2.6.egg/reviewboard/scmtools/models.py", line 187, in get_file_exists
exists = self._get_file_exists_uncached(path, revision, request)
File "/usr/lib/python2.6/site-packages/ReviewBoard-1.7.11-py2.6.egg/reviewboard/scmtools/models.py", line 290, in _get_file_exists_uncached
exists = self.get_scmtool().file_exists(path, revision)
File "/usr/lib/python2.6/site-packages/ReviewBoard-1.7.11-py2.6.egg/reviewboard/scmtools/core.py", line 81, in file_exists
self.get_file(path, revision)
File "/usr/lib/python2.6/site-packages/ReviewBoard-1.7.11-py2.6.egg/reviewboard/scmtools/cvs.py", line 54, in get_file
return self.client.cat_file(path, revision)
File "/usr/lib/python2.6/site-packages/ReviewBoard-1.7.11-py2.6.egg/reviewboard/scmtools/cvs.py", line 271, in cat_file
return self._cat_specific_file(filename, revision)
File "/usr/lib/python2.6/site-packages/ReviewBoard-1.7.11-py2.6.egg/reviewboard/scmtools/cvs.py", line 322, in _cat_specific_file
raise SCMError(errmsg)
SCMError: cvs [checkout aborted]: Absolute module reference invalid: `/home/cvsroot/path/on/server/blob.cpp'
除了客户端的存储库文件之外,这还引用了 Absolute 模块引用,还有其他地方我应该寻找吗?文件的路径看起来合法。
我尝试过的故障排除步骤:
- 我已确保服务器上的评论板正在运行最新版本。
- 我已确保客户邮政编码是最新的。例如
easy_install -U RBTools
- 谷歌搜索有关“绝对模块引用无效”的错误,找到http://devnet.jetbrains.com/thread/158342的引用并验证我客户端上的存储库文件仅显示相对路径。
我会错过什么?