What version are you running? RBTools 0.6 alpha 0 (dev) Review Board 1.7.21 What's the command line that can reproduce the problem? // from within a git svn repo rbt post --parent <sha> What steps will reproduce the problem? 1. git svn init <args> && git svn rebase 2. hack, hack, hack and git commit multiple commits (but not git svn dcommit) 3. rbt post --debug --parent HEAD^ (attempt to post only the most recent commit for review, and the rest of the commits collapsed into a parent diff) What is the expected output? I would expect either: 1) an error message specifying that the invocation of rbt post isn't valid with git svn 2) a review request to be sucessfully posted What do you see instead? $ rbt post --debug --revision-range f27b632:260cdd7 --parent 74aee14 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: '/home/wjavins/git/stuff/' 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:Command exited with rc 1: ['git', 'symbolic-ref', '-q', 'HEAD'] --- DEBUG:root:Running: git svn info DEBUG:root:repository info: Path: https://svn.mycorp.com/repo, Base path: /stuff/head, Supports changesets: False DEBUG:root:Running: git config --get reviewboard.url DEBUG:root:Command exited with rc 1: ['git', 'config', '--get', 'reviewboard.url'] --- DEBUG:root:Running: svn propget reviewboard:url https://svn.mycorp.com/repo Password for 'wjavins': DEBUG:root:Making HTTP GET request to http://reviewboard.mycorp.com/api/ DEBUG:root:Making HTTP GET request to http://reviewboard.mycorp.com/api/info/ DEBUG:root:Running: git rev-parse f27b632 260cdd7 DEBUG:root:Running: git rev-parse f27b632 260cdd7 DEBUG:root:Running: git branch -r --contains f27b63261022d89a014155ccd7e3523beb49f330 DEBUG:root:Running: git merge-base f27b63261022d89a014155ccd7e3523beb49f330 74aee14 DEBUG:root:Running: git diff --no-color --no-prefix --no-ext-diff -r -u f27b63261022d89a014155ccd7e3523beb49f330..260cdd79b8965318c57155044105959af30ebc61 DEBUG:root:Running: git svn find-rev f27b63261022d89a014155ccd7e3523beb49f330 Traceback (most recent call last): File "/usr/local/bin//rbt", line 9, in <module> load_entry_point('RBTools==0.5.7', 'console_scripts', 'rbt')() File "/usr/local/lib/python2.7/dist-packages/RBTools-0.5.7-py2.7.egg/rbtools/commands/main.py", line 127, in main command.run_from_argv([RB_MAIN] + args) File "/usr/local/lib/python2.7/dist-packages/RBTools-0.5.7-py2.7.egg/rbtools/commands/__init__.py", line 158, in run_from_argv exit_code = self.main(*args) or 0 File "/usr/local/lib/python2.7/dist-packages/RBTools-0.5.7-py2.7.egg/rbtools/commands/post.py", line 626, in main files=args) File "/usr/local/lib/python2.7/dist-packages/RBTools-0.5.7-py2.7.egg/rbtools/utils/diffs.py", line 13, in get_diff repository_info) File "/usr/local/lib/python2.7/dist-packages/RBTools-0.5.7-py2.7.egg/rbtools/clients/git.py", line 483, in diff_between_revisions return self._diff([revision_range]) File "/usr/local/lib/python2.7/dist-packages/RBTools-0.5.7-py2.7.egg/rbtools/clients/git.py", line 450, in _diff diff_lines = self.make_diff(revisions['base'], revisions['tip']) File "/usr/local/lib/python2.7/dist-packages/RBTools-0.5.7-py2.7.egg/rbtools/clients/git.py", line 497, in make_diff return self.make_svn_diff(ancestor, diff_lines) File "/usr/local/lib/python2.7/dist-packages/RBTools-0.5.7-py2.7.egg/rbtools/clients/git.py", line 524, in make_svn_diff if not rev and self.merge_base: AttributeError: 'GitClient' object has no attribute 'merge_base' What operating system are you using? Ubuntu 12.04.3 LTS, Precise Pangolin
After looking at the code, I believe everything should work by just removing these lines from make_svn_diff: - if not rev and self.merge_base: - rev = execute([self.git, "svn", "find-rev", - self.merge_base]).strip() Can you try that and see if it works?
David, That code should almost certainly be removed. Doing so just pushed the traceback to a different part of the code though (as make_svn_diff will return None, and I don't believe there is any error handling around that cases). I think there are some underlying issues that need to be clarified, like: Do svn repositories support diffs with parentdiffs? If so, we'll need to update the git client to generate a svn parent diff in a way that RB will understand. If not, 'rbt post' from a git-svn checkout probably shouldn't support the --parent flag as I presently understand it.
OK, I'll spend some time setting up a git-svn environment and work through this before 0.6.
- NeedInfo + New
When is 0.6 estimated to come out? I can also spend some time hacking on this as well, though some of it is above my head. I opened https://reviews.reviewboard.org/r/5624/ with the different tracebacks I was talking about in comment 3.
I don't think we have a plan yet for an 0.6 date. It's probably soon, but there are still some bugs to shake out.
- New + PendingReview
Fixed in rbtools master (59728bd). Thanks
- PendingReview + Fixed