Mercurial > hg
annotate tests/test-merge-types @ 5607:e9bae5c80ab4
copy: minor cleanups
- add after and dryrun variables
- add some comments
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 07 Dec 2007 02:01:10 -0600 |
parents | 6f26c7677463 |
children | 048889f8c7d1 |
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 |
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 |