What version are you running?
RBTools 0.6.1; ReviewBoard 1.7.14 (but the latter shouldn't matter)
What's the URL of the page containing the problem?
No URL - rbt
What steps will reproduce the problem?
1. Post a review against a git repository. This works successfully using i.e. `rbt post --parent=master --tracking-branch=origin/master --branch=PUPPET-241 --server=http://reviews.ddtc.cmgdigital.com`
2. Make changes to the code locally, commit, push to origin
3. Attempt to update the review by appending `--update --diff-only` to the `rbt post` command line, ending up with: `rbt post --parent=master --tracking-branch=origin/master --branch=PUPPET-241 --server=http://reviews.ddtc.cmgdigital.com --update --diff-only --debug`
What is the expected output? What do you see instead?
The expected output is that the review is updated. Instead, I get an API error because the repository could not be found.
jantman@phoenix:pts/5:~/CMG/git/ops/puppet (PUPPET-241 %=)$ rbt post --parent=master --tracking-branch=origin/master --branch=PUPPET-241 --server=http://reviews.ddtc.cmgdigital.com --update --debug
>>> RBTools 0.6.3
>>> Python 2.7.8 (default, Sep 24 2014, 18:26:21)
[GCC 4.9.1 20140903 (prerelease)]
>>> Running on Linux-3.17.1-1-ARCH-x86_64-with-glibc2.2.5
>>> Home = /home/jantman
>>> Current directory = /home/jantman/CMG/git/ops/puppet
>>> Checking for a Subversion repository...
>>> Running: svn info --non-interactive
>>> Command exited with rc 1: ['svn', 'info', '--non-interactive']
svn: E155007: '/home/jantman/CMG/git/ops/puppet' 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.PUPPET-241.merge
>>> Running: git config --get branch.PUPPET-241.remote
>>> Running: git config --get remote.origin.url
>>> repository info: Path: ssh://vcs.ddtc.cmgdigital.com/git-repos/ops/puppet.git, Base path: , Supports changesets: False
>>> Making HTTP GET request to http://reviews.ddtc.cmgdigital.com/api/
>>> Making HTTP GET request to http://reviews.ddtc.cmgdigital.com/api/info/
>>> Running: git rev-parse refs/heads/PUPPET-241
>>> Running: git merge-base 99c3680f978d4d42f866c47fe3e54a2557e352ad origin/master
>>> Running: git rev-parse f0fb5182ce2a55de3d36712a3ed241024169e963
>>> Running: git rev-parse master
>>> Running: git status --porcelain --untracked-files=no
>>> Running: git diff --no-color --full-index --ignore-submodules f0fb5182ce2a55de3d36712a3ed241024169e963..99c3680f978d4d42f866c47fe3e54a2557e352ad -M --no-ext-diff
>>> Running: git diff --no-color --full-index --ignore-submodules f0fb5182ce2a55de3d36712a3ed241024169e963..f0fb5182ce2a55de3d36712a3ed241024169e963 -M --no-ext-diff
>>> Making HTTP GET request to http://reviews.ddtc.cmgdigital.com/api/session/
>>> Making HTTP GET request to http://reviews.ddtc.cmgdigital.com/api/users/jantman/
>>> Making HTTP GET request to http://reviews.ddtc.cmgdigital.com/api/repositories/
>>> Making HTTP GET request to http://reviews.ddtc.cmgdigital.com/api/repositories/?max-results=25&start=25
>>> Making HTTP GET request to http://reviews.ddtc.cmgdigital.com/api/repositories/?max-results=25&start=50
>>> Making HTTP GET request to http://reviews.ddtc.cmgdigital.com/api/repositories/?max-results=25&start=75
>>> Making HTTP GET request to http://reviews.ddtc.cmgdigital.com/api/repositories/?max-results=25&start=100
>>> Making HTTP GET request to http://reviews.ddtc.cmgdigital.com/api/repositories/?max-results=25&start=125
>>> Making HTTP GET request to http://reviews.ddtc.cmgdigital.com/api/review-requests/?status=pending&expand=draft&repository=None&from-user=jantman
>>> Got API Error 105 (HTTP code 400): One or more fields had errors
>>> Error data: {u'fields': {u'repository': [u"'None' is not an integer"]}, u'stat': u'fail', u'err': {u'msg': u'One or more fields had errors', u'code': 105}}
Traceback (most recent call last):
File "/usr/bin/rbt", line 9, in <module>
load_entry_point('RBTools==0.6.3', 'console_scripts', 'rbt')()
File "/usr/lib/python2.7/site-packages/rbtools/commands/main.py", line 134, in main
command.run_from_argv([RB_MAIN, command_name] + args)
File "/usr/lib/python2.7/site-packages/rbtools/commands/__init__.py", line 416, in run_from_argv
exit_code = self.main(*args) or 0
File "/usr/lib/python2.7/site-packages/rbtools/commands/post.py", line 769, in main
repository_info, api_root, api_client)
File "/usr/lib/python2.7/site-packages/rbtools/commands/post.py", line 411, in guess_existing_review_request_id
'%s: %s' % (user.username, e))
rbtools.commands.CommandError: Error getting review requests for user jantman: One or more fields had errors (HTTP 400, API Error 105)
repository: 'None' is not an integer
The interesting part here is that this ONLY happens when `--update` is used. If I simply remove "--update" from that command, it succeeds and posts a new review request:
jantman@phoenix:pts/5:~/CMG/git/ops/puppet (PUPPET-241 %=)$ rbt post --parent=master --tracking-branch=origin/master --branch=PUPPET-241 --server=http://reviews.ddtc.cmgdigital.com --debug
>>> RBTools 0.6.3
>>> Python 2.7.8 (default, Sep 24 2014, 18:26:21)
[GCC 4.9.1 20140903 (prerelease)]
>>> Running on Linux-3.17.1-1-ARCH-x86_64-with-glibc2.2.5
>>> Home = /home/jantman
>>> Current directory = /home/jantman/CMG/git/ops/puppet
>>> Checking for a Subversion repository...
>>> Running: svn info --non-interactive
>>> Command exited with rc 1: ['svn', 'info', '--non-interactive']
svn: E155007: '/home/jantman/CMG/git/ops/puppet' 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.PUPPET-241.merge
>>> Running: git config --get branch.PUPPET-241.remote
>>> Running: git config --get remote.origin.url
>>> repository info: Path: ssh://vcs.ddtc.cmgdigital.com/git-repos/ops/puppet.git, Base path: , Supports changesets: False
>>> Making HTTP GET request to http://reviews.ddtc.cmgdigital.com/api/
>>> Making HTTP GET request to http://reviews.ddtc.cmgdigital.com/api/info/
>>> Running: git rev-parse refs/heads/PUPPET-241
>>> Running: git merge-base 99c3680f978d4d42f866c47fe3e54a2557e352ad origin/master
>>> Running: git rev-parse f0fb5182ce2a55de3d36712a3ed241024169e963
>>> Running: git rev-parse master
>>> Running: git status --porcelain --untracked-files=no
>>> Running: git diff --no-color --full-index --ignore-submodules f0fb5182ce2a55de3d36712a3ed241024169e963..99c3680f978d4d42f866c47fe3e54a2557e352ad -M --no-ext-diff
>>> Running: git diff --no-color --full-index --ignore-submodules f0fb5182ce2a55de3d36712a3ed241024169e963..f0fb5182ce2a55de3d36712a3ed241024169e963 -M --no-ext-diff
>>> Running: git log --reverse --pretty=format:%s%n%n%b ^f0fb5182ce2a55de3d36712a3ed241024169e963 99c3680f978d4d42f866c47fe3e54a2557e352ad
>>> Making HTTP GET request to http://reviews.ddtc.cmgdigital.com/api/review-requests/
>>> Making HTTP POST request to http://reviews.ddtc.cmgdigital.com/api/review-requests/
>>> Making HTTP GET request to http://reviews.ddtc.cmgdigital.com/api/review-requests/12100/diffs/
>>> Making HTTP POST request to http://reviews.ddtc.cmgdigital.com/api/review-requests/12100/diffs/
>>> Making HTTP GET request to http://reviews.ddtc.cmgdigital.com/api/review-requests/12100/draft/
>>> Making HTTP PUT request to http://reviews.ddtc.cmgdigital.com/api/review-requests/12100/draft/
Review request #12100 posted.
http://reviews.ddtc.cmgdigital.com/r/12100/
http://reviews.ddtc.cmgdigital.com/r/12100/diff/
What operating system are you using? What browser?
Arch Linux 3.17.1 kernel; no browser, rbt issue.
Please provide any additional information below.
The repository called "puppet" is configured in RB (1.7.14) as follows:
Name: puppet
Hosting service: (None - Custom Repository)
Repository Type: git
Path: /git-repos/ops/puppet.git
Mirror path: ssh://vcs.ddtc.cmgdigital.com/git-repos/ops/puppet.git
I'm very confused about why this only happens when updating an existing review.