public static @Nullable VirtualFile getHgRootOrNull(Project project, @NotNull VirtualFile file) {
    return getHgRootOrNull(project, VcsUtil.getFilePath(file.getPath()));
  }
public static @Nullable VirtualFile getHgRootOrNull(Project project, @NotNull VirtualFile file)