reviewboard:使用basedir配置错误上传差异的审核后错误

时间:2012-10-09 14:13:57

标签: upload diff review-board

我在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"

=============================================== =============================

我按照以下方式运行审核后但未能上传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.

=============================================== ==============================

和启用调试信息的输出错误消息

====================== err msg ======================= ========================

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.

=============================================== ===========================

在上面的错误消息中,我们发现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值更正为正确的完整路径。

有没有人有任何类似的经验来解决这个问题,我们非常感谢您的建议。

1 个答案:

答案 0 :(得分:0)

我相信您的问题可能是SVN存储库路径之间的相关性:
http://svn.d.xiaonei.com/wap/renren/renren-wap-talk/trunk
和diff文件中的相对路径(在文件夹层次结构中生成它的级别):
Index: Doxyfile

除非文件Doxyfile直接位于主干中,否则你应该尝试在这样的级别重新创建diff,以便diff包含trunk和Doxyfile之间缺少的相对路径:
Index: /missing/path/to/Doxyfile
..或更新Reviewboard中的SVN URL,以便URL包含缺少的路径。

您可以在answer帖子中找到有关此相关性的详细说明:review board diff not uploading

HTH!