Mercurial > hg
annotate tests/test-merge-types @ 5686:5d14d71148b8
Switch to using cat with EOF doc instead of trying to quote newlines for echo.
author | Lee Cantey <lcantey@gmail.com> |
---|---|
date | Fri, 21 Dec 2007 14:26:20 -0800 |
parents | 57d29a45ffbc |
children | 32c2832682a9 |
rev | line source |
---|---|
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 |
5682
048889f8c7d1
Use test -h instead of test -L for portability
Thomas Arendsen Hein <thomas@intevation.de>
parents:
5503
diff
changeset
|
19 if [ -h a ]; then |
5503
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 |
5683
396c7010b0cd
Use common readlink.py instead of own implementations per test script.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
5682
diff
changeset
|
21 $TESTDIR/readlink.py a |
5503
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 |
5682
048889f8c7d1
Use test -h instead of test -L for portability
Thomas Arendsen Hein <thomas@intevation.de>
parents:
5503
diff
changeset
|
31 if [ -h a ]; then |
5503
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 |
5683
396c7010b0cd
Use common readlink.py instead of own implementations per test script.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
5682
diff
changeset
|
33 $TESTDIR/readlink.py a |
5503
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 |
5685
57d29a45ffbc
Use skipped: instead of hghave: for skipping tests, use this in test-merge-types
Thomas Arendsen Hein <thomas@intevation.de>
parents:
5683
diff
changeset
|
37 |
57d29a45ffbc
Use skipped: instead of hghave: for skipping tests, use this in test-merge-types
Thomas Arendsen Hein <thomas@intevation.de>
parents:
5683
diff
changeset
|
38 echo "skipped: test is for a known, unfixed bug" |
57d29a45ffbc
Use skipped: instead of hghave: for skipping tests, use this in test-merge-types
Thomas Arendsen Hein <thomas@intevation.de>
parents:
5683
diff
changeset
|
39 exit 80 |