Comment-Added hook does not get triggered for cherry-picked changes

44 views
Skip to first unread message

Pravin

unread,
Dec 30, 2011, 5:18:21 AM12/30/11
to Repo and Gerrit Discussion
I have a project for which I have configured all the changes to be
cherry-picked
whenever a change gets submitted. When such changes are submitted,
Gerrit
adds a comment saying 'Change has been successfully cherry-picked'.
However,
the comment-added hook does not get triggered for such automated
comments.

Is this the intended functionality or is it a known bug? I think this
is a bug.

Thanks,
Pravin

Martin Fick

unread,
Dec 31, 2011, 5:35:25 PM12/31/11
to repo-d...@googlegroups.com, Pravin

This is likely related to an NPE and should get fixed here:

https://gerrit-review.googlesource.com/#/c/30754/

-Martin

--
Employee of Qualcomm Innovation Center, Inc. which is a
member of Code Aurora Forum

Brad Larson

unread,
Jan 1, 2012, 7:53:43 PM1/1/12
to Repo and Gerrit Discussion


On Dec 31 2011, 4:35 pm, Martin Fick <mf...@codeaurora.org> wrote:
> On Friday, December 30, 2011 03:18:21 am Pravin wrote:
>
> > I have a project for which I have configured all the
> > changes to be cherry-picked
> > whenever a change gets submitted. When such changes are
> > submitted, Gerrit
> > adds a comment saying 'Change has been successfully
> > cherry-picked'. However,
> > the comment-added hook does not get triggered for such
> > automated comments.
>
> > Is this the intended functionality or is it a known bug?
> > I think this is a bug.
>
> This is likely related to an NPE and should get fixed here:
>
> https://gerrit-review.googlesource.com/#/c/30754/

No I think this has always been the case - we don't send out a comment-
added stream event for the comment added by Gerrit. I double-checked
with 2.2.1 and it also doesn't send out an event for this, before that
NPE was introduced.

Pravin, any particular reason you need the event for this comment? I
assume we don't send the event because nobody's ever had a use-case
for needing it...

Brad

Pravin

unread,
Jan 1, 2012, 11:54:35 PM1/1/12
to Repo and Gerrit Discussion
We have some scripts running and rely on the commit data
published by the hooks. The problem occurs when a project is
configured to use cherry-pick instead of simple merge while
submitting the changes. In such cases the actual commit SHA
in the GIT repository is different than the patchset commit
SHA. The only way this is reported by Gerrit is by adding a
comment which gives the actual GIT commit SHA. Since this information
is never published by hooks or stream-events, the information
is always incomplete with other systems.

This is where it becomes essential to have complete data being
published by the hooks.

Thanks,
Pravin

Pravin

unread,
Jan 1, 2012, 11:56:54 PM1/1/12
to Repo and Gerrit Discussion
Martin,

When I try to login to https://gerrit-review.googlesource.com/#/c/30754/
using my credentials, it gives an error saying 'Access Denied'.

Please let me know how to go about getting access to this website.

Thanks,
Pravin

Brad Larson

unread,
Jan 2, 2012, 8:30:52 PM1/2/12
to Repo and Gerrit Discussion


On Jan 1, 10:56 pm, Pravin <prav...@nvidia.com> wrote:
> Martin,
>
> When I try to login tohttps://gerrit-review.googlesource.com/#/c/30754/
> using my credentials, it gives an error saying 'Access Denied'.
>
> Please let me know how to go about getting access to this website.

The server is not yet available to public access, but hopefully will
be soon. See [1]. Your best bet to change this behavior is to create
an issue for it on the Gerrit issue tracker [2] and submit a patch.

[1] http://groups.google.com/group/repo-discuss/browse_thread/thread/85f5770f2fd47ae/dcd75fd909f09da7
[2] http://code.google.com/p/gerrit/issues/list
Reply all
Reply to author
Forward
0 new messages