diff options
| -rw-r--r-- | meta/lib/oeqa/utils/metadata.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/lib/oeqa/utils/metadata.py b/meta/lib/oeqa/utils/metadata.py index 15ec190c4a..b320df67e0 100644 --- a/meta/lib/oeqa/utils/metadata.py +++ b/meta/lib/oeqa/utils/metadata.py | |||
| @@ -76,6 +76,10 @@ def git_rev_info(path): | |||
| 76 | info['commit_count'] = int(subprocess.check_output(["git", "rev-list", "--count", "HEAD"], cwd=path).decode('utf-8').strip()) | 76 | info['commit_count'] = int(subprocess.check_output(["git", "rev-list", "--count", "HEAD"], cwd=path).decode('utf-8').strip()) |
| 77 | except subprocess.CalledProcessError: | 77 | except subprocess.CalledProcessError: |
| 78 | pass | 78 | pass |
| 79 | try: | ||
| 80 | info['commit_time'] = int(subprocess.check_output(["git", "show", "--no-patch", "--format=%ct", "HEAD"], cwd=path).decode('utf-8').strip()) | ||
| 81 | except subprocess.CalledProcessError: | ||
| 82 | pass | ||
| 79 | return info | 83 | return info |
| 80 | try: | 84 | try: |
| 81 | repo = Repo(path, search_parent_directories=True) | 85 | repo = Repo(path, search_parent_directories=True) |
| @@ -83,6 +87,7 @@ def git_rev_info(path): | |||
| 83 | return info | 87 | return info |
| 84 | info['commit'] = repo.head.commit.hexsha | 88 | info['commit'] = repo.head.commit.hexsha |
| 85 | info['commit_count'] = repo.head.commit.count() | 89 | info['commit_count'] = repo.head.commit.count() |
| 90 | info['commit_time'] = repo.head.commit.committed_date | ||
| 86 | try: | 91 | try: |
| 87 | info['branch'] = repo.active_branch.name | 92 | info['branch'] = repo.active_branch.name |
| 88 | except TypeError: | 93 | except TypeError: |
