tests/test-archive
changeset 1786 ffb584a182d1
parent 1744 385b06493465
child 1929 85daa4e03b4c
equal deleted inserted replaced
1785:81ca1a9bd061 1786:ffb584a182d1
    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 serverpid=`mktemp`
    21 hg serve -p 20059 -d --pid-file=hg.pid
    22 hg serve -p 20059 -d --pid-file=$serverpid
       
    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 | tar tzf - | sed "s/$QTIP/TIP/"
    32 http_proxy= python getarchive.py "$TIP" gz | tar tzf - | sed "s/$QTIP/TIP/"
    34 http_proxy= python getarchive.py "$TIP" bz2 | tar tjf - | sed "s/$QTIP/TIP/"
    33 http_proxy= python getarchive.py "$TIP" bz2 | tar tjf - | 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 `cat $serverpid`
    37 kill `cat hg.pid`
    39 rm $serverpid