Can I disable "Publish and Submit" button

550 views
Skip to first unread message

Gaurav Negi

unread,
Mar 28, 2015, 1:42:39 AM3/28/15
to Repo and Gerrit Discussion
Dear Gerrit experts,
   Can I disable or hide "publish and Submit" button from gerrit.
I want developer only to submit his change after verification and code review. 
I donot want any +2 code reviewer commit someone else's code by mistake. 

Thanks
-Gaurav

Magnus Bäck

unread,
Mar 30, 2015, 2:49:55 AM3/30/15
to Gaurav Negi, Repo and Gerrit Discussion
On Saturday, March 28, 2015 at 06:42 CET,
Gaurav Negi <gaura...@gmail.com> wrote:

> Can I disable or hide "publish and Submit" button from gerrit.
> I want developer only to submit his change after verification and code
> review.
> I donot want any +2 code reviewer commit someone else's code by
> mistake.

I don't think you can disable the "Publish and Submit" button
specifically, but the Prolog cookbook contains an example to
only allow commit authors to submit a change.

https://gerrit-review.googlesource.com/Documentation/prolog-cookbook.html#_example_15_only_allow_author_to_submit_change

--
Magnus Bäck | Software Engineer, Development Tools
magnu...@sonymobile.com | Sony Mobile Communications

Edwin Kempin

unread,
Mar 31, 2015, 3:14:40 AM3/31/15
to Gaurav Negi, Repo and Gerrit Discussion
2015-03-30 8:49 GMT+02:00 Magnus Bäck <magnu...@sonymobile.com>:
On Saturday, March 28, 2015 at 06:42 CET,
     Gaurav Negi <gaura...@gmail.com> wrote:

> Can I disable or hide "publish and Submit" button from gerrit.
> I want developer only to submit his change after verification and code
> review.
> I donot want any +2 code reviewer commit someone else's code by
> mistake.

I don't think you can disable the "Publish and Submit" button
You may switch to the new change screen. The new change screen doesn't have a "Publish and Submit" button.

 
specifically, but the Prolog cookbook contains an example to
only allow commit authors to submit a change.

https://gerrit-review.googlesource.com/Documentation/prolog-cookbook.html#_example_15_only_allow_author_to_submit_change

--
Magnus Bäck                | Software Engineer, Development Tools
magnu...@sonymobile.com | Sony Mobile Communications

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gaurav Negi

unread,
Mar 31, 2015, 11:14:39 AM3/31/15
to Edwin Kempin, Repo and Gerrit Discussion
Thanks Magnus and Edwin.
Let me try new screen.
My Gerrit version is 2.5.4, I picked it as it is having verification label.
Can I switch to new screen on 2.5.4?

Sent from my iPhone

Matthias Sohn

unread,
Mar 31, 2015, 11:49:01 AM3/31/15
to Gaurav Negi, Edwin Kempin, Repo and Gerrit Discussion
On Tue, Mar 31, 2015 at 5:14 PM, Gaurav Negi <gaura...@gmail.com> wrote:
Thanks Magnus and Edwin.
Let me try new screen.
My Gerrit version is 2.5.4, I picked it as it is having verification label.
Can I switch to new screen on 2.5.4?

no, the new change screen was introduced in 2.8 which was released in Dec 2013

it's maybe time for an upgrade ;-)

-Matthias

Gaurav Negi

unread,
Mar 31, 2015, 12:40:52 PM3/31/15
to Matthias Sohn, Edwin Kempin, Repo and Gerrit Discussion
Thanks Matthis.
   Will the upgrade take away the verification part?

Gaurav

Sent from my iPhone

Matthias Sohn

unread,
Mar 31, 2015, 5:36:01 PM3/31/15
to Gaurav Negi, Edwin Kempin, Repo and Gerrit Discussion
On Tue, Mar 31, 2015 at 6:40 PM, Gaurav Negi <gaura...@gmail.com> wrote:
Thanks Matthis.
   Will the upgrade take away the verification part?

which verification ?

Find all the details which version has which new features in the release notes

-Matthias

Gaurav Negi

unread,
Apr 1, 2015, 1:17:46 AM4/1/15
to Matthias Sohn, Edwin Kempin, Repo and Gerrit Discussion
There is code review -2 .. +2
and then verification -1.. to +1 that I can use for Jenkins verification for precommit CI.

I think in Version 2.8, verification label is disabled. 

Thanks
-Gaurav

Magnus Bäck

unread,
Apr 1, 2015, 2:17:10 AM4/1/15
to Gaurav Negi, Matthias Sohn, Edwin Kempin, Repo and Gerrit Discussion
On Wednesday, April 01, 2015 at 07:17 CEST,
Gaurav Negi <gaura...@gmail.com> wrote:

> There is code review -2 .. +2
> and then verification -1.. to +1 that I can use for Jenkins
> verification for precommit CI.
> I think in Version 2.8, verification label is disabled.

It was actually removed in 2.6. Quoting the release notes:

* Approval categories stored in the database have been replaced
with labels configured in project.config. Existing categories
are migrated to project.config in All-Projects as part of the
schema upgrade; no user action is required.
* Don’t create Verify category by default

https://gerrit-documentation.storage.googleapis.com/ReleaseNotes/ReleaseNotes-2.6.html#_labels

Jan Kundrát

unread,
Apr 1, 2015, 6:33:05 AM4/1/15
to repo-d...@googlegroups.com
On Wednesday, 1 April 2015 08:16:57 CEST, Magnus Bäck wrote:
> It was actually removed in 2.6. Quoting the release notes:
>
> * Approval categories stored in the database have been replaced
> with labels configured in project.config. Existing categories
> are migrated to project.config in All-Projects as part of the
> schema upgrade; no user action is required.
> * Don’t create Verify category by default

...and users are free to create as many labels as they wish. The setup also
prompts to ask whether to create Verified on new installations.

Cheers,
Jan

--
Trojitá, a fast Qt IMAP e-mail client -- http://trojita.flaska.net/

Gaurav Negi

unread,
Apr 2, 2015, 4:08:13 PM4/2/15
to Gaurav Negi, Matthias Sohn, Edwin Kempin, Repo and Gerrit Discussion
Thanks Magnus,
   The reason for me to pick 2.5.4 was because I found verification label is disabled there in 2.8. 
But some feature I need that are in 2.8.

Not sure how verification works in 2.8? 

Thanks
-Gaurav

Matthias Sohn

unread,
Apr 2, 2015, 5:45:16 PM4/2/15
to Gaurav Negi, Edwin Kempin, Repo and Gerrit Discussion
On Thu, Apr 2, 2015 at 10:08 PM, Gaurav Negi <gaura...@gmail.com> wrote:
Thanks Magnus,
   The reason for me to pick 2.5.4 was because I found verification label is disabled there in 2.8. 
But some feature I need that are in 2.8.

Not sure how verification works in 2.8? 

This can be installed during init or later by configuration, by default only "Code Review" is installed.

You can install "Verified" label during init

or you can add "Verified" or other custom labels by configuration, see
this way you can also configure different labels for different projects.

-Matthias 

Gaurav Negi

unread,
Apr 2, 2015, 5:49:43 PM4/2/15
to Matthias Sohn, Edwin Kempin, Repo and Gerrit Discussion
Thank a ton Matthias. This is really helpful.

This would also mean that if I upgrade my gerrit from 2.5.4 (where verification is there) to 2.8, upgrade would keep verification?
or I can enable it with what you mention by project configuration file.

Thanks
-Gaurav

Matthias Sohn

unread,
Apr 2, 2015, 5:55:08 PM4/2/15
to Gaurav Negi, Edwin Kempin, Repo and Gerrit Discussion
On Thu, Apr 2, 2015 at 11:49 PM, Gaurav Negi <gaura...@gmail.com> wrote:
Thank a ton Matthias. This is really helpful.

This would also mean that if I upgrade my gerrit from 2.5.4 (where verification is there) to 2.8, upgrade would keep verification?
or I can enable it with what you mention by project configuration file.

as I said during init or by configuration.

Why do you want to update to 2.8 and not to the latest release 2.10.2 ?

-Matthias 

Gaurav Negi

unread,
Apr 2, 2015, 6:41:35 PM4/2/15
to Matthias Sohn, Edwin Kempin, Repo and Gerrit Discussion
Thanks Matthias, Will try out 2.10.2

Regards
-Gaurav
Reply all
Reply to author
Forward
0 new messages