Add checks to Python scripts for version dependencies.

Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Eric S. Raymond
2012-12-28 11:40:59 -05:00
committed by Junio C Hamano
parent 18499ba694
commit a33faf2827
8 changed files with 44 additions and 3 deletions

View File

@ -23,6 +23,11 @@ import os, os.path, sys
import tempfile, pickle, getopt
import re
if sys.hexversion < 0x02030000:
# The behavior of the pickle module changed significantly in 2.3
sys.stderr.write("hg-to-git.py: requires Python 2.3 or later.\n")
sys.exit(1)
# Maps hg version -> git version
hgvers = {}
# List of children for each hg revision