Show More
1 | NO CONTENT: new file 100644, binary diff hidden |
|
NO CONTENT: new file 100644, binary diff hidden |
@@ -1,28 +1,39 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | "$TESTDIR/hghave" symlink || exit 80 |
|
|||
4 |
|
||||
5 | cat > echo.py <<EOF |
|
3 | cat > echo.py <<EOF | |
6 | #!/usr/bin/env python |
|
4 | #!/usr/bin/env python | |
7 | import os |
|
5 | import os | |
8 | for k in ('HG_MY_ISLINK', 'HG_OTHER_ISLINK', 'HG_BASE_ISLINK'): |
|
6 | for k in ('HG_FILE', 'HG_MY_ISLINK', 'HG_OTHER_ISLINK', 'HG_BASE_ISLINK'): | |
9 | print k, os.environ[k] |
|
7 | print k, os.environ[k] | |
10 | EOF |
|
8 | EOF | |
11 | chmod +x echo.py |
|
|||
12 |
|
9 | |||
13 | # Create 2 heads containing the same file, once as |
|
10 | # Create 2 heads containing the same file, once as | |
14 | # a file, once as a link. |
|
11 | # a file, once as a link. Bundle was generated with: | |
15 | echo % create heads |
|
12 | # | |
|
13 | # hg init t | |||
|
14 | # cd t | |||
|
15 | # echo a > a | |||
|
16 | # hg ci -qAm t0 -d '0 0' | |||
|
17 | # echo l > l | |||
|
18 | # hg ci -qAm t1 -d '1 0' | |||
|
19 | # hg up -C 0 | |||
|
20 | # ln -s a l | |||
|
21 | # hg ci -qAm t2 -d '2 0' | |||
|
22 | # echo l2 > l2 | |||
|
23 | # hg ci -qAm t3 -d '3 0' | |||
|
24 | ||||
16 | hg init t |
|
25 | hg init t | |
17 | cd t |
|
26 | cd t | |
18 | echo a > a |
|
27 | hg -q pull "$TESTDIR/test-merge-symlinks.hg" | |
19 | hg ci -qAm t0 |
|
28 | hg up -C 3 | |
20 | echo l > l |
|
|||
21 | hg ci -qAm t1 |
|
|||
22 | hg up -C 0 |
|
|||
23 | ln -s a l |
|
|||
24 | hg ci -qAm t2 |
|
|||
25 |
|
29 | |||
26 | # Merge them and display *_ISLINK vars |
|
30 | # Merge them and display *_ISLINK vars | |
27 | echo % merge heads |
|
31 | echo % merge heads | |
28 | HGMERGE=../echo.py hg merge |
|
32 | HGMERGE="python ../echo.py" hg merge | |
|
33 | ||||
|
34 | # Test working directory symlink bit calculation wrt copies, | |||
|
35 | # especially on non-supporting systems. | |||
|
36 | echo % merge working directory | |||
|
37 | hg up -C 2 | |||
|
38 | hg copy l l2 | |||
|
39 | HGMERGE="python ../echo.py" hg up 3 |
@@ -1,9 +1,17 b'' | |||||
1 | % create heads |
|
1 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
2 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
|||
3 | % merge heads |
|
2 | % merge heads | |
|
3 | HG_FILE l | |||
4 | HG_MY_ISLINK 1 |
|
4 | HG_MY_ISLINK 1 | |
5 | HG_OTHER_ISLINK 0 |
|
5 | HG_OTHER_ISLINK 0 | |
6 | HG_BASE_ISLINK 0 |
|
6 | HG_BASE_ISLINK 0 | |
7 | merging l |
|
7 | merging l | |
8 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
8 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
9 | (branch merge, don't forget to commit) |
|
9 | (branch merge, don't forget to commit) | |
|
10 | % merge working directory | |||
|
11 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
12 | HG_FILE l2 | |||
|
13 | HG_MY_ISLINK 1 | |||
|
14 | HG_OTHER_ISLINK 0 | |||
|
15 | HG_BASE_ISLINK 0 | |||
|
16 | merging l2 | |||
|
17 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
General Comments 0
You need to be logged in to leave comments.
Login now