Mercurial > hg > mercurial-crew-with-dirclash
comparison tests/test-archive @ 5384:e3a0c092b4e2
Allow tests to run in parallel.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Fri, 05 Oct 2007 12:17:01 -0700 |
parents | 0f594cc36aed |
children |
comparison
equal
deleted
inserted
replaced
5383:7cdc896fdcd5 | 5384:e3a0c092b4e2 |
---|---|
11 echo bletch>baz/bletch | 11 echo bletch>baz/bletch |
12 hg commit -Am 3 -d '1000000000 0' | 12 hg commit -Am 3 -d '1000000000 0' |
13 echo "[web]" >> .hg/hgrc | 13 echo "[web]" >> .hg/hgrc |
14 echo "name = test-archive" >> .hg/hgrc | 14 echo "name = test-archive" >> .hg/hgrc |
15 echo "allow_archive = gz bz2, zip" >> .hg/hgrc | 15 echo "allow_archive = gz bz2, zip" >> .hg/hgrc |
16 hg serve -p 20059 -d --pid-file=hg.pid | 16 hg serve -p $HGPORT -d --pid-file=hg.pid |
17 cat hg.pid >> $DAEMON_PIDS | 17 cat hg.pid >> $DAEMON_PIDS |
18 | 18 |
19 TIP=`hg id -v | cut -f1 -d' '` | 19 TIP=`hg id -v | cut -f1 -d' '` |
20 QTIP=`hg id -q` | 20 QTIP=`hg id -q` |
21 cat > getarchive.py <<EOF | 21 cat > getarchive.py <<EOF |
22 import sys, urllib2 | 22 import os, sys, urllib2 |
23 node, archive = sys.argv[1:] | 23 node, archive = sys.argv[1:] |
24 f = urllib2.urlopen('http://127.0.0.1:20059/?cmd=archive;node=%s;type=%s' | 24 f = urllib2.urlopen('http://127.0.0.1:%s/?cmd=archive;node=%s;type=%s' |
25 % (node, archive)) | 25 % (os.environ['HGPORT'], node, archive)) |
26 sys.stdout.write(f.read()) | 26 sys.stdout.write(f.read()) |
27 EOF | 27 EOF |
28 http_proxy= python getarchive.py "$TIP" gz | gunzip | tar tf - | sed "s/$QTIP/TIP/" | 28 http_proxy= python getarchive.py "$TIP" gz | gunzip | tar tf - | sed "s/$QTIP/TIP/" |
29 http_proxy= python getarchive.py "$TIP" bz2 | bunzip2 | tar tf - | sed "s/$QTIP/TIP/" | 29 http_proxy= python getarchive.py "$TIP" bz2 | bunzip2 | tar tf - | sed "s/$QTIP/TIP/" |
30 http_proxy= python getarchive.py "$TIP" zip > archive.zip | 30 http_proxy= python getarchive.py "$TIP" zip > archive.zip |