Show More
@@ -1,36 +1,36 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | hg init |
|
3 | hg init | |
4 | echo a > a |
|
4 | echo a > a | |
5 | hg ci -Amadd |
|
5 | hg ci -Amadd | |
6 |
|
6 | |||
7 | chmod +x a |
|
7 | chmod +x a | |
8 | hg ci -mexecutable |
|
8 | hg ci -mexecutable | |
9 |
|
9 | |||
10 | hg up 0 |
|
10 | hg up 0 | |
11 | rm a |
|
11 | rm a | |
12 | ln -s symlink a |
|
12 | ln -s symlink a | |
13 | hg ci -msymlink |
|
13 | hg ci -msymlink | |
14 |
|
14 | |||
15 | hg merge |
|
15 | hg merge | |
16 |
|
16 | |||
17 | echo % symlink is left parent, executable is right |
|
17 | echo % symlink is left parent, executable is right | |
18 |
|
18 | |||
19 |
if [ - |
|
19 | if [ -h a ]; then | |
20 | echo a is a symlink |
|
20 | echo a is a symlink | |
21 | readlink a |
|
21 | readlink a | |
22 | elif [ -x a ]; then |
|
22 | elif [ -x a ]; then | |
23 | echo a is executable |
|
23 | echo a is executable | |
24 | fi |
|
24 | fi | |
25 |
|
25 | |||
26 | hg update -C 1 |
|
26 | hg update -C 1 | |
27 | hg merge |
|
27 | hg merge | |
28 |
|
28 | |||
29 | echo % symlink is right parent, executable is left |
|
29 | echo % symlink is right parent, executable is left | |
30 |
|
30 | |||
31 |
if [ - |
|
31 | if [ -h a ]; then | |
32 | echo a is a symlink |
|
32 | echo a is a symlink | |
33 | readlink a |
|
33 | readlink a | |
34 | elif [ -x a ]; then |
|
34 | elif [ -x a ]; then | |
35 | echo a is executable |
|
35 | echo a is executable | |
36 | fi |
|
36 | fi |
General Comments 0
You need to be logged in to leave comments.
Login now