On Wed, Aug 3, 2016 at 12:48 AM, David Pursehouse
<
david.pu...@gmail.com> wrote:
> On Wed, Aug 3, 2016 at 4:06 AM Khai Do <
zaro...@gmail.com> wrote:
>>
>> Hello All. We use zuul to track cross project dependencies[1]. I wanted
>> to create a plugin that could visualize zuul's patchset dependencies to the
>> Gerrit change screen. It looks like the most logical place to put that info
>> is in another tab in the related info block. I was wondering whether that's
>> possible?
>
>
> This seems similar to the "submitted together" functionality that already
> exists in Gerrit. Aside from the different way it ties changes together
> (using the Depends-On footer rather than topic) how does this feature differ
> from "submitted together"?
I think it is more complex, but also more powerful[1].
I recently came across an interesting use case that the depends on
footer would have solved better:
I had 2 changes, and one of them looked good to me if and only if it is
submitted with the other change. And as changing the topic on the change
itself nor when changing other changes' topic in the same topic voids the
Code Review +2, I had to trust the other party to not mingle with the topic
to submit this change that depended on the other
(the other needed some discussion and was not interesting to complete
by the other person, so they could have the motivation to just submit change
1 and move on with live ignoring the 2nd change, that I was interested in.
[the 2nd change was for tracking project metadata])
So the depends-on-footer as it is part of the commit message (hence cannot
be changed without introducing another revision) helps nailing down
"reviewable trusted dependencies".
It also can express one way implications, which the topic cannot.
The downside of the depends on footer is the ease of use
in the common case of just wanting 2 changes go in together in
2 separate projects, because you have to amend one of the
changes at least once to have a back and forth "depends on" footer
with the others change id.
Another thought was to not put a change id in the depends on footers,
e.g. put a topics name into the "Depends-On:" and then search the
secondary index for all changes that depend on a "topic".
But all of these seemed to complicated at the time.
Nowadays it should be "easy" to integrate a Depends-On footer
one way or another. You would edit [2] to actually search through
the commit message of each change in the set already and add all
the changes pointed to via the "Depends-On" footer.
Stefan
[1] We had it proposed back then
https://gerrit-review.googlesource.com/#/c/55243/
[2]
https://gerrit.googlesource.com/gerrit/+/master/gerrit-server/src/main/java/com/google/gerrit/server/git/MergeSuperSet.java
in method completeChangeSetWithoutTopic