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