public static boolean createRepository(@NotNull Project project, @NotNull final VirtualFile selectedRoot) {
    HgCommandResult result = new HgInitCommand(project).execute(selectedRoot.getPath());
    if (!HgErrorUtil.hasErrorsInCommandExecution(result)) {
      VcsNotifier.getInstance(project)
        .notifySuccess(REPO_CREATED,
                       HgBundle.message("hg4idea.init.created.notification.title"),
                       HgBundle.message("hg4idea.init.created.notification.description", selectedRoot.getPresentableUrl()));
      return true;
    }
    else {
      new HgCommandResultNotifier(project.isDefault() ? null : project)
        .notifyError(REPO_CREATION_ERROR,
                     result,
                     HgBundle.message("hg4idea.init.error.title"),
                     HgBundle.message("hg4idea.init.error.description", selectedRoot.getPresentableUrl()));
      return false;
    }
  }
public static boolean createRepository(@NotNull Project project, @NotNull final VirtualFile selectedRoot)