diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2017-01-13 15:12:42 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-19 22:47:22 +0000 |
commit | 28858af49fcc2a97957ba1e9c9e545980c47bfa9 (patch) | |
tree | aceabd771f4a96ac79bb3cd6e5b26f0bc1faafe2 /meta/lib/oeqa/utils/metadata.py | |
parent | ceed2c7eb51e7d5ff2c7bac2fed79742edeab5e4 (diff) | |
download | poky-28858af49fcc2a97957ba1e9c9e545980c47bfa9.tar.gz |
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>
Diffstat (limited to 'meta/lib/oeqa/utils/metadata.py')
-rw-r--r-- | meta/lib/oeqa/utils/metadata.py | 3 |
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): | |||
63 | pass | 63 | pass |
64 | 64 | ||
65 | def get_layers(layers): | 65 | def get_layers(layers): |
66 | """ Returns layer name, branch, and revision as OrderedDict. """ | 66 | """Returns layer information in dict format""" |
67 | from git import Repo, InvalidGitRepositoryError, NoSuchPathError | 67 | from git import Repo, InvalidGitRepositoryError, NoSuchPathError |
68 | 68 | ||
69 | layer_dict = OrderedDict() | 69 | layer_dict = OrderedDict() |
@@ -75,6 +75,7 @@ def get_layers(layers): | |||
75 | except (InvalidGitRepositoryError, NoSuchPathError): | 75 | except (InvalidGitRepositoryError, NoSuchPathError): |
76 | continue | 76 | continue |
77 | layer_dict[layer_name]['commit'] = repo.head.commit.hexsha | 77 | layer_dict[layer_name]['commit'] = repo.head.commit.hexsha |
78 | layer_dict[layer_name]['commit_count'] = repo.head.commit.count() | ||
78 | try: | 79 | try: |
79 | layer_dict[layer_name]['branch'] = repo.active_branch.name | 80 | layer_dict[layer_name]['branch'] = repo.active_branch.name |
80 | except TypeError: | 81 | except TypeError: |