Question

It is possible to create cirular dependecies in patch sets (from Gerrit standpoint).

For instance, pachset 2 depends on patchset 1 (the same commit ID).

What should be done do avoid such a situation? Or maybe nothing is wrong with it? Looking forward to reading your opinion.

I am using Gerrit Code Review (2.6.1-117-g04facf7).

Was it helpful?

Solution

Patchset 2 depending on patchset 1 isn't circular dependency, because patchset 1 doesn't depend on patchset 2. Older patchsets never depend on newer patchsets, because they are replaced by them.

Anyway:

For instance, pachset 2 depends on patchset 1 (the same commit ID).

No, because patchset 2 always replaces patchset 1 in its entirety, including any dependencies. Patchset 2 is a new patchset because it has the same change ID.

If they had different change IDs they would both be patchset 1 but in a different change.

You could try to make 2 changes depend on each other, but that wouldn't work because one is always newer than the other and once you edit the older one to depend on the newer one, the newer one's dependencies get outdated. You have to resolve outdated dependencies before you can submit a merge.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top