[OE-core] [PATCH 6/8] oeqa.utils.metadata: add commit count information
Markus Lehtonen
markus.lehtonen at linux.intel.com
Wed Dec 28 13:02:42 UTC 2016
Makes it easier to put the commits into a timeline.
[YOCTO #10590]
Signed-off-by: Markus Lehtonen <markus.lehtonen at linux.intel.com>
---
meta/lib/oeqa/utils/metadata.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meta/lib/oeqa/utils/metadata.py b/meta/lib/oeqa/utils/metadata.py
index 2f7e8f2..d5cc290 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:
--
2.6.6
More information about the Openembedded-core
mailing list