summaryrefslogtreecommitdiff
path: root/contrib/hg-to-git/hg-to-git.py
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-01-09 08:25:47 -0800
committerJunio C Hamano <gitster@pobox.com>2013-01-09 08:25:48 -0800
commit48b7f524550ad46db95ec097e7f085160073a247 (patch)
treef46c13a0011afb2bd659011076721b1dc0cb154a /contrib/hg-to-git/hg-to-git.py
parent00f1a867b4dde5065a579286a4de880142548bb2 (diff)
parenta33faf2827bfc7baea5d83ef1be8fe659a963355 (diff)
downloadgit-48b7f524550ad46db95ec097e7f085160073a247.tar.gz
Merge branch 'er/python-version-requirements'
Some python scripts we ship cannot be run with older versions of the interpreter. * er/python-version-requirements: Add checks to Python scripts for version dependencies.
Diffstat (limited to 'contrib/hg-to-git/hg-to-git.py')
-rwxr-xr-xcontrib/hg-to-git/hg-to-git.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/hg-to-git/hg-to-git.py b/contrib/hg-to-git/hg-to-git.py
index 046cb2b268..232625a7b7 100755
--- a/contrib/hg-to-git/hg-to-git.py
+++ b/contrib/hg-to-git/hg-to-git.py
@@ -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