Make rbt behave better if it can't find a remote branch for hg repositories.
Review Request #5926 — Created June 4, 2014 and submitted — Latest diff uploaded
Right now, if rbt can't find the remote branch, it errors out with the string
"CRITICAL: tuple index out of range". This is a terrible error.There's some code in the mercurial client to allow using --tracking-branch (or
the associated config value) in the case that none of the expected branch names
are found, but --tracking-branch was listed under the "git options" only. I've
moved this option to the general repository options section and clarified how
it behaves for mercurial repositories.I've then made it so that if the mercurial client can't find an upstream
branch, it will error out with a useful message telling people what went wrong
and how to fix it.
- Ran unit tests
- Created a bare hg repo with no remote branches, and ran 'rbt post'. Saw the
expected error message about being unable to determine the upstream branch.