Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2012-12-28 20:40:59 +0400
committerJunio C Hamano <gitster@pobox.com>2012-12-28 23:35:04 +0400
commita33faf2827bfc7baea5d83ef1be8fe659a963355 (patch)
tree30f2ad5df3b32acdf5e84f7b81cfdf23ea42a236 /contrib/hg-to-git
parent18499ba694711c02a5bc729b7f8e362dd760b10a (diff)
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