2007-11-03 00:02:28 +03:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
hg init
|
|
|
|
echo a > a
|
2007-12-28 07:27:43 +03:00
|
|
|
hg ci -Amadd # 0
|
2007-11-03 00:02:28 +03:00
|
|
|
|
|
|
|
chmod +x a
|
2007-12-28 07:27:43 +03:00
|
|
|
hg ci -mexecutable # 1
|
2007-11-03 00:02:28 +03:00
|
|
|
|
|
|
|
hg up 0
|
|
|
|
rm a
|
|
|
|
ln -s symlink a
|
2007-12-28 07:27:43 +03:00
|
|
|
hg ci -msymlink # 2
|
|
|
|
hg merge --debug
|
2007-11-03 00:02:28 +03:00
|
|
|
|
2007-12-28 07:27:43 +03:00
|
|
|
echo % symlink is local parent, executable is other
|
2007-11-03 00:02:28 +03:00
|
|
|
|
2007-12-21 11:51:19 +03:00
|
|
|
if [ -h a ]; then
|
2007-11-03 00:02:28 +03:00
|
|
|
echo a is a symlink
|
2007-12-21 12:24:03 +03:00
|
|
|
$TESTDIR/readlink.py a
|
2007-11-03 00:02:28 +03:00
|
|
|
elif [ -x a ]; then
|
|
|
|
echo a is executable
|
2007-12-28 08:55:36 +03:00
|
|
|
else
|
|
|
|
echo "a has no flags (default for conflicts)"
|
2007-11-03 00:02:28 +03:00
|
|
|
fi
|
|
|
|
|
|
|
|
hg update -C 1
|
2007-12-28 07:27:43 +03:00
|
|
|
hg merge --debug
|
2007-11-03 00:02:28 +03:00
|
|
|
|
2007-12-28 07:27:43 +03:00
|
|
|
echo % symlink is other parent, executable is local
|
2007-11-03 00:02:28 +03:00
|
|
|
|
2007-12-21 11:51:19 +03:00
|
|
|
if [ -h a ]; then
|
2007-11-03 00:02:28 +03:00
|
|
|
echo a is a symlink
|
2007-12-21 12:24:03 +03:00
|
|
|
$TESTDIR/readlink.py a
|
2007-11-03 00:02:28 +03:00
|
|
|
elif [ -x a ]; then
|
|
|
|
echo a is executable
|
2007-12-28 08:55:36 +03:00
|
|
|
else
|
|
|
|
echo "a has no flags (default for conflicts)"
|
2007-11-03 00:02:28 +03:00
|
|
|
fi
|