##// END OF EJS Templates
merge: simplify merge tests, fix exec flag bug...
merge: simplify merge tests, fix exec flag bug If local changed exec bit and remote changed file contents, exec bit change would be lost.

File last commit:

r5685:57d29a45 default
r5700:9cedc3fb default
Show More
test-merge-types
39 lines | 553 B | text/plain | TextLexer
Bryan O'Sullivan
Test a merge of a symlink against an executable file....
r5503 #!/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
Thomas Arendsen Hein
Use test -h instead of test -L for portability...
r5682 if [ -h a ]; then
Bryan O'Sullivan
Test a merge of a symlink against an executable file....
r5503 echo a is a symlink
Thomas Arendsen Hein
Use common readlink.py instead of own implementations per test script.
r5683 $TESTDIR/readlink.py a
Bryan O'Sullivan
Test a merge of a symlink against an executable file....
r5503 elif [ -x a ]; then
echo a is executable
fi
hg update -C 1
hg merge
echo % symlink is right parent, executable is left
Thomas Arendsen Hein
Use test -h instead of test -L for portability...
r5682 if [ -h a ]; then
Bryan O'Sullivan
Test a merge of a symlink against an executable file....
r5503 echo a is a symlink
Thomas Arendsen Hein
Use common readlink.py instead of own implementations per test script.
r5683 $TESTDIR/readlink.py a
Bryan O'Sullivan
Test a merge of a symlink against an executable file....
r5503 elif [ -x a ]; then
echo a is executable
fi
Thomas Arendsen Hein
Use skipped: instead of hghave: for skipping tests, use this in test-merge-types
r5685
echo "skipped: test is for a known, unfixed bug"
exit 80