On Wednesday, April 25, 2012 at 11:39 EDT,
Peter Jönsson P <
peter.p...@ericsson.com> wrote:
[...]
> We have looked at the Gerrit tracking-id support, but to use it
> properly one needs to 'force' the developers to use a particular
> syntax in commit messages. Also since it will be part of the commit
> message you need to resubmit the patch set if you did a trivial
> spelling mistake. In our current tool you can always edit the metadata
> about your commit/delivery after it has been published.
>
> So we are now discussing if we should implement something similar to
> our existing setup in Gerrit. It could be similar to "labels" that is
> available in Atlassian Jira [1] which one could add to the change one
> has pushed for review. Base functionality could be free form text but
> regexp-based enforcement should of course be available. Another
> extension would be to have search-as-you-type towards the ticketing
> system of your choice.
This sounds very similar to the planned and partially implemented label
feature, see below. I don't know if there's a design document or similar
that explains the big picture, but I believe the idea is to allow more
or less arbitrary labels to be connected to changes, and to allow
queries of labels.
https://gerrit-review.googlesource.com/#/q/project:gerrit+topic:edit-labels-in-change-screen,n,z
(Most changes in this screen are displayed three times iff the
status:open search predicate is included. Known bug?)
It seems the current implementation still uses the database to store
the labels, but using the refs/notes namespace (or some other place in
Gitland) would seem like a more appropriate place to put them and more
in line with Gerrit's future direction.
One nice thing about keeping this information in the commit messages is
that trivial "git log" operations can be used to make queries. But yes,
the immutability is a problem.
Another problem -- regardless of how you store the information -- is
how to deal with corrections that span over multiple commits. How do
you know when the complete solution to a bug (or a new feature) is in?
And what if those commits are in different gits on different branches,
where these branches are used differently in different projects or on
different system-level branches of the same project? But solving that
is probably not something Gerrit can do anyway, and you might not have
that problem (but I know others that do).
--
Magnus Bäck
ba...@google.com