Referring to this article: 
http://blog.beanbaginc.com/2015/01/26/an-effective-rbtools-workflow-for-git/

What I need is to be able to land changes not in master but in a remote 
branch off of master. Our release process merges these branches into master 
via pull requests at the behest of DevOps, not the individual developers. 
Landing in master is not an option, because there is a qualification 
process that needs to take place prior to merge to master.

I'm pretty sure there is something I'm not understanding about Git and/or 
rb, I'm posting here in case someone can help me spot the issue.

When I look in the BitBucket webUI, oddly I only see the mb-1 commits on 
the "commits" page(none of the mb-2 commits) and I see the mb-2 branch on 
the branches pagem but not the mb-1 branch. The mb-1 commits are in the 
mb-2 branch.

Dave-PC MINGW64 ~/Vagrant/sws-vagrant/src/rb-test/bin (master)
$ git checkout -b mb-1
Switched to a new branch 'mb-1'

Dave-PC MINGW64 ~/Vagrant/sws-vagrant/src/rb-test/bin (mb-1)
$ git push --set-upstream origin mb-1
Total 0 (delta 0), reused 0 (delta 0)
remote:
remote: Create pull request for mb-1:
remote:   https:
//bitbucket.org/.../rb-test/pull-requests/new?source=mb-1&t=1
remote:
To [email protected]:shipwire/rb-test.git
 * [new branch]      mb-1 -> mb-1
Branch mb-1 set up to track remote branch mb-1 from origin.

Dave-PC MINGW64 ~/Vagrant/sws-vagrant/src/rb-test/bin (mb-1)
$ vi foo.py

Dave-PC MINGW64 ~/Vagrant/sws-vagrant/src/rb-test/bin (mb-1)
$ vi bar.py

Dave-PC MINGW64 ~/Vagrant/sws-vagrant/src/rb-test/bin (mb-1)
$ git commit -a
[mb-1 216b719] Adding via mb-1
 2 files changed, 4 insertions(+)

Dave-PC MINGW64 ~/Vagrant/sws-vagrant/src/rb-test/bin (mb-1)
$ git checkout -b mb-2
Switched to a new branch 'mb-2'

Dave-PC MINGW64 ~/Vagrant/sws-vagrant/src/rb-test/bin (mb-2)
$ git status
On branch mb-2
Untracked files:
  (use "git add <file>..." to include in what will be committed)

        find_gitpush_done
        ../conf/file.txt
        ../copy_merchant_output.txt
        ../copy_merchant_output2.txt
        ../output.txt
        ../output2.txt

nothing added to commit but untracked files present (use "git add" to track)

Dave-PC MINGW64 ~/Vagrant/sws-vagrant/src/rb-test/bin (mb-2)
$ git push --set-upstream mb-1 mb-2
fatal: 'mb-1' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Dave-PC MINGW64 ~/Vagrant/sws-vagrant/src/rb-test/bin (mb-2)
$ git push --set-upstream origin/mb-1 mb-2
fatal: 'origin/mb-1' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Dave-PC MINGW64 ~/Vagrant/sws-vagrant/src/rb-test/bin (mb-2)
$ git push --set-upstream origin mb-2
Counting objects: 5, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 451 bytes | 0 bytes/s, done.
Total 5 (delta 4), reused 0 (delta 0)
remote:
remote: Create pull request for mb-2:
remote:   https:
//bitbucket.org/.../rb-test/pull-requests/new?source=mb-2&t=1
remote:
To [email protected]:shipwire/rb-test.git
 * [new branch]      mb-2 -> mb-2
Branch mb-2 set up to track remote branch mb-2 from origin.

Dave-PC MINGW64 ~/Vagrant/sws-vagrant/src/rb-test/bin (mb-2)
$ gitk

Dave-PC MINGW64 ~/Vagrant/sws-vagrant/src/rb-test/bin (mb-2)
$ vi foo.py

Dave-PC MINGW64 ~/Vagrant/sws-vagrant/src/rb-test/bin (mb-2)
$ git commit -a
[mb-2 ec57060] Add via mb-2
 1 file changed, 2 insertions(+)

Dave-PC MINGW64 ~/Vagrant/sws-vagrant/src/rb-test/bin (mb-2)
$ git checkout mb-1
Switched to branch 'mb-1'
Your branch is ahead of 'origin/mb-1' by 1 commit.
  (use "git push" to publish your local commits)

Dave-PC MINGW64 ~/Vagrant/sws-vagrant/src/rb-test/bin (mb-1)
$ rbt post
Review request #71 posted.

http://rb.tools.aws.....com/r/71/
http://rb.tools.aws.....com/r/71/diff/

Dave-PC MINGW64 ~/Vagrant/sws-vagrant/src/rb-test/bin (mb-1)
$ git checkout mb-2
Switched to branch 'mb-2'
Your branch is ahead of 'origin/mb-2' by 1 commit.
  (use "git push" to publish your local commits)

Dave-PC MINGW64 ~/Vagrant/sws-vagrant/src/rb-test/bin (mb-2)
$ rbt post
Review request #72 posted.

http://rb.tools.aws.....com/r/72/
http://rb.tools.aws.....com/r/72/diff/

Dave-PC MINGW64 ~/Vagrant/sws-vagrant/src/rb-test/bin (mb-2)
$ git checkout mb-1
Switched to branch 'mb-1'
Your branch is ahead of 'origin/mb-1' by 1 commit.
  (use "git push" to publish your local commits)

Dave-PC MINGW64 ~/Vagrant/sws-vagrant/src/rb-test/bin (mb-1)
$ rbt land --dest=mb-1 --push mb-1
ERROR: The local branch cannot be merged onto itself. Try a different local 
branch or destination branch.

Dave-PC MINGW64 ~/Vagrant/sws-vagrant/src/rb-test/bin (mb-1)
$ rbt land --dest=origin/mb-1 --push mb-1
Merging branch "mb-1" into "origin/mb-1"
Deleting merged branch "mb-1"
Pushing branch "origin/mb-1" upstream
ERROR: Could not pull changes from upstream.

Dave-PC MINGW64 ~/Vagrant/sws-vagrant/src/rb-test/bin ((6efeb87...))
$ rbt land --dest=mb-1 --push origin/mb
Failed to execute command: ['git', 'rev-parse', 'origin/mb']
origin/mb
fatal: ambiguous argument 'origin/mb': unknown revision or path not in the 
working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'


Dave-PC MINGW64 ~/Vagrant/sws-vagrant/src/rb-test/bin ((6efeb87...))
(arg: 2) rbt land --dest=mb-1 --push origin/mb

Dave-PC MINGW64 ~/Vagrant/sws-vagrant/src/rb-test/bin ((6efeb87...))
$ rbt land --dest=mb-2 --push origin/mb-2
Merging branch "origin/mb-2" into "mb-2"
Failed to execute command: ['git', 'commit', '-m', u'Adding via 
mb-1\n\nReviewed at http://rb.tools.aws.....com/r/7
1/', u'--author="Dave Anderson <David....com>"']
On branch mb-2
Your branch is ahead of 'origin/mb-2' by 1 commit.
  (use "git push" to publish your local commits)
Untracked files:
        bin/find_gitpush_done
        conf/file.txt
        copy_merchant_output.txt
        copy_merchant_output2.txt
        output.txt
        output2.txt

nothing added to commit but untracked files present


Dave-PC MINGW64 ~/Vagrant/sws-vagrant/src/rb-test/bin (mb-2)
$ rbt land --dest=origin/mb-2 --push mb-2
Merging branch "mb-2" into "origin/mb-2"
Deleting merged branch "mb-2"
Pushing branch "origin/mb-2" upstream
ERROR: Could not pull changes from upstream.

Dave-PC MINGW64 ~/Vagrant/sws-vagrant/src/rb-test/bin ((ca80b47...))
$


-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to