'Depends on change that was not submitted' when trying to submit merge commit

353 views
Skip to first unread message

vvavr...@gmail.com

unread,
Jun 29, 2022, 6:02:26 AM6/29/22
to Repo and Gerrit Discussion
Hi,

I have merged branch A into branch B, and I would like to review/submit into branch B this single merge commit.

By default, gerrit seems to try to push for review all changes from A together with the merge commit, but that's not what I want because:

* Some changes in A have different committer and I don't have forge committer right.
* There are a lot of changes in A, I don't want to put them through review separetely. I want them to be "reviewed implicitly" by reviewing above mentioned merge commit.

So I do:

git push origin HEAD:refs/for/B%base=A,base=old-B

But when trying to submit this change I get

Change ...: Depends on change that was not submitted. Commit MERGE_COMMIT depends on commit COMMIT_IN_A of change CHANGE_IN_A which cannot be merged.

Does Gerrit supports such workflow for merge commit?

Or actually, this is independent of merge commit... So, could we have some kind of review approval for which means it is approved together with its parent commits?

Is there some alternative except obtaining Push rights and pushing merge commit bypassing review formality.

Kind regards,
Vasyl

vvavr...@gmail.com

unread,
Jul 4, 2022, 7:58:25 AM7/4/22
to Repo and Gerrit Discussion
Hi,

I have found that when following steps described in my previous email, problem is not reproduced. This is all due to some simplifications I've tried to do when submitting this message.

Below are actual steps. The main difference from previous message is that I actually use two repositories which share common parent instead of two branches.

So, I have two repositories on gerrit A and B which share common parent.

I have merged branch master of A into branch master of B, and I would like to review/submit into repository B this single merge commit.

By default, gerrit seems to try to push for review all changes from A together with the merge commit, but that's not what I want because:

* Some changes in A have different committer and I don't have forge committer right.
* There are a lot of changes in A, I don't want to put them through review separately. I want them to be "reviewed implicitly" by reviewing above mentioned merge commit.

So I do:

git push origin HEAD:refs/for/master%base=A/master,base=old-B/master

But when trying to submit this change I get

Change ...: Depends on change that was not submitted. Commit MERGE_COMMIT depends on commit COMMIT_IN_A of change CHANGE_IN_A which cannot be merged.

Does Gerrit supports such workflow for merge commit?

Or actually, this is independent of merge commit... So, could we have some kind of review approval for which means it is approved together with its parent commits?

Maybe there could be some special label, like 'Code-Review-Parent', vote on which would mean approval of parent commits.

Is there some alternative except obtaining Push rights and pushing merge commit bypassing review formality?

Kind regards,
Vasyl

vvavr...@gmail.com

unread,
Jul 4, 2022, 9:33:58 AM7/4/22
to Repo and Gerrit Discussion
I've found that what I need is very similar to https://www.gerritcodereview.com/design-docs/push-reviews.html
Reply all
Reply to author
Forward
0 new messages