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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user