3182: rbt fails to parse revision range

ondr*****@gmai***** (Google Code) (Is this you? Claim this profile.)
Jan. 9, 2014
What version are you running?
0.5.3

What's the URL of the page containing the problem?
None, see the output below.

What steps will reproduce the problem?
1. Upgrade RBTools from 0.5.2 to 0.5.3.
2. Try rbt post with --revision-range=rev1:rev2
3. Watch the thing fail.

What is the expected output? What do you see instead?
Expected output (this is rbt 0.5.2):
$ rbt post --branch feature/62694482/b --revision-range=068106ff218440586b890e3ff069aeff4fb6abf8:58cd165aa948d5c42d9947d1b5843f72781c0ea6 --summary='Something' --description='Something' --debug
DEBUG:root:Checking for a Subversion repository...
DEBUG:root:Running: svn info --non-interactive
DEBUG:root:Command exited with rc 1: ['svn', 'info', '--non-interactive']
svn: E155007: '/Users/foobar/Projects/Whatever/somerepo' is not a working copy
---
DEBUG:root:Checking for a Git repository...
DEBUG:root:Running: git rev-parse --git-dir
DEBUG:root:Running: git config core.bare
DEBUG:root:Running: git rev-parse --show-toplevel
DEBUG:root:Running: git symbolic-ref -q HEAD
DEBUG:root:Running: git config --get git-p4.port
DEBUG:root:Command exited with rc 1: ['git', 'config', '--get', 'git-p4.port']
---
DEBUG:root:Running: git config --get branch.develop.merge
DEBUG:root:Running: git config --get branch.develop.remote
DEBUG:root:Running: git config --get remote.origin.url
DEBUG:root:repository info: Path: git@github.com:foobar/somerepo.git, Base path: , Supports changesets: False
DEBUG:root:Running: git config --get reviewboard.url
DEBUG:root:Making HTTP GET request to https://review.example.com/api/
DEBUG:root:Making HTTP GET request to https://review.example.com/api/info/
DEBUG:root:Running: git merge-base origin/develop refs/heads/develop
DEBUG:root:Running: git branch -r --contains 068106ff218440586b890e3ff069aeff4fb6abf8
DEBUG:root:Running: git diff --no-color --full-index --no-ext-diff --ignore-submodules --no-renames 068106ff218440586b890e3ff069aeff4fb6abf8..58cd165aa948d5c42d9947d1b5843f72781c0ea6 -M
DEBUG:root:Making HTTP GET request to https://review.example.com/api/review-requests/
DEBUG:root:Making HTTP POST request to https://review.example.com/api/review-requests/
DEBUG:root:Making HTTP GET request to https://review.example.com/api/review-requests/5539/diffs/
DEBUG:root:Making HTTP POST request to https://review.example.com/api/review-requests/5539/diffs/
DEBUG:root:Making HTTP GET request to https://review.example.com/api/review-requests/5539/draft/
DEBUG:root:Making HTTP PUT request to https://review.example.com/api/review-requests/5539/draft/
Review request #5539 posted.

https://review.example.com/r/5539/

Actual output (rbt 0.5.3):
$ rbt post --branch feature/62694482/b --revision-range=068106ff218440586b890e3ff069aeff4fb6abf8:58cd165aa948d5c42d9947d1b5843f72781c0ea6 --summary='Something' --description='Something' --debug
DEBUG:root:Checking for a Subversion repository...
DEBUG:root:Running: svn info --non-interactive
DEBUG:root:Command exited with rc 1: ['svn', 'info', '--non-interactive']
svn: E155007: '/Users/foobar/Projects/Whatever/testrepo' is not a working copy
---
DEBUG:root:Checking for a Git repository...
DEBUG:root:Running: git rev-parse --git-dir
DEBUG:root:Running: git config core.bare
DEBUG:root:Running: git rev-parse --show-toplevel
DEBUG:root:Running: git symbolic-ref -q HEAD
DEBUG:root:Running: git config --get git-p4.port
DEBUG:root:Command exited with rc 1: ['git', 'config', '--get', 'git-p4.port']
---
DEBUG:root:Running: git config --get branch.develop.merge
DEBUG:root:Running: git config --get branch.develop.remote
DEBUG:root:Running: git config --get remote.origin.url
DEBUG:root:repository info: Path: git@github.com:foobar/somerepo.git, Base path: , Supports changesets: False
DEBUG:root:Running: git config --get reviewboard.url
DEBUG:root:Making HTTP GET request to https://review.example.com/api/
DEBUG:root:Making HTTP GET request to https://review.example.com/api/info/
DEBUG:root:Running: git rev-parse 068106ff218440586b890e3ff069aeff4fb6abf8:58cd165aa948d5c42d9947d1b5843f72781c0ea6
Failed to execute command: ['git', 'rev-parse', '068106ff218440586b890e3ff069aeff4fb6abf8:58cd165aa948d5c42d9947d1b5843f72781c0ea6']
fatal: Path '58cd165aa948d5c42d9947d1b5843f72781c0ea6' does not exist in '068106ff218440586b890e3ff069aeff4fb6abf8'
068106ff218440586b890e3ff069aeff4fb6abf8:58cd165aa948d5c42d9947d1b5843f72781c0ea6

What operating system are you using? What browser?
Mac OS X 10.8.5

Please provide any additional information below.
chipx86
#1 chipx86
Thanks for the detailed feedback. Our Git revision parsing logic changed in this version. Let me look into this and get back to you.
  • +Confirmed
  • -Priority-Medium
    +Priority-High
    +Milestone-RBTools-Release1.0
    +Component-RBTools
david
#2 david
I've just pushed a change to fix the R1:R2 syntax to the release-0.5.x branch of rbtools (fac8683).

On the master branch (which will probably be released as '0.6'), we're making some significant changes to the UI for specifying revisions and files. The short of it is that we'll be moving towards native syntax for most VCSes, which would mean that the command you specified in this report would be thus:

rbt post --branch feature/62694482/b --summary='Something' --description='Something' --debug 068106ff218440586b890e3ff069aeff4fb6abf8..58cd165aa948d5c42d9947d1b5843f72781c0ea6

Note that the major changes are that instead of --revision-range, revisions are now specified as arguments, and instead of using ':', the git syntax of R1..R2 is used.

For more info on this major work, see https://reviewboard.hackpad.com/RBTools-Diff-Behavior-gRwNAvl3SzJ
  • -Confirmed
    +Fixed