tests/test-archive-symlinks
changeset 4868 192cd95c2ba8
parent 4831 6f08bc1bd00b
child 5069 92d7ce0da063
equal deleted inserted replaced
4867:8be7ba425621 4868:192cd95c2ba8
       
     1 #!/bin/sh
       
     2 
       
     3 origdir=`pwd`
       
     4 
       
     5 cat >> readlink.py <<EOF
       
     6 import os
       
     7 import sys
       
     8 
       
     9 for f in sys.argv[1:]:
       
    10     print f, '->', os.readlink(f)
       
    11 EOF
       
    12 
       
    13 hg init repo
       
    14 cd repo
       
    15 ln -s nothing dangling
       
    16 hg ci -qAm 'add symlink'
       
    17 
       
    18 hg archive -t files ../archive
       
    19 hg archive -t tar -p tar ../archive.tar
       
    20 hg archive -t zip -p zip ../archive.zip
       
    21 
       
    22 echo '% files'
       
    23 cd "$origdir"
       
    24 cd archive
       
    25 python ../readlink.py dangling
       
    26 
       
    27 echo '% tar'
       
    28 cd "$origdir"
       
    29 tar xf archive.tar
       
    30 cd tar
       
    31 python ../readlink.py dangling
       
    32 
       
    33 echo '% zip'
       
    34 cd "$origdir"
       
    35 unzip archive.zip > /dev/null
       
    36 cd zip
       
    37 python ../readlink.py dangling