Issue 1651: Direct push of a rebased series after a merge conflict
Status:  Released
Owner: ----
Closed:  Nov 2012
Reported by LpZ.squ...@gmail.com, Nov 8, 2012
************************************************************
***** NOTE: THIS BUG TRACKER IS FOR GERRIT CODE REVIEW *****
***** DO NOT SUBMIT BUGS FOR CHROME, ANDROID, INTERNAL *****
***** ISSUES WITH YOUR COMPANY'S GERRIT SETUP, ETC.    *****
***** THOSE ISSUE BELONG IN DIFFERENT ISSUE TRACKERS!  *****
************************************************************

Affected Version:

What steps will reproduce the problem?
1. Submit a series A of patchs in review.
2. Submit, approve and merge another review conflicting with some patches of A.
3. Approve and submit all the patches of the series A, beginning by the top (in order to trigger only one merge attempt) -> gerrit does not merge the series because of the conflict.
4. Manually rebase A, solve the conflict, and directly push the series on the remote (not in review).

What is the expected output? What do you see instead?

With gerrit 2.3, the reviews of the series A were closed after step 4, with the status "Pushed".

With gerrit 2.5, these reviews are not closed.
It is possible to approve the first commit of the series A (which does not conflict with the commit of step 2) -> this commit appears twice in the history.
Nov 14, 2012
#1 janne.ro...@vincit.fi
We also faced the same issue after upgrading from 2.4.2 to 2.5.

The following example should demonstrate the issue:
  echo "hello" >> foo.txt
  git add foo.txt
  git commit -m "First version"
  git push review HEAD:refs/publish/master/test

  echo "World" >> foo.txt
  git add foo.txt
  git commit --amend
  #git push review HEAD:refs/publish/master/test
  git push review master

When using gerrit 2.4 the above script resulted in the change set marked as merged but with gerrit 2.5 the state is review in progress.

If you uncomment the git push command, the change set status is merged after pushing the commit to master.
Nov 29, 2012
Project Member #2 edwin.ke...@gmail.com
Should be fixed by [1].

[1] https://gerrit-review.googlesource.com/39851
Status: Submitted
Labels: FixedIn-2.6
Dec 13, 2012
#3 tobias.o...@sap.com
Is there a regression test for this? As far as I remember this is already the second time that this feature broke in a Gerrit release.
Dec 13, 2012
Project Member #4 edwin.ke...@gmail.com
No. Unfortunately there is no test that checks this fuctionality.

By now this fix is also available with Gerrit 2.5.1
Status: Released
Labels: -FixedIn-2.6 FixedIn-2.5.1