Couple<HgRevisionNumber> (@NotNull VirtualFile repo, @Nullable FilePath file, @Nullable HgRevisionNumber revision) { final List<HgRevisionNumber> revisions = getRevisions(repo, "parents", file, revision, true); return switch (revisions.size()) { case 1 -> Couple.of(revisions.get(0), null); case 2 -> Couple.of(revisions.get(0), revisions.get(1)); default -> Couple.of(null, null); }; }