summaryrefslogtreecommitdiff
path: root/meta/lib/oeqa
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2017-01-13 15:12:42 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-19 22:45:45 +0000
commit7757970bced4ecd6503991c0cf11f4d9158f650c (patch)
tree5e9a0884616acaa32ef3eb0d2427e43756d6e059 /meta/lib/oeqa
parenta6521b89e86ddba6bd646dd3974d7b0390323b56 (diff)
downloadopenembedded-core-7757970bced4ecd6503991c0cf11f4d9158f650c.tar.gz
openembedded-core-7757970bced4ecd6503991c0cf11f4d9158f650c.tar.bz2
openembedded-core-7757970bced4ecd6503991c0cf11f4d9158f650c.zip
oeqa.utils.metadata: add commit count information
Makes it easier to put the commits into a timeline. [YOCTO #10590] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r--meta/lib/oeqa/utils/metadata.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/lib/oeqa/utils/metadata.py b/meta/lib/oeqa/utils/metadata.py
index 2f7e8f2d08..d5cc2906b1 100644
--- a/meta/lib/oeqa/utils/metadata.py
+++ b/meta/lib/oeqa/utils/metadata.py
@@ -63,7 +63,7 @@ def metadata_from_data_store(d):
pass
def get_layers(layers):
- """ Returns layer name, branch, and revision as OrderedDict. """
+ """Returns layer information in dict format"""
from git import Repo, InvalidGitRepositoryError, NoSuchPathError
layer_dict = OrderedDict()
@@ -75,6 +75,7 @@ def get_layers(layers):
except (InvalidGitRepositoryError, NoSuchPathError):
continue
layer_dict[layer_name]['commit'] = repo.head.commit.hexsha
+ layer_dict[layer_name]['commit_count'] = repo.head.commit.count()
try:
layer_dict[layer_name]['branch'] = repo.active_branch.name
except TypeError: