protected void logCommand(@NotNull String operation, @Nullable List<String> arguments) {
    if (myProject.isDisposed()) {
      return;
    }
    String exeName = HgExecutableManager.getInstance().getHgExecutable(myProject);
    final int lastSlashIndex = exeName.lastIndexOf(File.separator);
    exeName = exeName.substring(lastSlashIndex + 1);

    @NonNls String str = String.format("%s %s %s", exeName, operation,
                                       arguments == null ? "" : StringUtil.escapeStringCharacters(StringUtil.join(arguments, " ")));
    //remove password from path before log
    final String cmdString = myDestination != null ? HgUtil.removePasswordIfNeeded(str) : str;
    // log command
    if (!myIsSilent) {
      LOG.info(cmdString);
      myVcs.showMessageInConsole(cmdString, ConsoleViewContentType.NORMAL_OUTPUT);
    }
    else {
      LOG.debug(cmdString);
    }
  }
protected void logCommand(@NotNull String operation, @Nullable List<String> arguments)