* processMigration() on each.
*/
private static void updateCompletedMigrations(
String fromRepository, String toRepository, Db db, ProjectContext context, boolean inverse) {
RevisionHistory toHistory = context.repositories.get(toRepository).revisionHistory;
EquivalenceMatchResult equivMatch = toHistory.findRevisions(
null /*revision*/,
new EquivalenceMatcher(fromRepository, db));
List<Revision> linearToRevs = equivMatch.getRevisionsSinceEquivalence().getLinearHistory();
AppContext.RUN.ui.info(String.format(
"Found %d revisions in %s since equivalence (%s): %s",
linearToRevs.size(),
toRepository,
equivMatch.getEquivalences(),
Joiner.on(", ").join(linearToRevs)));
for (Revision toRev : linearToRevs) {
String fromRevId = getMigratedRevId(toHistory.getMetadata(toRev));
if (fromRevId != null) {
processMigration(new Revision(fromRevId, fromRepository), toRev, db, context, inverse);
}
}
}