boolean (@Nullable VirtualFile repo, @NotNull @NonNls String operation, @Nullable List<@NonNls String> arguments, boolean ignoreDefaultOptions, @NotNull HgLineProcessListener listener) { if (myProject == null || myProject.isDisposed() || myVcs == null) return false; if (!myProject.isDefault() && !TrustedProjects.isTrusted(myProject)) { throw new IllegalStateException("Shouldn't be possible to run a Hg command in the safe mode"); } ShellCommand shellCommand = createShellCommandWithArgs(repo, operation, arguments, ignoreDefaultOptions); try { long startTime = System.currentTimeMillis(); LOG.debug(String.format("hg %s started", operation)); shellCommand.execute(myShowOutput, myIsBinary, listener); LOG.debug(String.format("hg %s finished. Took %s ms", operation, System.currentTimeMillis() - startTime)); return true; } catch (ShellCommandException e) { processError(e); return false; } }