4161: rbt land --push doesn't push to the correct remote

vinodkone
brennie

What version are you running?

RBTools 0.7.5

What steps will reproduce the problem?

  1. git clone a repo with a custom remote name (say "vinodkone")
  2. git checkout vinodkone_master
  3. git branch -u vinodkone/master vinodkone_master
  4. rbt land --dest vinodkone_master -r <review-id> --push

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

After landing the review, the commit should be pushed upstream to the remote.

What we observe is that push command fails because it tries to push to "origin" remote, which doesn't exist.

What operating system are you using?

OSX El Capitan

Attach the debug out from the command.

➜  mesos git:(vinodkone_master) ✗ rbt land --dest vinodkone_master --push -d -r 43634
>>> RBTools 0.7.5
>>> Python 2.6.9 (unknown, Oct 23 2015, 18:05:10) 
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)]
>>> Running on Darwin-15.2.0-x86_64-i386-64bit
>>> Home = /Users/vinodkone
>>> Current directory = /Users/vinodkone/workspace/mesos
>>> Checking for a Subversion repository...
>>> Running: svn --non-interactive info git://git.apache.org/mesos.git
>>> Command exited with rc 1: ['svn', '--non-interactive', u'info', u'git://git.apache.org/mesos.git']
svn: warning: W170000: Unrecognized URL scheme for 'git://git.apache.org/mesos.git'

svn: E200009: Could not display info for all targets because some targets don't exist
---
>>> Checking for a Git repository...
>>> Running: git rev-parse --git-dir
>>> Running: git config core.bare
>>> Running: git rev-parse --show-toplevel
>>> Running: git symbolic-ref -q HEAD
>>> Running: git config --get branch.vinodkone_master.merge
>>> Running: git config --get branch.vinodkone_master.remote
>>> Running: git config --get remote.vinodkone.url
>>> repository info: Path: git://git.apache.org/mesos.git, Base path: , Supports changesets: False
>>> Making HTTP GET request to https://reviews.apache.org/api/
>>> Running: git status --porcelain --untracked-files=no
>>> Making HTTP GET request to https://reviews.apache.org/api/review-requests/43634/
>>> Cached response for HTTP GET https://reviews.apache.org/api/review-requests/43634/ expired and was not modified
Applying patch from review request 43634
>>> RBTools 0.7.5
>>> Python 2.6.9 (unknown, Oct 23 2015, 18:05:10) 
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)]
>>> Running on Darwin-15.2.0-x86_64-i386-64bit
>>> Home = /Users/vinodkone
>>> Current directory = /Users/vinodkone/workspace/mesos
>>> Checking for a Subversion repository...
>>> Running: svn --non-interactive info git://git.apache.org/mesos.git
>>> Command exited with rc 1: ['svn', '--non-interactive', u'info', 'git://git.apache.org/mesos.git']
svn: warning: W170000: Unrecognized URL scheme for 'git://git.apache.org/mesos.git'

svn: E200009: Could not display info for all targets because some targets don't exist
---
>>> Checking for a Git repository...
>>> Running: git rev-parse --git-dir
>>> Running: git config core.bare
>>> Running: git rev-parse --show-toplevel
>>> Running: git symbolic-ref -q HEAD
>>> Running: git config --get branch.vinodkone_master.merge
>>> Running: git config --get branch.vinodkone_master.remote
>>> Running: git config --get remote.vinodkone.url
>>> repository info: Path: git://git.apache.org/mesos.git, Base path: , Supports changesets: False
>>> Making HTTP GET request to https://reviews.apache.org/api/
>>> Making HTTP GET request to https://reviews.apache.org/api/review-requests/43634/diffs/
>>> Cached response for HTTP GET https://reviews.apache.org/api/review-requests/43634/diffs/ expired and was modified
>>> Making HTTP GET request to https://reviews.apache.org/api/review-requests/43634/diffs/1/
>>> Cached response for HTTP GET https://reviews.apache.org/api/review-requests/43634/diffs/1/ expired and was not modified
>>> Making HTTP GET request to https://reviews.apache.org/api/review-requests/43634/diffs/1/
>>> Cached response for HTTP GET https://reviews.apache.org/api/review-requests/43634/diffs/1/ expired and was not modified
>>> Running: git status --porcelain --untracked-files=no
Patch is being applied from request 43634 with diff revision 1.
>>> Running: git apply -3 /var/folders/rb/hv5k95jj35jgjj_yqz5177wm0000gn/T/tmpVt5oUy
Successfully applied patch.
>>> Making HTTP GET request to https://reviews.apache.org/api/review-requests/43634/?force-text-type=plain
>>> Added cache entry for HTTP GET request to https://reviews.apache.org/api/review-requests/43634/?force-text-type=plain
>>> Making HTTP GET request to https://reviews.apache.org/api/users/joerg84/
>>> Added cache entry for HTTP GET request to https://reviews.apache.org/api/users/joerg84/
>>> Running: git commit -m "Consistent markdown code style in persistent-volumes.md.

Reviewed at https://reviews.apache.org/r/43634/" "--author=\"Joerg Schad <joerg@mesosphere.io>\""
Changes committed to current branch.
Pushing branch "vinodkone_master" upstream
>>> Running: git config --get remote.origin.url
>>> Command exited with rc 1: ['git', 'config', '--get', 'remote.origin.url']
---
>>> Running: git pull --rebase "" vinodkone_master
>>> Command exited with rc 1: ['git', 'pull', '--rebase', u'', 'vinodkone_master']
fatal: No path specified. See 'man git-pull' for valid url syntax
---
Traceback (most recent call last):
  File "/usr/local/bin/rbt", line 9, in <module>
    load_entry_point('RBTools==0.7.5.dev0', 'console_scripts', 'rbt')()
  File "/Library/Python/2.6/site-packages/rbtools/commands/main.py", line 133, in main
    command.run_from_argv([RB_MAIN, command_name] + args)
  File "/Library/Python/2.6/site-packages/rbtools/commands/__init__.py", line 622, in run_from_argv
    exit_code = self.main(*args) or 0
  File "/Library/Python/2.6/site-packages/rbtools/commands/land.py", line 261, in main
    raise CommandError(str(e))
rbtools.commands.CommandError: Could not pull changes from upstream.

Please provide any additional information below.

#1 brennie

There is a fix for this issue pending review at https://reviews.reviewboard.org/r/8337/. Thanks for reporting it!

  • -New
    +PendingReview
#2 brennie
  • +brennie
#3 brennie

A fix for this issue has landed on the release-0.7.x branch as commit ce3d4d63d5005fb9ffb1b3c9b3755e190233388b.

  • -PendingReview
    +Fixed