Skip to content

tinderbox hg hook

March 5, 2009

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.

From → Uncategorized

3 Comments
  1. Only problem is that that means I’d never be able to check in

  2. marcozehe permalink

    Thanks for the cool tip!

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

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

Please log in to WordPress.com to post a comment to your blog.

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.