1460: post-review fails when current branch is called tracking remote branch

xan****@gmai***** (Google Code) (Is this you? Claim this profile.)
Feb. 21, 2010
What version are you running?
post-review 0.8
http://downloads.reviewboard.org/nightlies/RBTools-0.2beta3.dev-20100118.tar.gz



What steps will reproduce the problem?
It occurs when local branch i want to push for review is tracking branch of
remote branch

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

xani@hydra:~/src/sprezentuj/spit$ post-review -n -d --parent=master
>>> svn info
>>> git rev-parse --git-dir
>>> git symbolic-ref -q HEAD
>>> git svn info
>>> git svn --version
>>> git config --get svn-remote.svn.url
>>> git config --get branch.emil-build.sprezentuj.net.merge
>>> git config --get branch.emil-build.sprezentuj.net.remote
>>> git remote show origin
>>> repository info: Path: git@github.com:aNeutrino/SPIT.git, Base path: ,
Supports changesets: False
>>> git config --get reviewboard.url
>>> git merge-base origin/mil-build.sprezentuj.net
refs/heads/emil-build.sprezentuj.net
Failed to execute command: ['git', 'merge-base',
'origin/mil-build.sprezentuj.net', 'refs/heads/emil-build.sprezentuj.net']
fatal: Not a valid object name origin/mil-build.sprezentuj.net

As u can see it ate "e", should be "origin/emil-build.sprezentuj.net"

same with branch named dev:

>>> svn info
>>> git rev-parse --git-dir
>>> git symbolic-ref -q HEAD
>>> git svn info
>>> git svn --version
>>> git config --get svn-remote.svn.url
>>> git config --get branch.dev.merge
>>> git config --get branch.dev.remote
>>> git remote show origin
>>> repository info: Path: git@github.com:aNeutrino/SPIT.git, Base path: ,
Supports changesets: False
>>> git config --get reviewboard.url
>>> git merge-base origin/v refs/heads/dev
Failed to execute command: ['git', 'merge-base', 'origin/v', 'refs/heads/dev']
fatal: Not a valid object name origin/v

Please provide any additional information below.
Basically it fails (eats first few letters when giving path to merge-base)
on some remote branch names (local branch name have no effect)
#1 xan****@gmai***** (Google Code) (Is this you? Claim this profile.)
i think i've found why is that, in:

        merge = merge.lstrip('refs/heads/')

does not remove "refs/heads", lstrip removes like if it starts from 'r' OR 'e' OR 'f'
or 's' etc
so it should be
merge = merge.replace('refs/heads/','',1)
chipx86
#2 chipx86
This should be fixed in RC1.
  • +Fixed
  • +Component-RBTools