##// END OF EJS Templates
tests: drop a couple of unnecessary 'hghave symlink'
Mads Kiilerich -
r16907:91dc9587 default
parent child Browse files
Show More
@@ -1,71 +1,69 b''
1 $ "$TESTDIR/hghave" symlink || exit 80
2
3 Source bundle was generated with the following script:
1 Source bundle was generated with the following script:
4
2
5 # hg init
3 # hg init
6 # echo a > a
4 # echo a > a
7 # ln -s a l
5 # ln -s a l
8 # hg ci -Ama -d'0 0'
6 # hg ci -Ama -d'0 0'
9 # mkdir b
7 # mkdir b
10 # echo a > b/a
8 # echo a > b/a
11 # chmod +x b/a
9 # chmod +x b/a
12 # hg ci -Amb -d'1 0'
10 # hg ci -Amb -d'1 0'
13
11
14 $ hg init
12 $ hg init
15 $ hg -q pull "$TESTDIR/bundles/test-manifest.hg"
13 $ hg -q pull "$TESTDIR/bundles/test-manifest.hg"
16
14
17 The next call is expected to return nothing:
15 The next call is expected to return nothing:
18
16
19 $ hg manifest
17 $ hg manifest
20
18
21 $ hg co
19 $ hg co
22 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
20 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
23
21
24 $ hg manifest
22 $ hg manifest
25 a
23 a
26 b/a
24 b/a
27 l
25 l
28
26
29 $ hg manifest -v
27 $ hg manifest -v
30 644 a
28 644 a
31 755 * b/a
29 755 * b/a
32 644 @ l
30 644 @ l
33
31
34 $ hg manifest --debug
32 $ hg manifest --debug
35 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 644 a
33 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 644 a
36 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 755 * b/a
34 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 755 * b/a
37 047b75c6d7a3ef6a2243bd0e99f94f6ea6683597 644 @ l
35 047b75c6d7a3ef6a2243bd0e99f94f6ea6683597 644 @ l
38
36
39 $ hg manifest -r 0
37 $ hg manifest -r 0
40 a
38 a
41 l
39 l
42
40
43 $ hg manifest -r 1
41 $ hg manifest -r 1
44 a
42 a
45 b/a
43 b/a
46 l
44 l
47
45
48 $ hg manifest -r tip
46 $ hg manifest -r tip
49 a
47 a
50 b/a
48 b/a
51 l
49 l
52
50
53 $ hg manifest tip
51 $ hg manifest tip
54 a
52 a
55 b/a
53 b/a
56 l
54 l
57
55
58 $ hg manifest --all
56 $ hg manifest --all
59 a
57 a
60 b/a
58 b/a
61 l
59 l
62
60
63 The next two calls are expected to abort:
61 The next two calls are expected to abort:
64
62
65 $ hg manifest -r 2
63 $ hg manifest -r 2
66 abort: unknown revision '2'!
64 abort: unknown revision '2'!
67 [255]
65 [255]
68
66
69 $ hg manifest -r tip tip
67 $ hg manifest -r tip tip
70 abort: please specify just one revision
68 abort: please specify just one revision
71 [255]
69 [255]
@@ -1,63 +1,61 b''
1 $ "$TESTDIR/hghave" symlink || exit 80
2
3 $ cat > echo.py <<EOF
1 $ cat > echo.py <<EOF
4 > #!/usr/bin/env python
2 > #!/usr/bin/env python
5 > import os, sys
3 > import os, sys
6 > try:
4 > try:
7 > import msvcrt
5 > import msvcrt
8 > msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
6 > msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
9 > msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY)
7 > msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY)
10 > except ImportError:
8 > except ImportError:
11 > pass
9 > pass
12 >
10 >
13 > for k in ('HG_FILE', 'HG_MY_ISLINK', 'HG_OTHER_ISLINK', 'HG_BASE_ISLINK'):
11 > for k in ('HG_FILE', 'HG_MY_ISLINK', 'HG_OTHER_ISLINK', 'HG_BASE_ISLINK'):
14 > print k, os.environ[k]
12 > print k, os.environ[k]
15 > EOF
13 > EOF
16
14
17 Create 2 heads containing the same file, once as
15 Create 2 heads containing the same file, once as
18 a file, once as a link. Bundle was generated with:
16 a file, once as a link. Bundle was generated with:
19
17
20 # hg init t
18 # hg init t
21 # cd t
19 # cd t
22 # echo a > a
20 # echo a > a
23 # hg ci -qAm t0 -d '0 0'
21 # hg ci -qAm t0 -d '0 0'
24 # echo l > l
22 # echo l > l
25 # hg ci -qAm t1 -d '1 0'
23 # hg ci -qAm t1 -d '1 0'
26 # hg up -C 0
24 # hg up -C 0
27 # ln -s a l
25 # ln -s a l
28 # hg ci -qAm t2 -d '2 0'
26 # hg ci -qAm t2 -d '2 0'
29 # echo l2 > l2
27 # echo l2 > l2
30 # hg ci -qAm t3 -d '3 0'
28 # hg ci -qAm t3 -d '3 0'
31
29
32 $ hg init t
30 $ hg init t
33 $ cd t
31 $ cd t
34 $ hg -q pull "$TESTDIR/bundles/test-merge-symlinks.hg"
32 $ hg -q pull "$TESTDIR/bundles/test-merge-symlinks.hg"
35 $ hg up -C 3
33 $ hg up -C 3
36 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
34 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
37
35
38 Merge them and display *_ISLINK vars
36 Merge them and display *_ISLINK vars
39 merge heads
37 merge heads
40
38
41 $ hg merge --tool="python ../echo.py"
39 $ hg merge --tool="python ../echo.py"
42 merging l
40 merging l
43 HG_FILE l
41 HG_FILE l
44 HG_MY_ISLINK 1
42 HG_MY_ISLINK 1
45 HG_OTHER_ISLINK 0
43 HG_OTHER_ISLINK 0
46 HG_BASE_ISLINK 0
44 HG_BASE_ISLINK 0
47 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
45 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
48 (branch merge, don't forget to commit)
46 (branch merge, don't forget to commit)
49
47
50 Test working directory symlink bit calculation wrt copies,
48 Test working directory symlink bit calculation wrt copies,
51 especially on non-supporting systems.
49 especially on non-supporting systems.
52 merge working directory
50 merge working directory
53
51
54 $ hg up -C 2
52 $ hg up -C 2
55 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
53 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
56 $ hg copy l l2
54 $ hg copy l l2
57 $ HGMERGE="python ../echo.py" hg up 3
55 $ HGMERGE="python ../echo.py" hg up 3
58 merging l2
56 merging l2
59 HG_FILE l2
57 HG_FILE l2
60 HG_MY_ISLINK 1
58 HG_MY_ISLINK 1
61 HG_OTHER_ISLINK 0
59 HG_OTHER_ISLINK 0
62 HG_BASE_ISLINK 0
60 HG_BASE_ISLINK 0
63 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
61 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