author | Matt Mackall <mpm@selenic.com> |
Sun, 02 Dec 2007 18:41:22 -0600 | |
changeset 5604 | 4b7b21acede0 |
parent 5503 | 6f26c7677463 |
child 5682 | 048889f8c7d1 |
permissions | -rwxr-xr-x |
5503
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
1 |
#!/bin/sh |
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
2 |
|
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
3 |
hg init |
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
4 |
echo a > a |
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
5 |
hg ci -Amadd |
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
6 |
|
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
7 |
chmod +x a |
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
8 |
hg ci -mexecutable |
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
9 |
|
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
10 |
hg up 0 |
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
11 |
rm a |
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
12 |
ln -s symlink a |
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
13 |
hg ci -msymlink |
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
14 |
|
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
15 |
hg merge |
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
16 |
|
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
17 |
echo % symlink is left parent, executable is right |
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
18 |
|
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
19 |
if [ -L a ]; then |
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
20 |
echo a is a symlink |
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
21 |
readlink a |
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
22 |
elif [ -x a ]; then |
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
23 |
echo a is executable |
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
24 |
fi |
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
25 |
|
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
26 |
hg update -C 1 |
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
27 |
hg merge |
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
28 |
|
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
29 |
echo % symlink is right parent, executable is left |
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
30 |
|
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
31 |
if [ -L a ]; then |
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
32 |
echo a is a symlink |
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
33 |
readlink a |
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
34 |
elif [ -x a ]; then |
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
35 |
echo a is executable |
6f26c7677463
Test a merge of a symlink against an executable file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
36 |
fi |