From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: [PATCH OSSTEST] sg-report-job-history: alternate color of osstest column only when it changes Date: Wed, 6 Jan 2016 11:08:43 +0000 Message-ID: <1452078523-19830-1-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: ian.jackson@eu.citrix.com, xen-devel@lists.xen.org Cc: Ian Campbell List-Id: xen-devel@lists.xenproject.org Currently the bgcolor of the osstest column alternates on each line, rather than only when it changes as the other revision columns do. A given flight might touch multiple osstest revisions (although in practice they rarely do) but it seems reasonable to simply consider any change as a change. Signed-off-by: Ian Campbell --- sg-report-job-history | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sg-report-job-history b/sg-report-job-history index 0e2a3f9..e2e5806 100755 --- a/sg-report-job-history +++ b/sg-report-job-history @@ -234,6 +234,7 @@ END my @last_revs; my @alt_revs; my $alt_hosts; + my $alt_osstest; foreach my $r (@test_rows) { my $altcolour= report_altcolour($alternate); print H ""; @@ -254,16 +255,15 @@ END my $hosts_colour = report_altchangecolour(\$alt_hosts, $hosts); print H "".encode_entities($hosts)."\n"; $osstestverq->execute($r->{Flight}{flight}); - print H - "", - (join ' ', + my $osstestrevs = join ' ', map { $_ = $_->{harness}; s/^([0-9a-f]{12})[0-9a-f]+\b/$1/; "".encode_entities($_).""; } - @{ $osstestverq->fetchall_arrayref({}) }), - "\n"; + @{ $osstestverq->fetchall_arrayref({}) }; + my $osstest_colour = report_altchangecolour(\$alt_osstest, $osstestrevs); + print H "$osstestrevs\n"; foreach my $i (0..$#rev_grid_cols) { my $v= $r->{Revisions}[$i]; my $rev_colour = report_altchangecolour(\$alt_revs[$i], $v); -- 2.6.1