public static @NotNull VirtualFile getHgRootOrThrow(Project project, VirtualFile file) throws VcsException {
    return getHgRootOrThrow(project, VcsUtil.getFilePath(file.getPath()));
  }
public static @NotNull VirtualFile getHgRootOrThrow(Project project, VirtualFile file)