void (@NotNull final String branchName, @NotNull final List<HgRepository> repositories, @NotNull final HgRepository selectedRepository) { try { final CommitCompareInfo myCompareInfo = loadCommitsToCompare(repositories, branchName); ApplicationManager.getApplication().invokeLater(() -> displayCompareDialog(branchName, getCurrentBranchOrRev(repositories), myCompareInfo, selectedRepository)); } catch (VcsException e) { VcsNotifier.getInstance(myProject).notifyError(COMPARE_WITH_BRANCH_ERROR, HgBundle.message("hg4idea.branch.compare.error"), e.getMessage()); } }