This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository fateserver.

commit e8fbccc9e4f9c0e143242d179971487c486f877e
Author:     Kacper Michajłow <[email protected]>
AuthorDate: Tue Aug 11 23:59:25 2026 +0200
Commit:     Kacper Michajłow <[email protected]>
CommitDate: Thu Aug 13 00:25:24 2026 +0200

    index: add a branch selector
    
    Reports carry the branch since header version 1 and fate-recv.sh tracks
    the known branches. The UI mixed all branches into one table with no
    way to tell them apart. Add a line of links filtering by branch through
    the standard criteria mechanism, so it combines with sorting and other
    filters. Reports without a branch count as master, and release/ names
    are shortened the same way the branches file does.
    
    Signed-off-by: Kacper Michajłow <[email protected]>
---
 FATE.pm   |  4 ++++
 fate.css  |  8 ++++++++
 index.cgi | 36 ++++++++++++++++++++++++++++++++++++
 3 files changed, 48 insertions(+)

diff --git a/FATE.pm b/FATE.pm
index 6c1de15..1f7a946 100644
--- a/FATE.pm
+++ b/FATE.pm
@@ -70,6 +70,10 @@ sub split_header {
     } elsif ($hdr[1] ne '0') {
       return undef;
     }
+    # v0 reports have no branch field. Normalize the rest like the branches
+    # file fate-recv.sh keeps.
+    $parsed->{'branch'} = 'master' if not $parsed->{'branch'};
+    $parsed->{'branch'} =~ s,^release/,v,;
     return $parsed;
 }
 
diff --git a/fate.css b/fate.css
index cd73f6b..a9981d7 100644
--- a/fate.css
+++ b/fate.css
@@ -34,6 +34,14 @@
 .fate-alert { color: #911; }
 .rejoice { color: #191; }
 
+#branches a, #branches .branch-active {
+    margin-right: 0.8em;
+}
+
+#branches .branch-active {
+    font-weight: bold;
+}
+
 #failometer {
     padding: 0;
 }
diff --git a/index.cgi b/index.cgi
index d33fb1c..f41d507 100755
--- a/index.cgi
+++ b/index.cgi
@@ -59,6 +59,7 @@ closedir D;
 my @reps;
 my $allpass = 0;
 my $allfail = 0;
+my %branch_seen;
 
 for my $slot (@slots) {
     ($slot) = $slot =~ /^([A-Za-z0-9_\-.]{1,80})\z/ or next;
@@ -66,6 +67,8 @@ for my $slot (@slots) {
     my $rep = load_summary $slot, 'latest' or next;
     next if time - parse_date($$rep{date}) > $hidden_age;
 
+    $branch_seen{$$rep{branch}}++;
+
     my $not_matched = 0;
     $$rep{subarch} = $$rep{arch} if not $$rep{subarch};
     for my $this_query (@queries) {
@@ -221,6 +224,39 @@ head2;
 print "FATE\n";
 head3;
 
+sub branch_cmp {
+    my $r = ($b eq 'master') <=> ($a eq 'master');
+    return $r if $r;
+    my @av = $a =~ /(\d+)/g;
+    my @bv = $b =~ /(\d+)/g;
+    while (@av or @bv) {
+        $r = (shift(@bv) || 0) <=> (shift(@av) || 0);
+        return $r if $r;
+    }
+    return $a cmp $b;
+}
+
+# Branch selector, not shown when only single branch reports are available.
+my ($cur_branch) = map $$_[1], grep $$_[0] eq 'branch', @queries;
+my @branches = sort branch_cmp keys %branch_seen;
+if (@branches > 1) {
+    start 'p', id => 'branches';
+    print 'Branch: ';
+    for my $branch ('all', @branches) {
+        my @rest = grep $$_[0] ne 'branch', @queries;
+        my $active = defined $cur_branch ? $branch eq $cur_branch : $branch eq 
'all';
+        if ($active) {
+            span encode_entities($branch, '<>&"'), class => 'branch-active';
+        } else {
+            anchor encode_entities($branch, '<>&"'),
+                href => '?' . join '&amp;', other_params(),
+                    query_params(@rest, $branch eq 'all' ? () : ['branch', 
$branch]);
+        }
+        print "\n";
+    }
+    end 'p';
+}
+
 if (@queries) {
     start 'p';
     print 'Search patterns: ';

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to