mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 12:59:02 +02:00
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. (From OE-Core rev: 07b9c3bc67439d47627fe256796465520b533753) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
75b7901f22
commit
6631752c25
|
@ -7,16 +7,20 @@
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
from distutils.version import LooseVersion
|
||||||
|
|
||||||
# Ensure PythonGit is installed (buildhistory_analysis needs it)
|
# Ensure PythonGit is installed (buildhistory_analysis needs it)
|
||||||
try:
|
try:
|
||||||
import git
|
import git
|
||||||
except ImportError:
|
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)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
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):
|
if (len(sys.argv) < 3):
|
||||||
print("Report significant differences in the buildhistory repository")
|
print("Report significant differences in the buildhistory repository")
|
||||||
print("Syntax: %s <buildhistory-path> <since-revision> [to-revision]" % os.path.basename(sys.argv[0]))
|
print("Syntax: %s <buildhistory-path> <since-revision> [to-revision]" % os.path.basename(sys.argv[0]))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user