tests/test-archive
changeset 1929 85daa4e03b4c
parent 1925 c71420b186b0
parent 1786 ffb584a182d1
child 2114 98cc126f9f3f
equal deleted inserted replaced
1927:397b62d5dd13 1929:85daa4e03b4c
    16 echo "[web]" >> .hg/hgrc
    16 echo "[web]" >> .hg/hgrc
    17 echo "name = test-archive" >> .hg/hgrc
    17 echo "name = test-archive" >> .hg/hgrc
    18 echo "allowzip = true" >> .hg/hgrc
    18 echo "allowzip = true" >> .hg/hgrc
    19 echo "allowgz = true" >> .hg/hgrc
    19 echo "allowgz = true" >> .hg/hgrc
    20 echo "allowbz2 = true" >> .hg/hgrc
    20 echo "allowbz2 = true" >> .hg/hgrc
    21 hg serve -p 20059 > /dev/null &
    21 hg serve -p 20059 -d --pid-file=hg.pid
    22 sleep 1 # wait for server to be started
       
    23 
    22 
    24 TIP=`hg id -v | cut -f1 -d' '`
    23 TIP=`hg id -v | cut -f1 -d' '`
    25 QTIP=`hg id -q`
    24 QTIP=`hg id -q`
    26 cat > getarchive.py <<EOF
    25 cat > getarchive.py <<EOF
    27 import sys, urllib2
    26 import sys, urllib2
    33 http_proxy= python getarchive.py "$TIP" gz | gunzip -dc - | tar tf - | sed "s/$QTIP/TIP/"
    32 http_proxy= python getarchive.py "$TIP" gz | gunzip -dc - | tar tf - | sed "s/$QTIP/TIP/"
    34 http_proxy= python getarchive.py "$TIP" bz2 | bunzip2 -dc - | tar tf - | sed "s/$QTIP/TIP/"
    33 http_proxy= python getarchive.py "$TIP" bz2 | bunzip2 -dc - | tar tf - | sed "s/$QTIP/TIP/"
    35 http_proxy= python getarchive.py "$TIP" zip > archive.zip
    34 http_proxy= python getarchive.py "$TIP" zip > archive.zip
    36 unzip -t archive.zip | sed "s/$QTIP/TIP/"
    35 unzip -t archive.zip | sed "s/$QTIP/TIP/"
    37 
    36 
    38 kill $!
    37 kill `cat hg.pid`
    39 sleep 1 # wait for server to scream and die
    38 sleep 1 # wait for server to scream and die