Do not fail if change has no revisions
If a change has no revisions this failed on change update with
com.google.gwtorm.server.OrmException: insert failure on changes
at com.google.gwtorm.schema.sql.SqlDialect.convertError(SqlDialect.java:158)
at com.google.gwtorm.schema.sql.DialectMySQL.convertError(DialectMySQL.java:232)
at com.google.gwtorm.jdbc.JdbcAccess.convertError(JdbcAccess.java:459)
at com.google.gwtorm.jdbc.JdbcAccess.insert(JdbcAccess.java:170)
at com.google.gwtorm.jdbc.JdbcAccess.upsert(JdbcAccess.java:332)
at com.googlesource.gerrit.plugins.importer.ReplayChangesStep.upsertChange(ReplayChangesStep.java:214)
at com.googlesource.gerrit.plugins.importer.ReplayChangesStep.replayChange(ReplayChangesStep.java:163)
at com.googlesource.gerrit.plugins.importer.ReplayChangesStep.replay(ReplayChangesStep.java:133)
at com.googlesource.gerrit.plugins.importer.ImportProject.apply(ImportProject.java:239)
at com.googlesource.gerrit.plugins.importer.ImportProject.apply(ImportProject.java:174)
...
Caused by: java.sql.BatchUpdateException: Column 'subject' cannot be null
...
Ignore changes without revisions and log them as a warning.
Change-Id: Ib368931a427a58485e6e68014f9b4d1441949206
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
1 file changed