我在 Ubuntu 中工作,我想使用 post-review 为带有手动生成的 .diff 文件的审查板创建一个新的审查请求,但失败了。
我今天大部分时间都在进行后期审查,但发现自己陷入了这个 postbasedir 问题。我请我的三位同事坐在我的座位上解决这个问题,但他们也发现自己没有有效的解决方案。
这是问题所在:
我在 .reviewboardrc 文件中设置了 repoistory 和 reviewboard_url ,我确定这两个设置都可以,因为请求已在审阅板中成功创建,并且存储库指向目标文件所在的目录。
这是 .reviewboardrc 的内容:
============================== .reviewboardrc =================== =============
REVIEWBOARD_URL = "http://10.22.200.166:8088"
REPOSITORY = "http://svn.d.xiaonei.com/wap/renren/renren-wap-talk/trunk"
==================================================== ===========================
我按如下方式运行 post-review 但上传 Doxyfile.diff 文件失败,这是它的内容:
=============================== Doxyfile.diff ================= ================
Index: Doxyfile
===================================================================
--- Doxyfile (revision 107236)
+++ Doxyfile (working copy)
@@ -1,3 +1,5 @@
+#POST_REVIEW_TEST
+POST_REVIEW_TEST =
# Doxyfile 1.7.6
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project.
==================================================== ============================
以及启用调试信息的输出错误消息
====================== 错误消息========================== ======================
houchenxi@houchenxi-PC:~/renren-wap-talk$ post-review -dp --diff-filename=Doxyfile.diff
>>> RBTools 0.4.2
>>> Python 2.7.2+ (default, Oct 4 2011, 20:06:09)
[GCC 4.6.1]
>>> Running on Linux-3.0.0-22-generic-x86_64-with-Ubuntu-11.10-oneiric
>>> Home = /home/houchenxi
>>> Current Directory = /home/houchenxi/renren-wap-talk
>>> 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:Running: git rev-parse --git-dir
DEBUG:root:Command exited with rc 128: ['git', 'rev-parse', '--git-dir']
fatal: Not a git repository (or any parent up to mount parent )
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
---
DEBUG:root:Checking for a Mercurial repository...
DEBUG:root:Running: hg showconfig
DEBUG:root:Running: hg root
DEBUG:root:Command exited with rc 255: ['hg', 'root']
abort: no repository found in '/home/houchenxi/renren-wap-talk' (.hg not found)!
---
DEBUG:root:Checking for a Perforce repository...
DEBUG:root:Checking for a Plastic repository...
DEBUG:root:Checking for a Subversion repository...
DEBUG:root:Running: svn info http://svn.d.xiaonei.com/wap/renren/renren-wap-talk/trunk
DEBUG:root:Running: diff --version
DEBUG:root:repository info: Path: http://svn.d.xiaonei.com/wap, Base path: /renren/renren-wap-talk/trunk, Supports changesets: False
>>> Finished checking the repository type.
>>> HTTP GETting api/
>>> HTTP GETting http://ourhost:8088/api/info/
>>> Using the new web API
>>> HTTP GETting http://ourhost:8088/api/repositories/
>>> Attempting to create review request on http://svn.d.xiaonei.com/wap/renren/renren-wap-talk/trunk for None
>>> HTTP POSTing to http://ourhost:8088/api/review-requests/: {'repository': 'http://svn.d.xiaonei.com/wap/renren/renren-wap-talk/trunk'}
>>> Review request created
>>> Uploading diff, size: 335
>>> HTTP POSTing to http://ourhost:8088/api/review-requests/130/diffs/: {'basedir': '/renren/renren-wap-talk/trunk'}
>>> Got API Error 207 (HTTP code 400): The file was not found in the repository
>>> Error data: {u'stat': u'fail', u'file': u'/renren/renren-wap-talk/trunk/Doxyfile', u'err': {u'msg': u'The file was not found in the repository', u'code': 207}, u'revision': u'107236'}
Error uploading diff
Your review request still exists, but the diff is not attached.
==================================================== =========================
在上面的err msg中我们发现basedir参数{'basedir': '/renren/renren-wap-talk/trunk'}不正确,应该是“http”的完整路径,即“http:// /svn.d.xiaonei.com/wap/renren/renren-wap-talk/trunk" ,但是无论我们如何尝试修改 .reviewboardrc 或添加命令行参数,我们都无法将此值更正为预期的正确值,我们通过运行“post-review --help”在帮助信息中进行了搜索,但没有可用的“--basedir”选项。
我所要做的就是通过修改 .reviewboardrc 或更改 post-review 参数将 basedir 值更正为正确的完整路径。
有没有人有解决这个问题的类似经验,非常感谢您的建议。