CandyShop / gerrit

Automatically exported from code.google.com/p/gerrit
Apache License 2.0
1 stars 0 forks source link

"Unspecified merge failure: REVISION_GONE" error occured when trying to submit a patch. #770

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Affected Version:2.1.5

What steps will reproduce the problem?
1. removed mysql DB
  (because we can't fix "submitted merge pending" issue)
2. created mysql DB
3. installed gerrit
4. uploaded changes
5. REVISION_GONE error occured

What is the expected output? What do you see instead?
User try to submit the patch but he see a
error saying "Unspecified merge failure: REVISION_GONE". 

Please provide any additional information below.
I recreated mysql DB and reinstalled gerrit.
because I had "submitted merge pending" issue and I can't fix that.
I expected to reset gerrit is the solution.
REVISION_GONE error is side-effect of above work?
How can I solve this problem?

Original issue reported on code.google.com by naut...@gmail.com on 4 Nov 2010 at 8:32

GoogleCodeExporter commented 9 years ago
It is a side effect of wiping the database without also wiping the 
refs/changes/* references in the Git repository.  What happens is:

1) Gerrit consults the database, decides that change ID 1 (or whatever) is 
available because it does not exist in the database.
2) When it tries to create refs/changes/01/01/1, Gerrit finds that it exists in 
Git, and refuses to overwrite it.
3) When the change set is reviewed and merged, Gerrit looks it up, but finds 
that refs/changes/01/01/1 points to a different commit than it expects, and 
fails with the error you see.

When I saw the same problem, I solved it by manually deleting every 
ref/changes/* ref from the Git repository on the server.  Some of these were 
under the "refs" directory, I think some were in info/refs, and I think some 
were in packed-refs.

Original comment by mdpo...@troilus.org on 14 Dec 2010 at 3:37

GoogleCodeExporter commented 9 years ago

Original comment by sop@google.com on 20 Jun 2011 at 3:02