4162: rbt post does not follow tracking branches transitively

paulmillar

What version are you running?

paul@celebrimbor:~$ rbt -v
RBTools 0.6.3

What steps will reproduce the problem?

paul@celebrimbor:~/git/dCache (2.14)$ git checkout -b master upstream/master
Branch master set up to track remote branch master from upstream.
Switched to a new branch 'master'

paul@celebrimbor:~/git/dCache (master)$ git checkout --track -b development/new-feature master
Branch development/new-feature set up to track local branch master.
Switched to a new branch 'development/new-feature'
paul@celebrimbor:~/git/dCache (development/new-feature)$ 

[make changes to the checkout files]

paul@celebrimbor:~/git/dCache (development/new-feature)$ git commit -a
[development/new-feature 566d065] Test commit
 1 file changed, 1 deletion(-)

paul@celebrimbor:~/git/dCache (development/new-feature)$ rbt post -g -o
ERROR: Error creating review request: The repository path specified is not in the list of known repositories. (HTTP 400, API Error 206)

Just to confirm that the problem is the lack of transitive tracking, I can put the tracking in explicitly with the --tracking-branch option:

paul@celebrimbor:~/git/dCache (development/new-feature)$ rbt post -g -o --tracking-branch=upstream/master
Review request #9034 posted.

What is the expected output? What do you see instead?

I expect that rbt post succeeds without requiring the --tracking-branch.

For comparison, if branch development/new-feature is created directly from upstream/master branch (i.e., git checkout --track -b development/new-feature upstream/master) then rbt post command will succeed without the --tracking-branch option.

What operating system are you using?

paul@celebrimbor:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 8.3 (jessie)
Release:        8.3
Codename:       jessie
paul@celebrimbor:~$ 

Attach the debug out from the command.

paul@celebrimbor:~/git/dCache (development/new-feature)$ rbt post --debug -g -o
>>> RBTools 0.6.3
>>> Python 2.7.9 (default, Mar  1 2015, 12:57:24) 
[GCC 4.9.2]
>>> Running on Linux-3.16.0-4-amd64-x86_64-with-debian-8.3
>>> Home = /home/paul
>>> Current directory = /home/paul/git/dCache
>>> Checking for a Subversion repository...
>>> Running: svn info --non-interactive
>>> Command exited with rc 1: ['svn', 'info', '--non-interactive']
svn: warning: cannot set LC_CTYPE locale
svn: warning: environment variable LC_ALL is en_US.UTF-8
svn: warning: please check that your locale name is correct
svn: E155007: '/home/paul/git/dCache' 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.development/new-feature.merge
>>> Running: git config --get branch.development/new-feature.remote
>>> Running: git config --get remote.origin.url
>>> repository info: Path: git@github.com:paulmillar/dcache.git, Base path: , Supports changesets: False
>>> Running: git config --get reviewboard.url
>>> Making HTTP GET request to https://rb.dcache.org/api/
>>> Running: git rev-parse refs/heads/development/new-feature
>>> Running: git merge-base 566d065b8dbb4d58b7b03faa2dae83d012f03fe2 origin/master
>>> Running: git rev-parse b30bc4a8575d4a8a734d175e1bf3e4fb6643ad8a
>>> Running: git status --porcelain --untracked-files=no
>>> Running: git diff --no-color --full-index --ignore-submodules b30bc4a8575d4a8a734d175e1bf3e4fb6643ad8a..566d065b8dbb4d58b7b03faa2dae83d012f03fe2 -M --no-ext-diff
>>> Running: git log --reverse --pretty=format:%s%n%n%b ^b30bc4a8575d4a8a734d175e1bf3e4fb6643ad8a 566d065b8dbb4d58b7b03faa2dae83d012f03fe2
>>> Making HTTP GET request to https://rb.dcache.org/api/review-requests/
>>> Making HTTP POST request to https://rb.dcache.org/api/review-requests/
>>> Got API Error 206 (HTTP code 400): The repository path specified is not in the list of known repositories.
>>> Error data: {u'stat': u'fail', u'repository': u'git@github.com:paulmillar/dcache.git', u'err': {u'msg': u'The repository path specified is not in the list of known repositories.', u'code': 206}}
Traceback (most recent call last):
  File "/usr/local/bin/rbt", line 9, in <module>
    load_entry_point('RBTools==0.6.3', 'console_scripts', 'rbt')()
  File "/usr/local/lib/python2.7/dist-packages/RBTools-0.6.3-py2.7.egg/rbtools/commands/main.py", line 134, in main
    command.run_from_argv([RB_MAIN, command_name] + args)
  File "/usr/local/lib/python2.7/dist-packages/RBTools-0.6.3-py2.7.egg/rbtools/commands/__init__.py", line 416, in run_from_argv
    exit_code = self.main(*args) or 0
  File "/usr/local/lib/python2.7/dist-packages/RBTools-0.6.3-py2.7.egg/rbtools/commands/post.py", line 791, in main
    submit_as=self.options.submit_as)
  File "/usr/local/lib/python2.7/dist-packages/RBTools-0.6.3-py2.7.egg/rbtools/commands/post.py", line 507, in post_request
    raise CommandError("Error creating review request: %s" % e)
rbtools.commands.CommandError: Error creating review request: The repository path specified is not in the list of known repositories. (HTTP 400, API Error 206)
paul@celebrimbor:~/git/dCache (development/new-feature)$ 

Please provide any additional information below.