[coreboot] Draft patches in Gerrit

David Hendricks dhendrix at google.com
Sat Nov 3 01:31:16 CET 2012


Hello everyone,
Stefan and Patrick recently made some changes which allow us to use the
draft feature of Gerrit.

This feature allows developers to create changes which are visible only to
the author and selected reviewers and do not cause e-mail to be sent to the
list. Once the developer is happy with the patch it can be published for
general review as usual. A draft cannot be submitted directly.

This is particularly handy for early development of a patch or patch set
with multiple people. It can also be used by individuals to stash a work in
progress on-line so that it's easy to access on multiple machines.

Details about drafts here: http://wiki.openstack.org/GerritWorkflow#Drafts

To use it, push to refs/drafts/. There's also a nice helper utility,
git-review, which makes it easy to upload patches whether they are drafts
or not. Use "-D" to upload a patch (and all subsequent updates) to keep it
in draft state. When you wish to publish a patch, use "git review" without
-D or press the "Publish" button on the gerrit UI.

More details about git-review here:
https://labsconsole.wikimedia.org/wiki/Git-review

"git review" does a bit more than just the bare minimum amount of work, but
those curious:
dhendrix at noumenon:coreboot$ git review -Dv
2012-11-02 16:03:59.010298 Running: git log --color=never --oneline
HEAD^1..HEAD
2012-11-02 16:03:59.014268 Running: git remote
2012-11-02 16:03:59.017472 Running: git branch -a --color=never
2012-11-02 16:03:59.022055 Running: git branch --color=never
2012-11-02 16:03:59.026509 Running: git log HEAD^1..HEAD
Found topic 'test' from parsing changes.
2012-11-02 16:03:59.033992 Running: git rev-parse --git-dir
2012-11-02 16:03:59.038054 Running: git remote update gerrit
Fetching gerrit
>From ssh://review.coreboot.org:29418/coreboot
   41392df..7309709  master     -> gerrit/master
2012-11-02 16:04:11.037711 Running: git rebase -i remotes/gerrit/master
2012-11-02 16:04:11.850276 Running: git reset --hard ORIG_HEAD
2012-11-02 16:04:11.927762 Running: git remote update gerrit
Fetching gerrit
2012-11-02 16:04:22.140791 Running: git config --get color.ui
2012-11-02 16:04:22.145475 Running: git log --color=auto --decorate
--oneline test --not remotes/gerrit/master
2012-11-02 16:04:22.152204 Running: git push gerrit
HEAD:refs/drafts/master/test
remote: Resolving deltas: 100% (1/1)
remote: Processing changes: new: 1, refs: 1, done
remote:
remote: New Changes:
remote:   http://review.coreboot.org/1671 [DRAFT]
remote:
To ssh://dhendrix@review.coreboot.org:29418/coreboot
 * [new branch]      HEAD -> refs/drafts/master/test

-- 
David Hendricks (dhendrix)
Systems Software Engineer, Google Inc.



More information about the coreboot mailing list