preventing gerrit changes from being merged
d.ostrovsky at idaia.de
d.ostrovsky at idaia.de
Thu Sep 20 01:00:21 PDT 2012
Hi,
recently some gerrit changes were accidentally merged into master
through gerrit UI.
While there are ways to prevent it, like voting -2 for a change or
prefixing the
commit message with "work in progress, please don't merge" or
something like that,
I want to share with you the gerrit way to achieve that: draft queue feature.
Default queue in gerrit is publish queue. All changes are submitted to
it per default.
Recently draft queue was introduced in gerrit. If you submit a change
to draft queue it
cannot be merged. That change must be first promoted to publish queue.
To use draft queue, all you need is to pass -D switch to git-review:
git-review -D
If you don't use git-review, you can specify the draft queue on command line:
git push logerrit master:refs/draft/master
(or whatever branch you need).
When you are ready you can promote your change to publish queue with
UI or with command line:
ssh logerrit gerrit review --publish <COMMIT | CHANGEID>
See https://gerrit.libreoffice.org/Documentation/cmd-review.html for
more details.
Ciao
David
More information about the LibreOffice
mailing list