Log warning on 'change state corrupt' error

When a 'change state corrupt' error occurs at
least a warning should always be logged so that
a Gerrit administrator has a chance to investigate
this error.

Change-Id: Iebe49f34ea9bc3668bfb7cd96406ae963eeefc85
Signed-off-by: Edwin Kempin <edwin.kempin@gmail.com>
This commit is contained in:
Edwin Kempin
2011-02-04 10:35:39 +01:00
parent 51d0c163dc
commit cf8450556b

View File

@@ -1077,6 +1077,7 @@ public class ReceiveCommits implements PreReceiveHook, PostReceiveHook {
final PatchSet.Id priorPatchSet = change.currentPatchSetId();
for (final PatchSet ps : db.patchSets().byChange(request.ontoChange)) {
if (ps.getRevision() == null) {
log.warn("Patch set " + ps.getId() + " has no revision");
reject(request.cmd, "change state corrupt");
return null;
}