Show More
@@ -1,64 +1,65 b'' | |||||
1 | $ cat > echo.py <<EOF |
|
1 | $ cat > echo.py <<EOF | |
2 | > #!$PYTHON |
|
2 | > #!$PYTHON | |
3 | > from __future__ import print_function |
|
3 | > from __future__ import absolute_import, print_function | |
4 |
> import os |
|
4 | > import os | |
|
5 | > import sys | |||
5 | > try: |
|
6 | > try: | |
6 | > import msvcrt |
|
7 | > import msvcrt | |
7 | > msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) |
|
8 | > msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) | |
8 | > msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY) |
|
9 | > msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY) | |
9 | > except ImportError: |
|
10 | > except ImportError: | |
10 | > pass |
|
11 | > pass | |
11 | > |
|
12 | > | |
12 | > for k in ('HG_FILE', 'HG_MY_ISLINK', 'HG_OTHER_ISLINK', 'HG_BASE_ISLINK'): |
|
13 | > for k in ('HG_FILE', 'HG_MY_ISLINK', 'HG_OTHER_ISLINK', 'HG_BASE_ISLINK'): | |
13 | > print(k, os.environ[k]) |
|
14 | > print(k, os.environ[k]) | |
14 | > EOF |
|
15 | > EOF | |
15 |
|
16 | |||
16 | Create 2 heads containing the same file, once as |
|
17 | Create 2 heads containing the same file, once as | |
17 | a file, once as a link. Bundle was generated with: |
|
18 | a file, once as a link. Bundle was generated with: | |
18 |
|
19 | |||
19 | # hg init t |
|
20 | # hg init t | |
20 | # cd t |
|
21 | # cd t | |
21 | # echo a > a |
|
22 | # echo a > a | |
22 | # hg ci -qAm t0 -d '0 0' |
|
23 | # hg ci -qAm t0 -d '0 0' | |
23 | # echo l > l |
|
24 | # echo l > l | |
24 | # hg ci -qAm t1 -d '1 0' |
|
25 | # hg ci -qAm t1 -d '1 0' | |
25 | # hg up -C 0 |
|
26 | # hg up -C 0 | |
26 | # ln -s a l |
|
27 | # ln -s a l | |
27 | # hg ci -qAm t2 -d '2 0' |
|
28 | # hg ci -qAm t2 -d '2 0' | |
28 | # echo l2 > l2 |
|
29 | # echo l2 > l2 | |
29 | # hg ci -qAm t3 -d '3 0' |
|
30 | # hg ci -qAm t3 -d '3 0' | |
30 |
|
31 | |||
31 | $ hg init t |
|
32 | $ hg init t | |
32 | $ cd t |
|
33 | $ cd t | |
33 | $ hg -q pull "$TESTDIR/bundles/test-merge-symlinks.hg" |
|
34 | $ hg -q pull "$TESTDIR/bundles/test-merge-symlinks.hg" | |
34 | $ hg up -C 3 |
|
35 | $ hg up -C 3 | |
35 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
36 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
36 |
|
37 | |||
37 | Merge them and display *_ISLINK vars |
|
38 | Merge them and display *_ISLINK vars | |
38 | merge heads |
|
39 | merge heads | |
39 |
|
40 | |||
40 | $ hg merge --tool="$PYTHON ../echo.py" |
|
41 | $ hg merge --tool="$PYTHON ../echo.py" | |
41 | merging l |
|
42 | merging l | |
42 | HG_FILE l |
|
43 | HG_FILE l | |
43 | HG_MY_ISLINK 1 |
|
44 | HG_MY_ISLINK 1 | |
44 | HG_OTHER_ISLINK 0 |
|
45 | HG_OTHER_ISLINK 0 | |
45 | HG_BASE_ISLINK 0 |
|
46 | HG_BASE_ISLINK 0 | |
46 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
47 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
47 | (branch merge, don't forget to commit) |
|
48 | (branch merge, don't forget to commit) | |
48 |
|
49 | |||
49 | Test working directory symlink bit calculation wrt copies, |
|
50 | Test working directory symlink bit calculation wrt copies, | |
50 | especially on non-supporting systems. |
|
51 | especially on non-supporting systems. | |
51 | merge working directory |
|
52 | merge working directory | |
52 |
|
53 | |||
53 | $ hg up -C 2 |
|
54 | $ hg up -C 2 | |
54 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
55 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
55 | $ hg copy l l2 |
|
56 | $ hg copy l l2 | |
56 | $ HGMERGE="$PYTHON ../echo.py" hg up 3 |
|
57 | $ HGMERGE="$PYTHON ../echo.py" hg up 3 | |
57 | merging l2 |
|
58 | merging l2 | |
58 | HG_FILE l2 |
|
59 | HG_FILE l2 | |
59 | HG_MY_ISLINK 1 |
|
60 | HG_MY_ISLINK 1 | |
60 | HG_OTHER_ISLINK 0 |
|
61 | HG_OTHER_ISLINK 0 | |
61 | HG_BASE_ISLINK 0 |
|
62 | HG_BASE_ISLINK 0 | |
62 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
63 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
63 |
|
64 | |||
64 | $ cd .. |
|
65 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now