From fded9e62af50cd7b1034a3bf80d5282fda110ba4 Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Sat, 28 Jan 2012 20:47:01 +0100 Subject: [PATCH] logdiff now support bzipped logs for logdiff --- src/lib/Hydra/Controller/API.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/Hydra/Controller/API.pm b/src/lib/Hydra/Controller/API.pm index 42e6e586..07e46b2b 100644 --- a/src/lib/Hydra/Controller/API.pm +++ b/src/lib/Hydra/Controller/API.pm @@ -233,7 +233,9 @@ sub scmdiff : Chained('api') PathPart('scmdiff') Args(0) { sub readNormalizedLog { my ($file) = @_; - my $res = read_file($file); + my $pipe = (-f "$file.bz2" ? "cat $file | bzip2 -d" : "cat $file") ; + my $pipe = (-f "$file.bz2" ? "cat $file.bz2 | bzip2 -d" : "cat $file") ; + my $res = `$pipe`; $res =~ s/\/nix\/store\/[a-z0-9]*-/\/nix\/store\/...-/g; $res =~ s/nix-build-[a-z0-9]*-/nix-build-...-/g;