# HG changeset patch # User Christophe Lincoln # Date 1304806176 -7200 # Node ID 246abb0e12d9633caf2882e195a98f82b217eaa4 # Parent a1c33e54c56b412082f5e999622b46baa2944eb4 cooker: add command rev so we can rebuild a specific revision diff -r a1c33e54c56b -r 246abb0e12d9 cooker --- a/cooker Sat May 07 23:23:59 2011 +0200 +++ b/cooker Sun May 08 00:09:36 2011 +0200 @@ -45,6 +45,7 @@ flavor|-f Cook all packages of a flavor. list|-l Cook all packages in the given list. cat|-c Cook all packages of a category. + rev|-r Cook packages of a specific revision. all|-a Find and cook all unbuilt packages. EOT @@ -211,10 +212,8 @@ cook_list() { for pkg in $(cat $cooklist) do - if [ ! -d "$wok/$pkg/install" ]; then - cook $pkg || broken - sed -i /^${pkg}$/d $cooklist - fi + cook $pkg || broken + sed -i /^${pkg}$/d $cooklist done } @@ -320,6 +319,19 @@ echo -e "\nSpecified list does not exist: $list\n" && exit 1 cp -a $list $cooklist strip_blocked + cook_order | tee $LOGS/cookorder.log ;; + rev|-r) + # Cook or recook a specific Hg revision. + rev="$2" + [ "$rev" ] || exit 0 + cd $wok + log=$(hg log --rev=$rev --template "{files}\n" | cut -d "/" -f 1) + rm -f $cooklist && touch $cooklist + for pkg in $log + do + echo "$pkg" >> $cooklist + done + strip_blocked cook_order | tee $LOGS/cookorder.log cook_list ;; all|-a) @@ -342,7 +354,7 @@ strip_blocked echo "Packages to cook: $(cat $cooklist | wc -l)" | log cook_order | tee $LOGS/cookorder.log - cook_list && empty_command;; + cook_list ;; *) # Default is to cook all commits. [ "$1" ] && usage diff -r a1c33e54c56b -r 246abb0e12d9 doc/cookutils.en.html --- a/doc/cookutils.en.html Sat May 07 23:23:59 2011 +0200 +++ b/doc/cookutils.en.html Sun May 08 00:09:36 2011 +0200 @@ -252,6 +252,14 @@ # cooker list [/path/to/cooklist] # cooker cat [category] +

+ The Cooker let you also recook a specific Hg revision. It usefull in + production so if the Build Bot was interupted while cooking commits, you + can then cook packages manually: +

+
+# cooker rev 9496
+

Blocked packages