summaryrefslogtreecommitdiff
path: root/contrib/hg-to-git
diff options
context:
space:
mode:
authorLibravatar Eric S. Raymond <esr@thyrsus.com>2012-12-28 11:40:59 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-12-28 11:35:04 -0800
commita33faf2827bfc7baea5d83ef1be8fe659a963355 (patch)
tree30f2ad5df3b32acdf5e84f7b81cfdf23ea42a236 /contrib/hg-to-git
parentRemove duplicate entry in ./Documentation/Makefile (diff)
downloadtgif-a33faf2827bfc7baea5d83ef1be8fe659a963355.tar.xz
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>
Diffstat (limited to 'contrib/hg-to-git')
-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