Browse Source

oeqa.utils.metadata: rename 'revision' to 'commit'

Revision is a bit vague and could point to a tag, for example. Git
commit objects are unambiguous and persistent so be explicit that the
element should contain git commit hash.

[YOCTO #10590]

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Markus Lehtonen 7 years ago
parent
commit
a6521b89e8
2 changed files with 2 additions and 2 deletions
  1. 1 1
      meta/lib/oeqa/utils/metadata.py
  2. 1 1
      scripts/oe-selftest

+ 1 - 1
meta/lib/oeqa/utils/metadata.py

@@ -74,7 +74,7 @@ def get_layers(layers):
             repo = Repo(layer, search_parent_directories=True)
         except (InvalidGitRepositoryError, NoSuchPathError):
             continue
-        layer_dict[layer_name]['revision'] = repo.head.commit.hexsha
+        layer_dict[layer_name]['commit'] = repo.head.commit.hexsha
         try:
             layer_dict[layer_name]['branch'] = repo.active_branch.name
         except TypeError:

+ 1 - 1
scripts/oe-selftest

@@ -631,7 +631,7 @@ def main():
             layer_info = ''
             for layer, values in metadata['layers'].items():
                 layer_info = '%s%-17s = %s:%s\n' % (layer_info, layer,
-                              values.get('branch', '(nogit)'), values.get('revision', '0'*40))
+                              values.get('branch', '(nogit)'), values.get('commit', '0'*40))
             msg = 'Selftest for build %s of %s for machine %s on %s\n\n%s' % (
                    log_prefix[12:], metadata['distro']['pretty_name'],
                    metadata['machine'], metadata['hostname'], layer_info)