void (@NotNull HgRepository repository, @NotNull Hash commit) { String revision = commit.asString(); Project project = repository.getProject(); BackgroundTaskUtil.executeOnPooledThread(repository, () -> { HgCommandExecutor executor = new HgCommandExecutor(project); HgCommandResult result = executor.executeInCurrentThread(repository.getRoot(), "qfinish", singletonList("qbase:" + revision)); if (HgErrorUtil.hasErrorsInCommandExecution(result)) { new HgCommandResultNotifier(project).notifyError(QFINISH_ERROR, result, HgBundle.message("action.hg4idea.QFinish.error"), HgBundle.message("action.hg4idea.QFinish.error.msg")); } repository.update(); }); }