#!/bin/sh mkdir test cd test hg init echo foo>foo hg addremove hg commit -m 1 echo bar>bar hg addremove hg commit -m 2 mkdir baz echo bletch>baz/bletch hg addremove hg commit -m 3 echo "[web]" >> .hg/hgrc echo "name = test-archive" >> .hg/hgrc echo "allowzip = true" >> .hg/hgrc echo "allowgz = true" >> .hg/hgrc echo "allowbz2 = true" >> .hg/hgrc hg serve -p 20059 > /dev/null & sleep 1 # wait for server to be started TIP=`hg id -v | cut -f1 -d' '` QTIP=`hg id -q` cat > getarchive.py < archive.zip unzip -t archive.zip | sed "s/$QTIP/TIP/" kill $! sleep 1 # wait for server to scream and die