oeqa.utils.metadata: add commit count information
Makes it easier to put the commits into a timeline. [YOCTO #10590] (From OE-Core rev: 7757970bced4ecd6503991c0cf11f4d9158f650c) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
ceed2c7eb5
commit
28858af49f
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue