(Reviewboard 1.7 RBTools 0.6)如何回顾一系列提交

时间:2014-04-29 09:02:53

标签: git review-board

环境:Git存储库,Reviewboard 1.7,RBTools 0.6

我有一堆已经推送过的提交,我想针对特定范围的这些提交发布评论,我已经使用以下版本的评论板完成了此操作,使用以下语法:

post-review -o --guess-summary --guess-description --tracking-branch=Dev --revision-range=$firstCommit:$lastCommit

新版本"后期审核"不再支持脚本,新语法应该是:

rbt post -d -o -g --branch Dev $firstCommit..$lastCommit

(我也试过这个选项:$ firstCommit:$ lastCommit) 这个语法适用于单个提交,但我有一个范围:

ERROR: Error uploading diff
The file was not found in the repository (HTTP 400, API Error 207)
Your review request still exists, but the diff is not attached.

我的目标是审核请求,包含从$ firstCommit到$ lastCommit的所有差异 有什么建议吗?


更新

这是命令的调试输出:

>>> RBTools 0.6
>>> Python 2.7.5 (default, Aug 25 2013, 00:04:04) 
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)]
>>> Running on Darwin-13.1.0-x86_64-i386-64bit
>>> Home = /Users/
>>> Current directory = /Users/xxxx/Projects/xxxx
>>> Checking for a Subversion repository...
>>> Running: svn info --non-interactive
>>> Command exited with rc 1: ['svn', 'info', '--non-interactive']
svn: E155007: '/Users/xxxx/Projects/xxxx' is not a working copy
---
>>> Checking for a Git repository...
>>> Running: git rev-parse --git-dir
>>> Running: git config core.bare
>>> Running: git rev-parse --show-toplevel
>>> Running: git symbolic-ref -q HEAD
>>> Running: git config --get branch.master.merge
>>> Running: git config --get branch.master.remote
>>> Running: git config --get remote.xxxx.url
>>> Command exited with rc 1: ['git', 'config', '--get', 'remote.xxxx.url']
---
>>> Running: git config --get remote.xxxx.url
>>> Command exited with rc 1: ['git', 'config', '--get', 'remote.xxxx.url']
---
>>> repository info: Path: /Users/xxxx/Projects/xxxx/.git, Base path: , Supports changesets: False
>>> Making HTTP GET request to  http://reviews.xxxx.com/api/
>>> Making HTTP GET request to http://reviews.xxxx.com/api/info/
>>> Running: git rev-parse dfba187de58bee47677d734a5044e47004c4daea..771ada8a43f1cb1d1f75b16925fc332e8ea8d365
>>> Running: git branch -r --contains dfba187de58bee47677d734a5044e47004c4daea
>>> Running: git diff --no-color --full-index --ignore-submodules --no-renames dfba187de58bee47677d734a5044e47004c4daea..771ada8a43f1cb1d1f75b16925fc332e8ea8d365 -M
>>> Running: git log --reverse --pretty=format:%s%n%n%b ^dfba187de58bee47677d734a5044e47004c4daea 771ada8a43f1cb1d1f75b16925fc332e8ea8d365
>>> Making HTTP GET request to http://reviews.xxxx.com/api/review-requests/
>>> Making HTTP POST request to http://reviews.xxxx.com/api/review-requests/
>>> Making HTTP GET request to http://reviews.xxxx.com/api/review-requests/3373/diffs/
>>> Making HTTP POST request to http://reviews.xxxx.com/api/review-requests/3373/diffs/
>>> Got API Error 207 (HTTP code 400): The file was not found in the repository
>>> Error data: {u'stat': u'fail', u'file': u'xxxx/en.lproj/InfoPlist.strings', u'err': {u'msg': u'The file was not found in the repository', u'code': 207}, u'revision': u''}
Traceback (most recent call last):
  File "/usr/local/bin/rbt", line 8, in <module>
    load_entry_point('RBTools==0.6', 'console_scripts', 'rbt')()
  File "/Library/Python/2.7/site-packages/RBTools-0.6-py2.7.egg/rbtools/commands/main.py", line 134, in main
    command.run_from_argv([RB_MAIN, command_name] + args)
  File "/Library/Python/2.7/site-packages/RBTools-0.6-py2.7.egg/rbtools/commands/__init__.py", line 422, in run_from_argv
    exit_code = self.main(*args) or 0
  File "/Library/Python/2.7/site-packages/RBTools-0.6-py2.7.egg/rbtools/commands/post.py", line 769, in main
    submit_as=self.options.submit_as)
  File "/Library/Python/2.7/site-packages/RBTools-0.6-py2.7.egg/rbtools/commands/post.py", line 545, in post_request
    raise CommandError('\n'.join(error_msg))
rbtools.commands.CommandError: Error uploading diff


The file was not found in the repository (HTTP 400, API Error 207)

Your review request still exists, but the diff is not attached.

1 个答案:

答案 0 :(得分:1)

如果要在SVN服务器上发布到与猜测或指定不同的存储库名称,则会发生这种情况。我也告诉过这也可能会在GIT中重命名。

例如

之类的东西

rbt post -g yes --server https://review.site.net -o --repository mine

如果回购真的是

将失败

rbt post -g yes --server https://review.site.net -o --repository newmine

SVN中的

看起来你不是在使用SVN,而是使用修订版的delta,但要仔细检查任何看起来相同的重命名。对于在使用SVN等上游/远程服务器并使用git-svn时遇到同样错误的人,我也给出了这个答案。