1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-11-26 15:49:43 +02:00

Only use commits that change anything we care about. Accelerates full build

of ben-wpan/atrf by 70%, build from cache by 35%.

- scripts/schhist2web: only extract commits that change a .pro, .sch, or
  .lib file
- scripts/schhist2web: when building the differences, skip commits missing
  in cache
- scripts/schhist2web: use last cached commit as head instead of asking git
  for the current HEAD
This commit is contained in:
Werner Almesberger 2010-08-27 14:11:54 -03:00
parent 94dc35ed98
commit 43d512c30a

View File

@ -122,8 +122,11 @@ $no_cache && rm -rf "$cache"
mkdir -p "$out/names" mkdir -p "$out/names"
mkdir -p "$cache" mkdir -p "$cache"
head=
for n in $first `git rev-list --reverse $first..HEAD`; do for n in $first `git rev-list --reverse $first..HEAD`; do
echo Processing $n git show --pretty=format:'' --name-only $n |
egrep -q '\.sch$|\.pro$|\.lib$' || continue
echo Processing $n
new=`gitenealogy "$dir/$sch" | sed "/^$n /s///p;d"` new=`gitenealogy "$dir/$sch" | sed "/^$n /s///p;d"`
if [ ! -z "$new" ]; then if [ ! -z "$new" ]; then
echo Name change $schname to $new 1>&2 echo Name change $schname to $new 1>&2
@ -141,8 +144,14 @@ echo Processing $n
touch "$out/names/"`basename "$m" .ppm` touch "$out/names/"`basename "$m" .ppm`
done done
trap 0 trap 0
head=$n
done done
if [ -z "$head" ]; then
echo "no usable head found" 2>&1
exit 1
fi
index="$out/index.html" index="$out/index.html"
cat <<EOF >"$index" cat <<EOF >"$index"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
@ -155,9 +164,9 @@ for m in `ls -1 "$out/names"`; do
echo "<TD><B>$m</B>" >>"$index" echo "<TD><B>$m</B>" >>"$index"
done done
head=`git rev-list HEAD~1..HEAD`
next="$head" next="$head"
for n in `git rev-list $first..HEAD~1` $first; do for n in `git rev-list $first..HEAD~1` $first; do
[ -d "$cache/ppm_$n" ] || continue
empty=true empty=true
s="<TR><TR>" s="<TR><TR>"
mkdir -p "$out/diff_$next" "$out/thumb_$next" mkdir -p "$out/diff_$next" "$out/thumb_$next"
@ -201,7 +210,7 @@ $s<TD valign="middle">
EOF EOF
mkdir -p "$out/diff_$next" "$out/thumb_$next" mkdir -p "$out/diff_$next" "$out/thumb_$next"
echo "<PRE>" echo "<PRE>"
git log --pretty=short $n..$next | git log --pretty=short $next~1..$next |
sed 's/&/&amp;/g;s/</\&lt;/g;s/>/\&gt;/g' sed 's/&/&amp;/g;s/</\&lt;/g;s/>/\&gt;/g'
echo "</PRE>" echo "</PRE>"
) >>"$index" ) >>"$index"