Ui.Task bookkeepOneMigrationTask = AppContext.RUN.ui.pushTask(
"bookkeping_one_migration",
String.format("Doing bookkeeping between '%s' and '%s' for migration '%s'",
m.getFromRepository(), m.getToRepository(), m.getName()));
TranslatorConfig migrationTranslator =
getTranslatorConfig(m.getFromRepository(), m.getToRepository(), context);
// TODO(user): ? Switch the order of these two checks, so that we don't have to look back
// through the history for irrelevant equivalences if there's one at head.
Ui.Task checkMigrationsTask = AppContext.RUN.ui.pushTask(
"check_migrations",
String.format(
"Checking completed migrations for new equivalence between '%s' and '%s'",
m.getFromRepository(), m.getToRepository()));
updateCompletedMigrations(
m.getFromRepository(), m.getToRepository(), db, context,
migrationTranslator.isInverse());
AppContext.RUN.ui.popTask(checkMigrationsTask, "");
// Skip head-equivalence checking for inverse translation -- assume it will be performed via
// the forward-translated migration.
if (!migrationTranslator.isInverse()) {
Ui.Task checkHeadsTask = AppContext.RUN.ui.pushTask(
"check_heads",
String.format(
"Checking head equivalence between '%s' and '%s'",
m.getFromRepository(), m.getToRepository()));