diff --git a/hg-fast-export.sh b/hg-fast-export.sh index 81339ab..7d6d7b7 100755 --- a/hg-fast-export.sh +++ b/hg-fast-export.sh @@ -45,6 +45,14 @@ if [ -z "${PYTHON}" ]; then exit 1 fi +"${PYTHON}" -c 'import sys; exit(sys.version_info.major==3 and sys.version_info.minor >= 7)' + +if [ $? -eq 0 ]; then + echo "Could not find an interpreter for a supported Python version (>= 3.7)" \ + "Please use the 'PYTHON' environment variable to specify the interpreter to use." + exit 1 +fi + USAGE="[--quiet] [-r ] [--force] [--ignore-unnamed-heads] [-m ] [-s] [--hgtags] [-A ] [-B ] [-T ] [-M ] [-o ] [--hg-hash] [-e ]" LONG_USAGE="Import hg repository up to either tip or If is omitted, use last hg repository as obtained from state file,