cookutils rev 164
cooker: store last wok rev to be used by CGI and so avois hg head call on each page load (even faster now)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sun May 15 15:55:10 2011 +0200 (2011-05-15) |
parents | 9ee293e79359 |
children | 4dec8953be05 |
files | cooker web/cooker.cgi |
line diff
1.1 --- a/cooker Sun May 15 15:21:18 2011 +0200 1.2 +++ b/cooker Sun May 15 15:55:10 2011 +0200 1.3 @@ -394,6 +394,9 @@ 1.4 echo "hg:pull" > $command 1.5 cd ${wok}-hg && hg pull -u | log_commits 1.6 new=$(hg head --template '{rev}\n') 1.7 + # Store last rev to be used by CGI so it dont need to call hg head 1.8 + # on each load. 1.9 + echo "$new" > $CACHE/wokrev 1.10 1.11 # Sync build wok with rsync so we don't take care about removing old 1.12 # files as before.
2.1 --- a/web/cooker.cgi Sun May 15 15:21:18 2011 +0200 2.2 +++ b/web/cooker.cgi Sun May 15 15:55:10 2011 +0200 2.3 @@ -20,6 +20,7 @@ 2.4 blocked="$CACHE/blocked" 2.5 broken="$CACHE/broken" 2.6 cooknotes="$CACHE/cooknotes" 2.7 +wokrev="$CACHE/wokrev" 2.8 2.9 # 2.10 # Functions 2.11 @@ -203,8 +204,7 @@ 2.12 2.13 <pre> 2.14 Running command : $([ -s "$command" ] && cat $command || echo "Not running") 2.15 -Wok revision : <a href="http://hg.slitaz.org/wok">$(cd $WOK && \ 2.16 - hg head --template '{rev}\n' || echo "No Hg wok")</a> 2.17 +Wok revision : <a href="http://hg.slitaz.org/wok">$(cat $wokrev)</a> 2.18 Commits to cook : $(cat $commits | wc -l) 2.19 Current cooklist : $(cat $cooklist | wc -l) 2.20 Broken packages : $(cat $broken | wc -l)