]> sourceware.org Git - bunsen.git/commitdiff
R-show-testcases: compact hexsha in version field
authorSerhei Makarov <me@serhei.io>
Mon, 22 Aug 2022 17:36:45 +0000 (13:36 -0400)
committerSerhei Makarov <me@serhei.io>
Mon, 22 Aug 2022 17:37:48 +0000 (13:37 -0400)
bin/R-show-testcases

index 03c75d302d9035b2cd6e52ba1e0797ab55f01200..2a44504a99a48cad233e25592b40ee7d6c88dd5c 100755 (executable)
@@ -813,6 +813,9 @@ def show_testcase_grid(out, cube, expname, testcase_no=None):
     for v, _testruns in cube.iter_versions():
         # TODO: Add commit_url href to version.
         v.href = None
+        v.hexsha_short = None
+        if v.source_commit is not None:
+            v.hexsha_short = v.source_commit.hexsha[:7]
         versions.append(v)
     # TODO: Also collect baseline_versions.
     for sk in cube.iter_configurations(expname):
@@ -851,9 +854,12 @@ def show_testcase_grid(out, cube, expname, testcase_no=None):
 
 def show_version_header(v):
     # TODO Also consider extra_tag
+    value = v.version_id
+    if v.hexsha_short:
+        value = v.hexsha_short
     if v.href:
-        return f"<a href={v.href}>{v.version_id}</a>" # XXX HTML ONLY
-    return v.version_id
+        return f"<a href={v.href}>{value}</a>" # XXX HTML ONLY
+    return value
 
 def show_configuration_cell(value, field=None):
     if field == 'distro':
This page took 0.027878 seconds and 5 git commands to generate.