tests/test-mq-symlinks
changeset 5157 f6c520fd70cf
child 5683 396c7010b0cd
equal deleted inserted replaced
5156:49554ba98951 5157:f6c520fd70cf
       
     1 #!/bin/sh
       
     2 
       
     3 echo "[extensions]" >> $HGRCPATH
       
     4 echo "mq=" >> $HGRCPATH
       
     5 
       
     6 cat >> readlink.py <<EOF
       
     7 import errno, os, sys
       
     8 
       
     9 for f in sys.argv[1:]:
       
    10     try:
       
    11         print f, '->', os.readlink(f)
       
    12     except OSError, err:
       
    13         if err.errno != errno.EINVAL: raise
       
    14         print f, 'not a symlink'
       
    15 EOF
       
    16 
       
    17 hg init
       
    18 hg qinit
       
    19 hg qnew base.patch
       
    20 echo a > a
       
    21 echo b > b
       
    22 hg add a b
       
    23 hg qrefresh
       
    24 python readlink.py a
       
    25 
       
    26 hg qnew symlink.patch
       
    27 rm a
       
    28 ln -s b a
       
    29 hg qrefresh --git
       
    30 python readlink.py a
       
    31 
       
    32 hg qpop
       
    33 hg qpush
       
    34 python readlink.py a