我在Ubuntu中工作,我想使用事后审查为reviewboard创建一个新的审查请求,其中包含一个手动生成的.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"============================================================================
我运行后审查,如下所示,但上传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/http://svn.d.xiaonei.com/wap/renren/renren-wap-talk/trunk’}是不正确的,它应该是从"http“开始的完整路径,即"http://svn.d.xiaonei.com/wap/renren/renren-wap-talk/trunk”,但是无论我们如何尝试修改.reviewboardrc或添加命令行参数,我们都无法将这个值更正为预期的正确值,我们通过运行"post-review -- help“在帮助信息中搜索,但就是没有"--basedir”选项可用。
我所要做的就是通过修改.reviewboardrc或更改审核后的参数,将basedir值更正为正确的完整路径。
有没有人有类似的经验来解决这个问题,并建议高度赞赏。
发布于 2012-11-04 23:12:52
我认为您的问题可能是SVN存储库的路径之间的关联:
http://svn.d.xiaonei.com/wap/renren/renren-wap-talk/trunk
和diff文件中的相对路径(在文件夹层次结构中生成该文件的级别):
Index: Doxyfile
除非文件Doxyfile直接位于主干中,否则您应该尝试在这样的级别重新创建diff,以便diff将包含主干和Doxyfile之间缺少的相对路径:
Index: /missing/path/to/Doxyfile
..or更新Reviewboard中的SVN URL,以便该URL包含自身缺少的路径。
你会在这篇文章的answer中找到关于这种相关性的详细解释:review board diff not uploading
哈!
https://stackoverflow.com/questions/12802031
复制相似问题