void (@NotNull HgRepository repository, @NotNull String oldName, @NotNull String newName) { if (oldName.equals(newName)) return; Project project = repository.getProject(); BackgroundTaskUtil.executeOnPooledThread(repository, () -> { HgCommandExecutor executor = new HgCommandExecutor(project); HgCommandResult result = executor.executeInCurrentThread(repository.getRoot(), "qrename", Arrays.asList(oldName, newName)); if (HgErrorUtil.hasErrorsInCommandExecution(result)) { new HgCommandResultNotifier(project).notifyError(QRENAME_ERROR, result, HgBundle.message("action.hg4idea.QRename.error"), HgBundle.message("action.hg4idea.QRename.error.msg", oldName, newName)); } repository.update(); }); }