[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH 3/3] cs-bisection-step: Mark which revision(s) changed in each node



We compare the revision rtuple elements with each of the parents, and
mark changes by surrounding the revision id with *asterisks*.

In the SVG output, we have to strip these when generating the URL, and
we can show this by emboldening the relevant revision instead.  This
involves changing the ther output to be of normal weight by deleting
the emboldening output by dot.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 README.bisection  |    3 +++
 cs-bisection-step |   27 +++++++++++++++++++++------
 2 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/README.bisection b/README.bisection
index 8ea3d3e..ae8a1aa 100644
--- a/README.bisection
+++ b/README.bisection
@@ -159,6 +159,9 @@ revision) or blue (if the attempt with that particular 
revision tuple
 was inconclusive because the test step being bisected was blocked by
 an earlier failure).
 
+The revision(s) which changed compared to the parent(s) are marked
+with asterisks, or in bold.
+
 The revision being fingered (or, when the bisector is running, the
 next revision to test) is highlighed with a double boundary.
 
diff --git a/cs-bisection-step b/cs-bisection-step
index 841a46a..e51babd 100755
--- a/cs-bisection-step
+++ b/cs-bisection-step
@@ -928,9 +928,18 @@ END
 sub gnodename ($) {
     my ($n) = @_;
 
-    my $lab= $n->{Rtuple};
-    $lab =~ s/(\S{12})\S+/$1/g;
-    $lab =~ s/ /,/g;
+    my @lab = split / /, $n->{Rtuple};
+    foreach (my $i=0; $i<@lab; $i++) {
+       my $lab = $lab[$i];
+       $lab = substr $lab, 0, 12;
+       $lab = "*$lab*"
+           if grep {
+               my @ptuple = split / /, $_->{Rtuple};
+               $ptuple[$i] ne $lab[$i];
+           } @{ $n->{Parents} };
+       $lab[$i] = $lab;
+    }
+    my $lab = join ",", @lab;
 
     my $fs= $n->{Flights};
     if ($fs) {
@@ -1034,18 +1043,24 @@ END
        open SVGO, ">", "$graphfile.svg.new" or die "$graphfile.svg.new $!";
        while (<SVGI>) {
            if (m/^\<text/) {
-               if (m/(?<=\>)[0-9a-f]{12}(?:,[0-9a-f]{12})*(?=\<)/) {
+               if (m/(?<=\>)\*?[0-9a-f]{12}\*?(?:,\*?[0-9a-f]{12}\*?)*(?=\<)/) 
{
                    my ($l,$r) = ($`,$'); #');
                    my @commits = split /\,/, $&;
                    my @ocommits;
                    for (my $i=0; $i<@commits; $i++) {
-                       my $url = "$treeinfos[$i]{Url}#$commits[$i]";
+                       my $commit = $commits[$i];
+                       $commit =~ s#\*##g;
+                       my $url = "$treeinfos[$i]{Url}#$commit";
+                       my $show = $commits[$i];
+                       $show =~ s#^\*#<tspan font-weight="bolder">#;
+                       $show =~ s#\*$#</tspan>#;
                        push @ocommits, "<a xlink:href=\"".
                            encode_entities($url).
                            "\">".
-                           $commits[$i].
+                           $show.
                            "</a>";
                    }
+                   $l =~ s# font-weight="bold" # #;
                    $_ = $l.(join ",", @ocommits).$r;
                } elsif (m/(?<=\>)\d+:[-a-z]+(?: \d+:[-a-z]+)*(?=\<)/) {
                    my ($l,$r) = ($`,$'); #');
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.