RBTools Ticket #4822: RBTools 1.0.2 has an issue when you run rbt diff with --parent option.

2 views
Skip to first unread message

Jack Dai

unread,
May 21, 2019, 2:44:51 PM5/21/19
to Jack Dai, reviewboa...@googlegroups.com
To reply, visit https://hellosplat.com/s/beanbag/tickets/4822/

New ticket #4822 by jackdai

For Beanbag, Inc. RBTools

RBTools 1.0.2 has an issue when you run rbt diff with --parent option.

What version are you running?

RBTools==1.0.2

What steps will reproduce the problem?

  1. Git clone from a repo and modify a file
  2. run git diff to get git_id_sha
  3. rbt diff --parent 'git_id_sha' WARNING: Could not determine specific upstream remote to use for diffs. We recommend setting TRACKING_BRANCH in reviewboardrc to your nearest upstream remote branch. CRITICAL: Failed to execute command: [u'git', u'rev-parse', u'5d727773ae7d199995590e777d786a39691ace4b^']

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

In RBTools 1.0.1, when you run "rbt diff --parent 'git_id_sha'", it gives the following ouput: WARNING: Your working directory is not clean. Any changes which have not been committed to a branch will not be included in your review request.

What operating system are you using?

Linux

Attach the debug out from the command.

Running: git rev-parse refs/heads/master Running: git branch --remotes Running: git config --get branch.6bc21db76d21841715217cde5b5da1f5889f06b0.remote Command exited with rc 1: [u'git', u'config', u'--get', u'branch.6bc21db76d21841715217cde5b5da1f5889f06b0.remote']


Running: git remote WARNING: Could not determine specific upstream remote to use for diffs. We recommend setting TRACKING_BRANCH in reviewboardrc to your nearest upstream remote branch. Running: git rev-parse 6bc21db76d21841715217cde5b5da1f5889f06b0 Running: git rev-list 6bc21db76d21841715217cde5b5da1f5889f06b0 --not --remotes=origin

Running: git rev-parse 5d727773ae7d199995590e777d786a39691ace4b^ Command exited with rc 128: [u'git', u'rev-parse', u'5d727773ae7d199995590e777d786a39691ace4b^'] fatal: ambiguous argument '5d727773ae7d199995590e777d786a39691ace4b^': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' 5d727773ae7d199995590e777d786a39691ace4b^


Traceback (most recent call last): File "/usr/local/bin/rbt", line 11, in <module> sys.exit(main()) File "/usr/local/lib/python2.7/dist-packages/rbtools/commands/main.py", line 120, in main command.run_from_argv([RB_MAIN, command_name] + args) File "/usr/local/lib/python2.7/dist-packages/rbtools/commands/init.py", line 725, in run_from_argv exit_code = self.main(args) or 0 File "/usr/local/lib/python2.7/dist-packages/rbtools/commands/diff.py", line 51, in main revisions = tool.parse_revision_spec(args) File "/usr/local/lib/python2.7/dist-packages/rbtools/clients/git.py", line 147, in parse_revision_spec parent_ref, remote) File "/usr/local/lib/python2.7/dist-packages/rbtools/clients/git.py", line 569, in _rev_list_youngest_remote_ancestor youngest_remote_commit = self._rev_parse('%s^' % local_commit)[0] File "/usr/local/lib/python2.7/dist-packages/rbtools/clients/git.py", line 537, in _rev_parse revisions = self._execute([self.git, 'rev-parse'] + revisions) File "/usr/local/lib/python2.7/dist-packages/rbtools/clients/git.py", line 1225, in _execute return execute(cmdline, cwd=self._git_toplevel, args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/rbtools/utils/process.py", line 189, in execute raise Exception('Failed to execute command: %s' % command) Exception: Failed to execute command: [u'git', u'rev-parse', u'5d727773ae7d199995590e777d786a39691ace4b^']

Please provide any additional information below.

New Priority:Medium Type:Defect
Reply all
Reply to author
Forward
0 new messages