[Insight-developers] Gerrit Wish list

Marcus D. Hanwell marcus.hanwell at kitware.com
Wed Oct 27 15:52:48 EDT 2010


On Wed, Oct 27, 2010 at 3:41 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> Marcus,
>
> It would be nice if somehow the commit message could contain a link to
> the gerrit patch. Then when browsing the git repository, you could
> navigate to the discussion. I don't know how this could be done. Maybe
> in the gerrit hook. Maybe there is not enough information to do it?
>
> I just tried this query:
> http://review.source.kitware.com/#q,change:Ifc32e3a2dc5feb5a0309f8fa0a0e8d66bb87e3cf+project:ITK+branch:master,n,z
>
> and it worked. looks like there is enough info. The downside is that
> if the review site goes away or changes it's url, the link will be
> wrong.
>
If you have the Change-Id, and it was correctly used throughout, then
you can query Gerrit. I wonder if it would be better to adapt gitweb
to turn the Change-Id lines in the commit messages to be hyperlinks.
That way, if the URL every changed it could simply be remapped.

The Change-Id is immutable, and so documenting that one can query
Gerrit for the change id in the commit message, along with adding
features to existing viewers, might accomplish what you want. I would
rather avoid having URLs in commit messages, seeing the change-id line
would tip you off that there may well be a Gerrit entry.

Marcus


More information about the Insight-developers mailing list