New issue
Advanced search Search tips

Issue 786107 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Drover error merging a change that was merged and reverted

Project Member Reported by donnd@google.com, Nov 16 2017

Issue description

I got a rather unhelpful error yesterday when trying to use drover to reland a CL that had been merged onto a branch and then reverted.  I don't have the exact text of the message anymore but it was something about 'refs couldn't be merged'.

Matt, do you still have a record of the error message?
 
This is the error message we were getting:

Presubmit checks passed.
 chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTabHelper.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
remote: Processing changes: refs: 1, done            
To https://chromium.googlesource.com/chromium/src.git
 ! [remote rejected]           e560e1ce32be0662522983b3ecbeb770bc54e215 -> refs/for/refs/branch-heads/3239%ready,notify=ALL,m=Initial_upload (change https://chromium-review.googlesource.com/#/c/chromium/src/+/769297 closed)
error: failed to push some refs to 'https://chromium.googlesource.com/chromium/src.git'

agable probably knows more here than I do, but that looks like you were uploading the reland from the same local branch from which you'd uploaded the original without clearing the issue with which it was associated (hence "change ... closed"). I think `git cl issue 0` should (or would have, if you've worked around this) fix this.

Comment 3 by aga...@chromium.org, Nov 29 2017

Status: Fixed (was: Untriaged)
When a change gets drovered, then reverted, you shouldn't drover it again. You should either revert the revert (using the revert button in the UI), or reland the first drover (using the reland button in the UI).

This error arises because the true unique identifier of a change in Gerrit is (repo + branch + change-id). So when you drover (i.e. cherrypick) a change from one branch to another, it preserves the same change-id to help users keep track of relationships between changes on different branches. But that also means that you can't perform the same cherry-pick twice: that would result in two changes on the target branch with the same (repo + branch + change-id). So when you try to do the second drover, it thinks you're trying to upload a new patchset to the first drover. Which you can't do, since that change was submitted and is therefore closed.

This should be documented better but I don't know where.

Sign in to add a comment