6,534
edits
Changes
→Source code: updated the scripts
<small><source lang="bash">
#!/bin/sh
# Whose patches to count
#PAT='@openvz.org|@parallels.com|@sw.ru|@swsoft.com|@sw.com.sg|kuznet@'#PAT='@openvz.org|@parallels.com|@sw.ru|@swsoft.com|@sw.com.sg|adobriyan@|kuznet@|gorcunov@'PAT='@openvz.org|@parallels.com|@sw.ru|@swsoft.com|@sw.com.sg|kuznet@|gorcunov@'
# Return the date of the given tag, in a format usable by gnuplot
get_tag_date() {
sed 's/ ..:..:..//' | sed 's/ /-/g'
}
# Count the number of patches whose authors match $PAT,
# for the period between two given git tags
egrep '^Author: ' | egrep $PAT | wc -l
}
# Find out if number of patches for HEAD is much more
# than for latest -rc. If yes, use HEAD, otherwise -rc.:last_rc=$(git tag | tail describe -n 1 | grep -- -rcabbrev=0)
HEAD=$last_rc
if ! test -z "$last_rc"; then
much_more=1510 count_head=$(count_patches v3.$latest latest3 HEAD) count_rc=$(count_patches v3.$latest latest3 $last_rc)
if test $count_head -gt $((count_rc+much_more)); then
HEAD="HEAD "
fi
fi
fi
pd=$(get_tag_date $pv) d2d=$(get_tag_date $v2v) countcount_ours=$(count_patches $v1 pv $v2v) count_total=$(count_total_patches $pv $v) if test "$countcount_ours" -gt 0; then echo $d2 d $v2 v " " $countcount_ours $count_total
fi
done | sed 's/ /\t/g'
</source></small>
<small><source lang="bash">
#!/bin/sh
REPO=~/git/linux/.git
COUNT=$(pwd)/count
OUT=$(pwd)/time.dat
export GDFONTPATH=/usr/share/fonts/microsoft
export GIT_DIR=$REPO
if test "$1" != "-f"; then
fi
DATE=$(tail -n 1 time.dat $OUT | cut -f 1 | awk -F- '{print $2,$1,$3}')MAXY=$(awk 'BEGIN {max=0}; ($3 > max) {max=$3}; END {print max+5080}' < time.dat)
# GNU date is powerful!
MAXX=$(date +%b-1-%Y --date='+2 months')
cat << EOF | gnuplot > plot.png
set terminal png enhanced font "verdanabverdana,2013" size 1600,1200#set terminal png enhanced transparent font "verdanab,14" size 1200,600#set terminal svg enhanced font "verdanab,8" size 800,600
set title "OpenVZ team kernel patches progress as of ${DATE}"
set ytics nomirror # no tics at right
plot 'time.dat${OUT}' using 1:3 with linespoints pt 6 ps 1 lw 2 lt 2 notitle, \ '' using 1:3:2 with labels left offset 0,1 5.5 rotate notitle, \
'' using 1:3:3 with labels left offset 0.7,0 notitle
EOF
</source></small>