@Deprecated
  @RequiresEdt
  public static @Nullable HgRepository getCurrentRepository(@NotNull Project project) {
    if (project.isDisposed()) return null;
    return DvcsUtil.guessRepositoryForFile(project, getRepositoryManager(project),
                                           DvcsUtil.getSelectedFile(project),
                                           HgProjectSettings.getInstance(project).getRecentRootPath());
  }
@Deprecated
  @RequiresEdt
  public static @Nullable HgRepository getCurrentRepository(@NotNull Project project)