# HG changeset patch # User Bryan O'Sullivan # Date 2007-11-02 21:02:28 # Node ID 6f26c76774639f0b03b227013ba2d7a43e0ca3a8 # Parent a7248da554672cfb35e21b7d2d385b760acdf2d5 Test a merge of a symlink against an executable file. This should result in a conflict, but the symlink always wins. diff --git a/tests/test-merge-types b/tests/test-merge-types new file mode 100755 --- /dev/null +++ b/tests/test-merge-types @@ -0,0 +1,36 @@ +#!/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