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

adilic*******@gmai***** (Google Code) (Is this you? Claim this profile.)
What version are you running?
RBTools 0.7.2

What's the URL of the page containing the problem?
n/a

What steps will reproduce the problem?
1. Create changes in existing file
2. Commit file to git.
3. Execute rbt post

What is the expected output? What do you see instead?
Expected output is a new review board review is created and a diff is uploaded of the existing file and the new modified file.

Bellow is the debug log of what I see:

$ rbt post -d
>>> RBTools 0.7.2
>>> Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)]
>>> Running on Windows-7-6.1.7601-SP1
>>> Home = C:\Users\Irnes\AppData\Roaming
>>> Current directory = c:\Users\Irnes\git\array_self_cert\common\tests
>>> Checking for a Subversion repository...
>>> Unable to execute "svn help": skipping SVN
>>> 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.Array_SelfCert_Revamp.merge
>>> Running: git config --get branch.Array_SelfCert_Revamp.remote
>>> Running: git config --get remote.origin.url
>>> repository info: Path: git@gitlab.spgear.lab.emc.com:self-cert/array_self_cert.git, Base path: , Supports changesets: False
>>> Making HTTP GET request to http://reviewboard.spgear.lab.emc.com/api/
>>> Running: git rev-parse refs/heads/Array_SelfCert_Revamp
>>> Running: git merge-base 481a6e7642acab3c788e7ec9f03fc2a2cd32a4a7 origin/Array_SelfCert_Revamp
>>> Running: git rev-parse 0ded2cbfa9668523df02e61ab1bb887233c825cb
>>> Running: git status --porcelain --untracked-files=no
>>> Running: git rev-parse --git-dir
>>> Running: git -c core.quotepath=false -c diff.noprefix=false diff --no-color --full-index --ignore-submodules -M --no-ext-diff 0ded2cbfa9668523df02e61ab1bb887233c825cb..481a6e7642acab3c788e7ec9f03fc2a2cd32a4a7
>>> Running: git log --reverse --pretty=format:%s%n%n%b ^0ded2cbfa9668523df02e61ab1bb887233c825cb 481a6e7642acab3c788e7ec9f03fc2a2cd32a4a7
>>> Making HTTP GET request to http://reviewboard.spgear.lab.emc.com/reviews/api/review-requests/?only-links=create&only-fields=
>>> Making HTTP POST request to http://reviewboard.spgear.lab.emc.com/reviews/api/review-requests/
>>> Making HTTP GET request to http://reviewboard.spgear.lab.emc.com/reviews/api/review-requests/11033/diffs/?only-fields=
>>> Making HTTP POST request to http://reviewboard.spgear.lab.emc.com/reviews/api/review-requests/11033/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'common/packaging/install.py', u'err': {u'msg': u'The file was not found in the repository.', u'code': 207}, u'revision': u'b781ddade8f04cf58c083586fe0a8358876ab4e2'}
Traceback (most recent call last):
  File "c:/Program Files/RBTools/bin/../Python27/Scripts/rbt-script.py", line 8, in <module>
    load_entry_point('RBTools==0.7.2', 'console_scripts', 'rbt')()
  File "c:\Program Files\RBTools\Python27\lib\site-packages\rbtools-0.7.2-py2.7.egg\rbtools\commands\main.py", line 133, in main
    command.run_from_argv([RB_MAIN, command_name] + args)
  File "c:\Program Files\RBTools\Python27\lib\site-packages\rbtools-0.7.2-py2.7.egg\rbtools\commands\__init__.py", line 555, in run_from_argv
    exit_code = self.main(*args) or 0
  File "c:\Program Files\RBTools\Python27\lib\site-packages\rbtools-0.7.2-py2.7.egg\rbtools\commands\post.py", line 745, in main
    base_dir=base_dir)
  File "c:\Program Files\RBTools\Python27\lib\site-packages\rbtools-0.7.2-py2.7.egg\rbtools\commands\post.py", line 458, in post_request
    raise CommandError(u'\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.

http://reviewboard.spgear.lab.emc.com/reviews/r/11033/



What operating system are you using? What browser?
Operating system: Windows 7
Browser: Chrome

Please provide any additional information below.
#1 jaimeenergysavvy

Was this ever resolved? I am running into the same issue today, albeit with mercurial.

chipx86
#2 chipx86

This is generally not a bug but rather an issue either with the state of the repository or with the state of the branches being posted. The general cause is a diff being generated that ends up referencing parent revisions that are only in the local repository. The circumstances are going to be very different between Git and Mercurial. I'd recommend reaching out on reviewboard@googlegroups.com instead.

#3 pasmon

I ran into this issue recently, and somehow got it working by downgrading Review Board (server side) from 3.0.5 to 3.0.3 via pip.

piyusg
#4 piyusg

For my case it was one where the gitlab repo was deleted and recreated,
Needed to change the "gitlab_project_id" in the scmtools repository configuration, it worked fine after that.