void (@NotNull AnActionEvent e) { final Project project = e.getRequiredData(CommonDataKeys.PROJECT); VcsLogCommitSelection selection = e.getRequiredData(VcsLogDataKeys.VCS_LOG_COMMIT_SELECTION); selection.requestFullDetails(selectedDetails -> { VcsFullCommitDetails fullCommitDetails = ContainerUtil.getFirstItem(selectedDetails); assert fullCommitDetails != null; final HgRepository repository = getRepositoryForRoot(project, fullCommitDetails.getRoot()); assert repository != null; actionPerformed(repository, fullCommitDetails); }); }