diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2012-05-28 13:57:12 +0100 |
---|---|---|
committer | Scott Garman <scott.a.garman@intel.com> | 2012-08-10 09:26:33 -0700 |
commit | 07b9c3bc67439d47627fe256796465520b533753 (patch) | |
tree | c31fbf7e62400228487d4a8c9b17464a2e6a92bb /scripts/buildhistory-diff | |
parent | a530aee6d9b2b63ab5fa780b1761eac759e8c833 (diff) | |
download | openembedded-core-07b9c3bc67439d47627fe256796465520b533753.tar.gz openembedded-core-07b9c3bc67439d47627fe256796465520b533753.tar.bz2 openembedded-core-07b9c3bc67439d47627fe256796465520b533753.zip |
scripts/buildhistory-diff: add GitPython version check
Display an error if the user does not have at least version 0.3.1 of
GitPython installed.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/buildhistory-diff')
-rwxr-xr-x | scripts/buildhistory-diff | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/buildhistory-diff b/scripts/buildhistory-diff index 9936a4b605..3f27eabcdb 100755 --- a/scripts/buildhistory-diff +++ b/scripts/buildhistory-diff @@ -7,16 +7,20 @@ import sys import os +from distutils.version import LooseVersion # Ensure PythonGit is installed (buildhistory_analysis needs it) try: import git except ImportError: - print("Please install PythonGit 0.3.1 or later in order to use this script") + print("Please install GitPython (python-git) 0.3.1 or later in order to use this script") sys.exit(1) - def main(): + if LooseVersion(git.__version__) < '0.3.1': + print("Version of GitPython is too old, please install GitPython (python-git) 0.3.1 or later in order to use this script") + sys.exit(1) + if (len(sys.argv) < 3): print("Report significant differences in the buildhistory repository") print("Syntax: %s <buildhistory-path> <since-revision> [to-revision]" % os.path.basename(sys.argv[0])) |