tinderbox hg hook

Here is a hg hook to prevent you from pushing changes when the Firefox tinderbox is reporting anything other than success.

create a new file, and paste this into it:


#!/bin/bash
if ! curl -s http://tinderbox.mozilla.org/showbuilds.cgi?tree=Firefox\&quickparse=1 | cut -d '|' -f 4 | grep -v "success"; then
echo "tinderbox is open. pushing...."
exit 0
fi
echo "tinderbox is burning. exiting"
exit 1

Then in your .hgrc file, add a line like:


preoutgoing.hg_tbox_hook = /Users/dougt/builds/hg_tbox_hook

Result my vary. Don’t depend on this to save your butt; check tinderbox often. Note that there is some delay between the time that tinderbox knows that there is a problem, and the time that the “quickparse.txt” file is generated. Hopefully, we can resolve this quickly so that this hook is more useful.

thanks philor for the pro tip. script above now uses the non-static tinderbox quicktest url.

This entry was posted in mozilla. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

3 Comments

  1. Posted March 6, 2009 at 12:27 am | Permalink

    Only problem is that that means I’d never be able to check in

  2. marcozehe
    Posted March 6, 2009 at 6:00 am | Permalink

    Thanks for the cool tip!

  3. Posted March 6, 2009 at 6:02 am | Permalink

    Nice one. And my recommendation for an override flag would be “–make-beltzner-scream” ;)

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>