From 224342aef880611f104f504827621361cf6906e7 Mon Sep 17 00:00:00 2001 From: Wolfram Sang Date: Fri, 14 Dec 2018 15:13:38 +0100 Subject: scripts/periupport_conv: add sorting of commits Makes it easier to find e.g. corresponding comments to commits. Signed-off-by: Wolfram Sang --- scripts/periupport_conv | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/periupport_conv b/scripts/periupport_conv index 02688e5..3de4d3d 100755 --- a/scripts/periupport_conv +++ b/scripts/periupport_conv @@ -37,6 +37,9 @@ gawk -F: -v dst="$DST" -v cmd="$uuid_cmd" ' cmd | getline uuid; close(cmd); F=dst "/" nam ".yaml" + delete(sorted_idx) + asorti(tasks[task], sorted_idx) + print "title: \"Upport " task "\"" > F print "team: MM" >> F print "key: " uuid >> F @@ -45,21 +48,24 @@ gawk -F: -v dst="$DST" -v cmd="$uuid_cmd" ' print "relationships:\n" >> F print "bsp-commits:\n" >> F - for (commit in tasks[task]) { + for (idx in sorted_idx) { + commit = tasks[task][sorted_idx[idx]] print " -" commit >> F print " # " bsp_desc[commit] >> F } print "" >> F print "upstream:" >> F - for (commit in tasks[task]) { + for (idx in sorted_idx) { + commit = tasks[task][sorted_idx[idx]] if (upstream[commit]) print " - torvalds:" upstream[commit] " # " upstream_desc[commit] >> F } print "" >> F print "comments:" >> F - for (commit in tasks[task]) { + for (idx in sorted_idx) { + commit = tasks[task][sorted_idx[idx]] if (comment[commit]) print " - \"" substr(commit, 2) ":" substr(comment[commit], 2) "\"" >> F } -- cgit v1.2.3