mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
6605c95531
This should result in a conflict, but the symlink always wins.
37 lines
471 B
Bash
Executable File
37 lines
471 B
Bash
Executable File
#!/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 [ -L 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 [ -L a ]; then
|
|
echo a is a symlink
|
|
readlink a
|
|
elif [ -x a ]; then
|
|
echo a is executable
|
|
fi
|