tests/test-merge-types
author Thomas Arendsen Hein <thomas@intevation.de>
Fri, 21 Dec 2007 09:51:19 +0100
changeset 5682 048889f8c7d1
parent 5503 6f26c7677463
child 5683 396c7010b0cd
permissions -rwxr-xr-x
Use test -h instead of test -L for portability Citing from the GNU autoconf manual: "either form conforms to Posix 1003.1-2001, but older shells like Solaris 8 /bin/sh support only -h"

#!/bin/sh

hg init
echo a > a
hg ci -Amadd

chmod +x a
hg ci -mexecutable

hg up 0
rm a
ln -s symlink a
hg ci -msymlink

hg merge

echo % symlink is left parent, executable is right

if [ -h a ]; then
    echo a is a symlink
    readlink a
elif [ -x a ]; then
    echo a is executable
fi

hg update -C 1
hg merge

echo % symlink is right parent, executable is left

if [ -h a ]; then
    echo a is a symlink
    readlink a
elif [ -x a ]; then
    echo a is executable
fi