2

I'm using ReviewBoard and rbt post to post a review request. I issue the following command:

rbt post --debug -o 4a6c23e933f753ddb855a8f2a16ae5a0c9bb8ebe..2d785c5d7b34317e679b20ac112ac7f69074df66

And see the following output:

DEBUG:root:Checking for a Subversion repository...
DEBUG:root:Running: svn info --non-interactive
DEBUG:root:Command exited with rc 1: ['svn', 'info', '--non-interactive']
svn: '.' is not a working copy
---
DEBUG:root:Checking for a Git repository...
DEBUG:root:Running: git rev-parse --git-dir
DEBUG:root:Running: git config core.bare
DEBUG:root:Running: git rev-parse --show-toplevel
DEBUG:root:Running: git symbolic-ref -q HEAD
DEBUG:root:Running: git config --get git-p4.port
DEBUG:root:Command exited with rc 1: ['git', 'config', '--get', 'git-p4.port']
---
DEBUG:root:Running: git config --get branch.mybranch.merge
DEBUG:root:Running: git config --get branch.mybranch.remote
DEBUG:root:Running: git config --get remote.origin.url
DEBUG:root:repository info: Path: mort-cake, Base path: , Supports changesets: False
DEBUG:root:Making HTTP GET request to https://XXXXXXXXXXXXXXXXXXXXXXXXXXXX/api/
DEBUG:root:Making HTTP GET request to https://XXXXXXXXXXXXXXXXXXXXXXXXXXXX/api/info/
DEBUG:root:Running: git rev-parse refs/heads/mybranch
DEBUG:root:Running: git merge-base 2d785c5d7b34317e679b20ac112ac7f69074df66 origin/mybranch
DEBUG:root:Running: git rev-parse 2d785c5d7b34317e679b20ac112ac7f69074df66
DEBUG:root:Running: git status --porcelain --untracked-files=no
DEBUG:root:Running: git diff --no-color --full-index --no-ext-diff --ignore-submodules --no-renames 2d785c5d7b34317e679b20ac112ac7f69074df66..2d785c5d7b34317e679b20ac112ac7f69074df66 -M
Traceback (most recent call last):
  File "/usr/local/bin/rbt", line 9, in <module>
    load_entry_point('RBTools==0.5.5', 'console_scripts', 'rbt')()
  File "/usr/local/lib/python2.7/dist-packages/RBTools-0.5.5-py2.7.egg/rbtools/commands/main.py", line 127, in main
    command.run_from_argv([RB_MAIN] + args)
  File "/usr/local/lib/python2.7/dist-packages/RBTools-0.5.5-py2.7.egg/rbtools/commands/__init__.py", line 158, in run_from_argv
    exit_code = self.main(*args) or 0
  File "/usr/local/lib/python2.7/dist-packages/RBTools-0.5.5-py2.7.egg/rbtools/commands/post.py", line 633, in main
    raise CommandError("There don't seem to be any diffs!")
rbtools.commands.CommandError: There don't seem to be any diffs!

Note the real error on the last line.

Now, see where it says:

DEBUG:root:Running: git diff --no-color --full-index --no-ext-diff --ignore-submodules --no-renames 2d785c5d7b34317e679b20ac112ac7f69074df66..2d785c5d7b34317e679b20ac112ac7f69074df66 -M

Well, sure, there are no diffs between a revision and itself. But why is ReviewBoard using those revisions anyway? Why isn't it using the ones I supplied?

Tyler Collier
  • 11,489
  • 9
  • 73
  • 80

1 Answers1

2

The only way I've found to get around this so far is to first checkout the commit of the end revision. E.g.

git checkout 2d785c5d7b34317e679b20ac112ac7f69074df66

This of course puts the repo in a detached HEAD state. But I can then run my command, it succeeds as I expect, and then I can do git checkout mybranch to get back to my normal workflow.

Tyler Collier
  • 11,489
  • 9
  • 73
  • 80
  • `co` is not a built-in git command, it looks like you've aliased `checkout` as `co`, –  Mar 24 '14 at 05:38
  • Correct. Thanks for noticing; I'll update it to `checkout` to be clear. – Tyler Collier Mar 24 '14 at 06:00
  • My buddy nick had the same problem as I did on his computer. My answer here did not fix the situation. However, I then ran a `rbt post` for him on my machine, without using my trick in this answer, and it worked. So I'm not sure what causes the problem. – Tyler Collier Mar 26 '14 at 22:13