What version are you running?
0.7.10
What steps will reproduce the problem?
- clone repository: git svn clone ...
- git mv file file_moved
- git commit -m ""
- rbt post --summary 'Some summary' --description 'Some description'
What is the expected output? What do you see instead?
Review should be posted and file visible as moved
ERROR: Error validating diff
The specified diff file is empty. (HTTP 400, API Error 219)What operating system are you using?
Arch Linux
Attach the debug out from the command.
>>> Got API Error 219 (HTTP code 400): The specified diff file is empty. >>> Error data: {u'stat': u'fail', u'err': {u'msg': u'The specified diff file is empty.', u'code': 219}} Traceback (most recent call last): File "/usr/bin/rbt", line 11, in <module> load_entry_point('RBTools==0.7.10', 'console_scripts', 'rbt')() File "/usr/lib/python2.7/site-packages/rbtools/commands/main.py", line 133, in main command.run_from_argv([RB_MAIN, command_name] + args) File "/usr/lib/python2.7/site-packages/rbtools/commands/__init__.py", line 663, in run_from_argv exit_code = self.main(*args) or 0 File "/usr/lib/python2.7/site-packages/rbtools/commands/post.py", line 812, in main (msg_prefix, e)) rbtools.commands.CommandError: Error validating diff The specified diff file is empty. (HTTP 400, API Error 219)Please provide any additional information below.
rbt diff shows:
Index: file =================================================================== similarity index 100% rename from file rename to file_movedIf file contains some modifications, all are visible as changes in old name 'file'
Some more comments, IMHO in this situation diff should looks same as from pure svn, so in diff 'file' should be mareked as removed and file_moved as added.
I am having the same issue. This also highlights a discrepancy in the way the ReviewBoard displays diffs between
git
andsvn
. In puregit
, when a file is moved ReviewBoard (the UI) shows the file one time and marks it as moved. Insvn
, a moved file will either just show up once and not be marked as moved, or show up twice and be marked as removed/added. There is an svn-specific option (--svn-show-copies-as-adds
) for RBTools that controls this. When a file is moved and changed it will be even more confusing in ReviewBoard forsvn
. If--svn-show-copies-as-adds=y
is used, then two copies of the file are shown with no diff to show the change, so ReviewBoard is almost useless for analyzing what changed. If--svn-show-copies-as-adds=n
is used then two copies are still shown, but at least once of them shows the rename and diff - which is great. The other copy that shows the file as deleted serves no purpose since the file was already marked as moved.I think the way that ReviewBoard does it for
git
is more intuitive. Just show the file once and mark that it was moved (with diffs if applicable). ReviewBoard should behave in the same manner forgit
,svn
, andgit-svn
.It would be great if this could be fixed!