##// END OF EJS Templates
test-strip-cross: test handling of linkrev crosses in the manifest
Alexis S. L. Carvalho -
r5912:d67cfe0d default
parent child Browse files
Show More
@@ -1,61 +1,67 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 # test stripping of filelogs where the linkrev doesn't always increase
3 # test stripping of filelogs where the linkrev doesn't always increase
4
4
5 echo '[extensions]' >> $HGRCPATH
5 echo '[extensions]' >> $HGRCPATH
6 echo 'hgext.mq =' >> $HGRCPATH
6 echo 'hgext.mq =' >> $HGRCPATH
7
7
8 hg init orig
8 hg init orig
9 cd orig
9 cd orig
10
10
11 hidefilename()
11 hidefilename()
12 {
12 {
13 sed -e 's/saving bundle to .*strip-backup/saving bundle to strip-backup/'
13 sed -e 's/saving bundle to .*strip-backup/saving bundle to strip-backup/'
14 }
14 }
15
15
16 commit()
16 commit()
17 {
17 {
18 hg up -qC null
18 hg up -qC null
19 count=1
19 count=1
20 for i in "$@"; do
20 for i in "$@"; do
21 for f in $i; do
21 for f in $i; do
22 echo $count > $f
22 echo $count > $f
23 done
23 done
24 count=`expr $count + 1`
24 count=`expr $count + 1`
25 done
25 done
26 hg commit -qAm "$*"
26 hg commit -qAm "$*"
27 }
27 }
28
28
29 # 2 1 0 2 0 1 2
29 # 2 1 0 2 0 1 2
30 commit '201 210'
30 commit '201 210'
31
31
32 commit '102 120' '210'
32 commit '102 120' '210'
33
33
34 commit '021'
34 commit '021'
35
35
36 commit '201' '021 120'
36 commit '201' '021 120'
37
37
38 commit '012 021' '102 201' '120 210'
38 commit '012 021' '102 201' '120 210'
39
39
40 commit 'manifest-file'
41
40 commit '102 120' '012 210' '021 201'
42 commit '102 120' '012 210' '021 201'
41
43
42 commit '201 210' '021 120' '012 102'
44 commit '201 210' '021 120' '012 102'
43
45
46 HGUSER=another-user commit 'manifest-file'
47
48 commit '012' 'manifest-file'
49
44 cd ..
50 cd ..
45 hg clone -q -U -r -1 -r -2 -r -3 orig crossed
51 hg clone -q -U -r -1 -r -2 -r -3 -r -4 -r -6 orig crossed
46
52
47 for i in crossed/.hg/store/00manifest.i crossed/.hg/store/data/*.i; do
53 for i in crossed/.hg/store/00manifest.i crossed/.hg/store/data/*.i; do
48 echo $i
54 echo $i
49 hg debugindex $i
55 hg debugindex $i
50 echo
56 echo
51 done
57 done
52
58
53 for i in 0 1 2; do
59 for i in 0 1 2 3 4; do
54 hg clone -q -U --pull crossed $i
60 hg clone -q -U --pull crossed $i
55 echo "% Trying to strip revision $i"
61 echo "% Trying to strip revision $i"
56 hg --cwd $i strip $i 2>&1 | hidefilename
62 hg --cwd $i strip $i 2>&1 | hidefilename
57 echo "% Verifying"
63 echo "% Verifying"
58 hg --cwd $i verify
64 hg --cwd $i verify
59 echo
65 echo
60 done
66 done
61
67
@@ -1,87 +1,118 b''
1 crossed/.hg/store/00manifest.i
1 crossed/.hg/store/00manifest.i
2 rev offset length base linkrev nodeid p1 p2
2 rev offset length base linkrev nodeid p1 p2
3 0 0 112 0 0 6f105cbb914d 000000000000 000000000000
3 0 0 112 0 0 6f105cbb914d 000000000000 000000000000
4 1 112 123 0 1 8f3d04e263e5 000000000000 000000000000
4 1 112 56 1 3 1b55917b3699 000000000000 000000000000
5 2 235 122 0 2 f0ef8726ac4f 000000000000 000000000000
5 2 168 123 1 1 8f3d04e263e5 000000000000 000000000000
6 3 291 122 1 2 f0ef8726ac4f 000000000000 000000000000
7 4 413 87 4 4 0b76e38b4070 000000000000 000000000000
6
8
7 crossed/.hg/store/data/012.i
9 crossed/.hg/store/data/012.i
8 rev offset length base linkrev nodeid p1 p2
10 rev offset length base linkrev nodeid p1 p2
9 0 0 3 0 0 b8e02f643373 000000000000 000000000000
11 0 0 3 0 0 b8e02f643373 000000000000 000000000000
10 1 3 3 1 1 5d9299349fc0 000000000000 000000000000
12 1 3 3 1 1 5d9299349fc0 000000000000 000000000000
11 2 6 3 2 2 2661d26c6496 000000000000 000000000000
13 2 6 3 2 2 2661d26c6496 000000000000 000000000000
12
14
13 crossed/.hg/store/data/021.i
15 crossed/.hg/store/data/021.i
14 rev offset length base linkrev nodeid p1 p2
16 rev offset length base linkrev nodeid p1 p2
15 0 0 3 0 0 b8e02f643373 000000000000 000000000000
17 0 0 3 0 0 b8e02f643373 000000000000 000000000000
16 1 3 3 1 2 5d9299349fc0 000000000000 000000000000
18 1 3 3 1 2 5d9299349fc0 000000000000 000000000000
17 2 6 3 2 1 2661d26c6496 000000000000 000000000000
19 2 6 3 2 1 2661d26c6496 000000000000 000000000000
18
20
19 crossed/.hg/store/data/102.i
21 crossed/.hg/store/data/102.i
20 rev offset length base linkrev nodeid p1 p2
22 rev offset length base linkrev nodeid p1 p2
21 0 0 3 0 1 b8e02f643373 000000000000 000000000000
23 0 0 3 0 1 b8e02f643373 000000000000 000000000000
22 1 3 3 1 0 5d9299349fc0 000000000000 000000000000
24 1 3 3 1 0 5d9299349fc0 000000000000 000000000000
23 2 6 3 2 2 2661d26c6496 000000000000 000000000000
25 2 6 3 2 2 2661d26c6496 000000000000 000000000000
24
26
25 crossed/.hg/store/data/120.i
27 crossed/.hg/store/data/120.i
26 rev offset length base linkrev nodeid p1 p2
28 rev offset length base linkrev nodeid p1 p2
27 0 0 3 0 1 b8e02f643373 000000000000 000000000000
29 0 0 3 0 1 b8e02f643373 000000000000 000000000000
28 1 3 3 1 2 5d9299349fc0 000000000000 000000000000
30 1 3 3 1 2 5d9299349fc0 000000000000 000000000000
29 2 6 3 2 0 2661d26c6496 000000000000 000000000000
31 2 6 3 2 0 2661d26c6496 000000000000 000000000000
30
32
31 crossed/.hg/store/data/201.i
33 crossed/.hg/store/data/201.i
32 rev offset length base linkrev nodeid p1 p2
34 rev offset length base linkrev nodeid p1 p2
33 0 0 3 0 2 b8e02f643373 000000000000 000000000000
35 0 0 3 0 2 b8e02f643373 000000000000 000000000000
34 1 3 3 1 0 5d9299349fc0 000000000000 000000000000
36 1 3 3 1 0 5d9299349fc0 000000000000 000000000000
35 2 6 3 2 1 2661d26c6496 000000000000 000000000000
37 2 6 3 2 1 2661d26c6496 000000000000 000000000000
36
38
37 crossed/.hg/store/data/210.i
39 crossed/.hg/store/data/210.i
38 rev offset length base linkrev nodeid p1 p2
40 rev offset length base linkrev nodeid p1 p2
39 0 0 3 0 2 b8e02f643373 000000000000 000000000000
41 0 0 3 0 2 b8e02f643373 000000000000 000000000000
40 1 3 3 1 1 5d9299349fc0 000000000000 000000000000
42 1 3 3 1 1 5d9299349fc0 000000000000 000000000000
41 2 6 3 2 0 2661d26c6496 000000000000 000000000000
43 2 6 3 2 0 2661d26c6496 000000000000 000000000000
42
44
45 crossed/.hg/store/data/manifest-file.i
46 rev offset length base linkrev nodeid p1 p2
47 0 0 3 0 3 b8e02f643373 000000000000 000000000000
48 1 3 3 1 4 5d9299349fc0 000000000000 000000000000
49
43 % Trying to strip revision 0
50 % Trying to strip revision 0
44 saving bundle to strip-backup/cbb8c2f0a2e3-backup
51 saving bundle to strip-backup/cbb8c2f0a2e3-backup
45 saving bundle to strip-backup/cbb8c2f0a2e3-temp
52 saving bundle to strip-backup/cbb8c2f0a2e3-temp
46 adding branch
53 adding branch
47 adding changesets
54 adding changesets
48 adding manifests
55 adding manifests
49 adding file changes
56 adding file changes
50 added 2 changesets with 12 changes to 6 files (+1 heads)
57 added 4 changesets with 15 changes to 7 files (+3 heads)
51 % Verifying
58 % Verifying
52 checking changesets
59 checking changesets
53 checking manifests
60 checking manifests
54 crosschecking files in changesets and manifests
61 crosschecking files in changesets and manifests
55 checking files
62 checking files
56 6 files, 2 changesets, 12 total revisions
63 7 files, 4 changesets, 15 total revisions
57
64
58 % Trying to strip revision 1
65 % Trying to strip revision 1
59 saving bundle to strip-backup/124ecc0cbec9-backup
66 saving bundle to strip-backup/124ecc0cbec9-backup
60 saving bundle to strip-backup/124ecc0cbec9-temp
67 saving bundle to strip-backup/124ecc0cbec9-temp
61 adding branch
68 adding branch
62 adding changesets
69 adding changesets
63 adding manifests
70 adding manifests
64 adding file changes
71 adding file changes
65 added 1 changesets with 10 changes to 6 files (+1 heads)
72 added 3 changesets with 12 changes to 7 files (+3 heads)
66 % Verifying
73 % Verifying
67 checking changesets
74 checking changesets
68 checking manifests
75 checking manifests
69 crosschecking files in changesets and manifests
76 crosschecking files in changesets and manifests
70 checking files
77 checking files
71 6 files, 2 changesets, 12 total revisions
78 7 files, 4 changesets, 14 total revisions
72
79
73 % Trying to strip revision 2
80 % Trying to strip revision 2
74 saving bundle to strip-backup/f6439b304a1a-backup
81 saving bundle to strip-backup/f6439b304a1a-backup
75 saving bundle to strip-backup/f6439b304a1a-temp
82 saving bundle to strip-backup/f6439b304a1a-temp
76 adding branch
83 adding branch
77 adding changesets
84 adding changesets
78 adding manifests
85 adding manifests
79 adding file changes
86 adding file changes
80 added 0 changesets with 6 changes to 4 files
87 added 2 changesets with 8 changes to 6 files (+2 heads)
81 % Verifying
88 % Verifying
82 checking changesets
89 checking changesets
83 checking manifests
90 checking manifests
84 crosschecking files in changesets and manifests
91 crosschecking files in changesets and manifests
85 checking files
92 checking files
86 6 files, 2 changesets, 12 total revisions
93 7 files, 4 changesets, 14 total revisions
87
94
95 % Trying to strip revision 3
96 saving bundle to strip-backup/6e54ec5db740-backup
97 saving bundle to strip-backup/6e54ec5db740-temp
98 adding branch
99 adding changesets
100 adding manifests
101 adding file changes
102 added 1 changesets with 1 changes to 2 files (+1 heads)
103 % Verifying
104 checking changesets
105 checking manifests
106 crosschecking files in changesets and manifests
107 checking files
108 7 files, 4 changesets, 19 total revisions
109
110 % Trying to strip revision 4
111 saving bundle to strip-backup/9147ea23c156-backup
112 % Verifying
113 checking changesets
114 checking manifests
115 crosschecking files in changesets and manifests
116 checking files
117 7 files, 4 changesets, 19 total revisions
118
General Comments 0
You need to be logged in to leave comments. Login now