The branch, master has been updated via 217e2f191de232a5059afa39cd48278d9ecf704c (commit) from b74b380bafe68b8df58da153f2fc7be6457e7ab4 (commit)
- Log ----------------------------------------------------------------- commit 217e2f191de232a5059afa39cd48278d9ecf704c Author: Timothy Gu <timothyg...@gmail.com> AuthorDate: Sun Apr 12 03:53:36 2015 +0200 Commit: Michael Niedermayer <michae...@gmx.at> CommitDate: Sun Apr 12 03:53:36 2015 +0200 Support parsing version 1 headers diff --git a/FATE.pm b/FATE.pm index 544e80f..30c220b 100644 --- a/FATE.pm +++ b/FATE.pm @@ -47,7 +47,7 @@ our $gitweb = "http://git.videolan.org/?p=ffmpeg.git"; sub split_header { my @hdr = split /:/, $_[0]; $hdr[0] eq 'fate' or return undef; - return { + my $parsed = { version => $hdr[1], date => $hdr[2], slot => $hdr[3], @@ -56,6 +56,11 @@ sub split_header { errstr => $hdr[6], comment => $hdr[7], }; + if ($hdr[1] eq '1') { + $parsed->{'comment'} = $hdr[8]; + $parsed->{'branch'} = $hdr[7]; + } + return $parsed; } sub split_config { @@ -132,7 +137,7 @@ sub load_report { my $hdr = split_header scalar <R> or return; my $conf = split_config scalar <R> or return; - $$hdr{version} eq '0' or return undef; + $$hdr{version} eq '0' or $$hdr{version} eq '1' or return undef; while (<R>) { my $rec = split_rec $_; diff --git a/fate-recv.sh b/fate-recv.sh index e16e024..75161d7 100755 --- a/fate-recv.sh +++ b/fate-recv.sh @@ -32,9 +32,16 @@ cd $reptmp tar xzk header=$(head -n1 report) -date=$(expr "$header" : 'fate:0:\([0-9]*\):') -slot=$(expr "$header" : 'fate:0:[0-9]*:\([A-Za-z0-9_.-]*\):') -rev=$(expr "$header" : "fate:0:$date:$slot:\([A-Za-z0-9_.-]*\):") +# Can't use expr on this one because $version might be 0 +version=$(echo "$header" | sed "s/^fate:\([0-9]*\):.*/\1/") +date=$(expr "$header" : "fate:$version:\([0-9]*\):") +slot=$(expr "$header" : "fate:$version:$date:\([A-Za-z0-9_.-]*\):") +rev=$(expr "$header" : "fate:$version:$date:$slot:\([A-Za-z0-9_.-]*\):") +branch=master +if [ $version -eq 1 ]; then + branch=$(expr "$header" : "fate:$version:$date:$slot:$rev:[0-9]*:[ A-Za-z0-9_.-]*:\([A-Za-z0-9_.-\/]*\):") + branch=$(echo "$branch" | sed 's,^release/,v,') +fi test -n "$date" && test -n "$slot" || die "Invalid report header" ----------------------------------------------------------------------- Summary of changes: FATE.pm | 9 +++++++-- fate-recv.sh | 13 ++++++++++--- 2 files changed, 17 insertions(+), 5 deletions(-) hooks/post-receive -- _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog