##// END OF EJS Templates
tests: create a bundle to bootstrap tests using a remote repository...
Nicolas Dumazet -
r14117:07708f41 default
parent child Browse files
Show More
1 NO CONTENT: new file 100644, binary diff hidden
@@ -0,0 +1,32 b''
1 #!/bin/bash
2 hg init remote
3 cd remote
4
5 echo "0" >> afile
6 hg add afile
7 hg commit -m "0.0"
8 echo "1" >> afile
9 hg commit -m "0.1"
10 echo "2" >> afile
11 hg commit -m "0.2"
12 echo "3" >> afile
13 hg commit -m "0.3"
14 hg update -C 0
15 echo "1" >> afile
16 hg commit -m "1.1"
17 echo "2" >> afile
18 hg commit -m "1.2"
19 echo "a line" > fred
20 echo "3" >> afile
21 hg add fred
22 hg commit -m "1.3"
23 hg mv afile adifferentfile
24 hg commit -m "1.3m"
25 hg update -C 3
26 hg mv afile anotherfile
27 hg commit -m "0.3m"
28
29 hg bundle -a ../remote.hg
30
31 cd ..
32 rm -Rf remote
@@ -1,62 +1,15 b''
1 1 $ hg init test
2 2 $ cd test
3 $ echo "0" >> afile
4 $ hg add afile
5 $ hg commit -m "0.0"
6 $ echo "1" >> afile
7 $ hg commit -m "0.1"
8 $ echo "2" >> afile
9 $ hg commit -m "0.2"
10 $ echo "3" >> afile
11 $ hg commit -m "0.3"
12 $ hg update -C 0
3 $ hg unbundle $TESTDIR/bundles/remote.hg
4 adding changesets
5 adding manifests
6 adding file changes
7 added 9 changesets with 7 changes to 4 files (+1 heads)
8 (run 'hg heads' to see heads, 'hg merge' to merge)
9 $ hg up tip
13 10 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
14 $ echo "1" >> afile
15 $ hg commit -m "1.1"
16 created new head
17 $ echo "2" >> afile
18 $ hg commit -m "1.2"
19 $ echo "a line" > fred
20 $ echo "3" >> afile
21 $ hg add fred
22 $ hg commit -m "1.3"
23 $ hg mv afile adifferentfile
24 $ hg commit -m "1.3m"
25 $ hg update -C 3
26 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
27 $ hg mv afile anotherfile
28 $ hg commit -m "0.3m"
29 $ hg debugindex .hg/store/data/afile.i
30 rev offset length base linkrev nodeid p1 p2
31 0 0 3 0 0 362fef284ce2 000000000000 000000000000
32 1 3 5 1 1 125144f7e028 362fef284ce2 000000000000
33 2 8 7 2 2 4c982badb186 125144f7e028 000000000000
34 3 15 9 3 3 19b1fc555737 4c982badb186 000000000000
35 $ hg debugindex .hg/store/data/adifferentfile.i
36 rev offset length base linkrev nodeid p1 p2
37 0 0 75 0 7 2565f3199a74 000000000000 000000000000
38 $ hg debugindex .hg/store/data/anotherfile.i
39 rev offset length base linkrev nodeid p1 p2
40 0 0 75 0 8 2565f3199a74 000000000000 000000000000
41 $ hg debugindex .hg/store/data/fred.i
42 rev offset length base linkrev nodeid p1 p2
43 0 0 8 0 6 12ab3bcc5ea4 000000000000 000000000000
44 $ hg debugindex .hg/store/00manifest.i
45 rev offset length base linkrev nodeid p1 p2
46 0 0 48 0 0 43eadb1d2d06 000000000000 000000000000
47 1 48 48 1 1 8b89697eba2c 43eadb1d2d06 000000000000
48 2 96 48 2 2 626a32663c2f 8b89697eba2c 000000000000
49 3 144 48 3 3 f54c32f13478 626a32663c2f 000000000000
50 4 192 58 3 6 de68e904d169 626a32663c2f 000000000000
51 5 250 68 3 7 09bb521d218d de68e904d169 000000000000
52 6 318 54 6 8 1fde233dfb0f f54c32f13478 000000000000
53 $ hg verify
54 checking changesets
55 checking manifests
56 crosschecking files in changesets and manifests
57 checking files
58 4 files, 9 changesets, 7 total revisions
59 11 $ cd ..
12
60 13 $ for i in 0 1 2 3 4 5 6 7 8; do
61 14 > mkdir test-"$i"
62 15 > hg --cwd test-"$i" init
@@ -79,7 +32,7 b''
79 32 crosschecking files in changesets and manifests
80 33 checking files
81 34 1 files, 1 changesets, 1 total revisions
82 0:f9ee2f85a263
35 0:bfaf4b5cbf01
83 36 searching for changes
84 37 2 changesets found
85 38 adding changesets
@@ -92,7 +45,7 b''
92 45 crosschecking files in changesets and manifests
93 46 checking files
94 47 1 files, 2 changesets, 2 total revisions
95 1:34c2bf6b0626
48 1:21f32785131f
96 49 searching for changes
97 50 3 changesets found
98 51 adding changesets
@@ -105,7 +58,7 b''
105 58 crosschecking files in changesets and manifests
106 59 checking files
107 60 1 files, 3 changesets, 3 total revisions
108 2:e38ba6f5b7e0
61 2:4ce51a113780
109 62 searching for changes
110 63 4 changesets found
111 64 adding changesets
@@ -118,7 +71,7 b''
118 71 crosschecking files in changesets and manifests
119 72 checking files
120 73 1 files, 4 changesets, 4 total revisions
121 3:eebf5a27f8ca
74 3:93ee6ab32777
122 75 searching for changes
123 76 2 changesets found
124 77 adding changesets
@@ -131,7 +84,7 b''
131 84 crosschecking files in changesets and manifests
132 85 checking files
133 86 1 files, 2 changesets, 2 total revisions
134 1:095197eb4973
87 1:c70afb1ee985
135 88 searching for changes
136 89 3 changesets found
137 90 adding changesets
@@ -144,7 +97,7 b''
144 97 crosschecking files in changesets and manifests
145 98 checking files
146 99 1 files, 3 changesets, 3 total revisions
147 2:1bb50a9436a7
100 2:f03ae5a9b979
148 101 searching for changes
149 102 4 changesets found
150 103 adding changesets
@@ -157,7 +110,7 b''
157 110 crosschecking files in changesets and manifests
158 111 checking files
159 112 2 files, 4 changesets, 5 total revisions
160 3:7373c1169842
113 3:095cb14b1b4d
161 114 searching for changes
162 115 5 changesets found
163 116 adding changesets
@@ -170,7 +123,7 b''
170 123 crosschecking files in changesets and manifests
171 124 checking files
172 125 3 files, 5 changesets, 6 total revisions
173 4:a6a34bfa0076
126 4:faa2e4234c7a
174 127 searching for changes
175 128 5 changesets found
176 129 adding changesets
@@ -183,7 +136,7 b''
183 136 crosschecking files in changesets and manifests
184 137 checking files
185 138 2 files, 5 changesets, 5 total revisions
186 4:aa35859c02ea
139 4:916f1afdef90
187 140 $ cd test-8
188 141 $ hg pull ../test-7
189 142 pulling from ../test-7
@@ -247,18 +200,18 b' result'
247 200 revision 2
248 201
249 202 $ hg tip -q
250 2:e38ba6f5b7e0
203 2:4ce51a113780
251 204 $ hg unbundle ../test-bundle-should-fail.hg
252 205 adding changesets
253 206 transaction abort!
254 207 rollback completed
255 abort: 00changelog.i@eebf5a27f8ca: unknown parent!
208 abort: 00changelog.i@93ee6ab32777: unknown parent!
256 209 [255]
257 210
258 211 revision 2
259 212
260 213 $ hg tip -q
261 2:e38ba6f5b7e0
214 2:4ce51a113780
262 215 $ hg unbundle ../test-bundle-all.hg
263 216 adding changesets
264 217 adding manifests
@@ -269,7 +222,7 b' revision 2'
269 222 revision 8
270 223
271 224 $ hg tip -q
272 8:aa35859c02ea
225 8:916f1afdef90
273 226 $ hg verify
274 227 checking changesets
275 228 checking manifests
@@ -283,7 +236,7 b' revision 8'
283 236 revision 2
284 237
285 238 $ hg tip -q
286 2:e38ba6f5b7e0
239 2:4ce51a113780
287 240 $ hg unbundle ../test-bundle-branch1.hg
288 241 adding changesets
289 242 adding manifests
@@ -294,7 +247,7 b' revision 2'
294 247 revision 4
295 248
296 249 $ hg tip -q
297 4:aa35859c02ea
250 4:916f1afdef90
298 251 $ hg verify
299 252 checking changesets
300 253 checking manifests
@@ -314,7 +267,7 b' revision 4'
314 267 revision 6
315 268
316 269 $ hg tip -q
317 6:a6a34bfa0076
270 6:faa2e4234c7a
318 271 $ hg verify
319 272 checking changesets
320 273 checking manifests
@@ -334,7 +287,7 b' revision 6'
334 287 revision 4
335 288
336 289 $ hg tip -q
337 4:aa35859c02ea
290 4:916f1afdef90
338 291 $ hg verify
339 292 checking changesets
340 293 checking manifests
@@ -367,7 +320,7 b' revision 4'
367 320 revision 9
368 321
369 322 $ hg tip -q
370 9:905597b0d5d4
323 9:03fc0b0e347c
371 324 $ hg verify
372 325 checking changesets
373 326 checking manifests
@@ -1,81 +1,15 b''
1 creating 'remote
1 2
2 3 $ hg init remote
3 4 $ cd remote
4
5 creating 'remote
6
7 $ cat >>afile <<EOF
8 > 0
9 > EOF
10 $ hg add afile
11 $ hg commit -m "0.0"
12 $ cat >>afile <<EOF
13 > 1
14 > EOF
15 $ hg commit -m "0.1"
16 $ cat >>afile <<EOF
17 > 2
18 > EOF
19 $ hg commit -m "0.2"
20 $ cat >>afile <<EOF
21 > 3
22 > EOF
23 $ hg commit -m "0.3"
24 $ hg update -C 0
5 $ hg unbundle $TESTDIR/bundles/remote.hg
6 adding changesets
7 adding manifests
8 adding file changes
9 added 9 changesets with 7 changes to 4 files (+1 heads)
10 (run 'hg heads' to see heads, 'hg merge' to merge)
11 $ hg up tip
25 12 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
26 $ cat >>afile <<EOF
27 > 1
28 > EOF
29 $ hg commit -m "1.1"
30 created new head
31 $ cat >>afile <<EOF
32 > 2
33 > EOF
34 $ hg commit -m "1.2"
35 $ cat >fred <<EOF
36 > a line
37 > EOF
38 $ cat >>afile <<EOF
39 > 3
40 > EOF
41 $ hg add fred
42 $ hg commit -m "1.3"
43 $ hg mv afile adifferentfile
44 $ hg commit -m "1.3m"
45 $ hg update -C 3
46 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
47 $ hg mv afile anotherfile
48 $ hg commit -m "0.3m"
49 $ hg debugindex .hg/store/data/afile.i
50 rev offset length base linkrev nodeid p1 p2
51 0 0 3 0 0 362fef284ce2 000000000000 000000000000
52 1 3 5 1 1 125144f7e028 362fef284ce2 000000000000
53 2 8 7 2 2 4c982badb186 125144f7e028 000000000000
54 3 15 9 3 3 19b1fc555737 4c982badb186 000000000000
55 $ hg debugindex .hg/store/data/adifferentfile.i
56 rev offset length base linkrev nodeid p1 p2
57 0 0 75 0 7 2565f3199a74 000000000000 000000000000
58 $ hg debugindex .hg/store/data/anotherfile.i
59 rev offset length base linkrev nodeid p1 p2
60 0 0 75 0 8 2565f3199a74 000000000000 000000000000
61 $ hg debugindex .hg/store/data/fred.i
62 rev offset length base linkrev nodeid p1 p2
63 0 0 8 0 6 12ab3bcc5ea4 000000000000 000000000000
64 $ hg debugindex .hg/store/00manifest.i
65 rev offset length base linkrev nodeid p1 p2
66 0 0 48 0 0 43eadb1d2d06 000000000000 000000000000
67 1 48 48 1 1 8b89697eba2c 43eadb1d2d06 000000000000
68 2 96 48 2 2 626a32663c2f 8b89697eba2c 000000000000
69 3 144 48 3 3 f54c32f13478 626a32663c2f 000000000000
70 4 192 58 3 6 de68e904d169 626a32663c2f 000000000000
71 5 250 68 3 7 09bb521d218d de68e904d169 000000000000
72 6 318 54 6 8 1fde233dfb0f f54c32f13478 000000000000
73 $ hg verify
74 checking changesets
75 checking manifests
76 crosschecking files in changesets and manifests
77 checking files
78 4 files, 9 changesets, 7 total revisions
79 13
80 14 Starting server
81 15
@@ -1,95 +1,13 b''
1 1 $ hg init test
2 2 $ cd test
3
4 $ cat >>afile <<EOF
5 > 0
6 > EOF
7 $ hg add afile
8 $ hg commit -m "0.0"
9
10 $ cat >>afile <<EOF
11 > 1
12 > EOF
13 $ hg commit -m "0.1"
14
15 $ cat >>afile <<EOF
16 > 2
17 > EOF
18 $ hg commit -m "0.2"
19
20 $ cat >>afile <<EOF
21 > 3
22 > EOF
23 $ hg commit -m "0.3"
24
25 $ hg update -C 0
3 $ hg unbundle $TESTDIR/bundles/remote.hg
4 adding changesets
5 adding manifests
6 adding file changes
7 added 9 changesets with 7 changes to 4 files (+1 heads)
8 (run 'hg heads' to see heads, 'hg merge' to merge)
9 $ hg up tip
26 10 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
27
28 $ cat >>afile <<EOF
29 > 1
30 > EOF
31 $ hg commit -m "1.1"
32 created new head
33
34 $ cat >>afile <<EOF
35 > 2
36 > EOF
37 $ hg commit -m "1.2"
38
39 $ cat >fred <<EOF
40 > a line
41 > EOF
42 $ cat >>afile <<EOF
43 > 3
44 > EOF
45 $ hg add fred
46 $ hg commit -m "1.3"
47
48 $ hg mv afile adifferentfile
49 $ hg commit -m "1.3m"
50
51 $ hg update -C 3
52 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
53
54 $ hg mv afile anotherfile
55 $ hg commit -m "0.3m"
56
57 $ hg debugindex .hg/store/data/afile.i
58 rev offset length base linkrev nodeid p1 p2
59 0 0 3 0 0 362fef284ce2 000000000000 000000000000
60 1 3 5 1 1 125144f7e028 362fef284ce2 000000000000
61 2 8 7 2 2 4c982badb186 125144f7e028 000000000000
62 3 15 9 3 3 19b1fc555737 4c982badb186 000000000000
63
64 $ hg debugindex .hg/store/data/adifferentfile.i
65 rev offset length base linkrev nodeid p1 p2
66 0 0 75 0 7 2565f3199a74 000000000000 000000000000
67
68 $ hg debugindex .hg/store/data/anotherfile.i
69 rev offset length base linkrev nodeid p1 p2
70 0 0 75 0 8 2565f3199a74 000000000000 000000000000
71
72 $ hg debugindex .hg/store/data/fred.i
73 rev offset length base linkrev nodeid p1 p2
74 0 0 8 0 6 12ab3bcc5ea4 000000000000 000000000000
75
76 $ hg debugindex .hg/store/00manifest.i
77 rev offset length base linkrev nodeid p1 p2
78 0 0 48 0 0 43eadb1d2d06 000000000000 000000000000
79 1 48 48 1 1 8b89697eba2c 43eadb1d2d06 000000000000
80 2 96 48 2 2 626a32663c2f 8b89697eba2c 000000000000
81 3 144 48 3 3 f54c32f13478 626a32663c2f 000000000000
82 4 192 58 3 6 de68e904d169 626a32663c2f 000000000000
83 5 250 68 3 7 09bb521d218d de68e904d169 000000000000
84 6 318 54 6 8 1fde233dfb0f f54c32f13478 000000000000
85
86 $ hg verify
87 checking changesets
88 checking manifests
89 crosschecking files in changesets and manifests
90 checking files
91 4 files, 9 changesets, 7 total revisions
92
93 11 $ cd ..
94 12
95 13 $ for i in 0 1 2 3 4 5 6 7 8; do
@@ -22,83 +22,19 b' This test tries to exercise the ssh func'
22 22 > r = os.system(sys.argv[2])
23 23 > sys.exit(bool(r))
24 24 > EOF
25 $ hg init remote
26 $ cd remote
27 25
28 26 creating 'remote
29 27
30 $ cat >>afile <<EOF
31 > 0
32 > EOF
33 $ hg add afile
34 $ hg commit -m "0.0"
35 $ cat >>afile <<EOF
36 > 1
37 > EOF
38 $ hg commit -m "0.1"
39 $ cat >>afile <<EOF
40 > 2
41 > EOF
42 $ hg commit -m "0.2"
43 $ cat >>afile <<EOF
44 > 3
45 > EOF
46 $ hg commit -m "0.3"
47 $ hg update -C 0
28 $ hg init remote
29 $ cd remote
30 $ hg unbundle $TESTDIR/bundles/remote.hg
31 adding changesets
32 adding manifests
33 adding file changes
34 added 9 changesets with 7 changes to 4 files (+1 heads)
35 (run 'hg heads' to see heads, 'hg merge' to merge)
36 $ hg up tip
48 37 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
49 $ cat >>afile <<EOF
50 > 1
51 > EOF
52 $ hg commit -m "1.1"
53 created new head
54 $ cat >>afile <<EOF
55 > 2
56 > EOF
57 $ hg commit -m "1.2"
58 $ cat >fred <<EOF
59 > a line
60 > EOF
61 $ cat >>afile <<EOF
62 > 3
63 > EOF
64 $ hg add fred
65 $ hg commit -m "1.3"
66 $ hg mv afile adifferentfile
67 $ hg commit -m "1.3m"
68 $ hg update -C 3
69 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
70 $ hg mv afile anotherfile
71 $ hg commit -m "0.3m"
72 $ hg debugindex .hg/store/data/afile.i
73 rev offset length base linkrev nodeid p1 p2
74 0 0 3 0 0 362fef284ce2 000000000000 000000000000
75 1 3 5 1 1 125144f7e028 362fef284ce2 000000000000
76 2 8 7 2 2 4c982badb186 125144f7e028 000000000000
77 3 15 9 3 3 19b1fc555737 4c982badb186 000000000000
78 $ hg debugindex .hg/store/data/adifferentfile.i
79 rev offset length base linkrev nodeid p1 p2
80 0 0 75 0 7 2565f3199a74 000000000000 000000000000
81 $ hg debugindex .hg/store/data/anotherfile.i
82 rev offset length base linkrev nodeid p1 p2
83 0 0 75 0 8 2565f3199a74 000000000000 000000000000
84 $ hg debugindex .hg/store/data/fred.i
85 rev offset length base linkrev nodeid p1 p2
86 0 0 8 0 6 12ab3bcc5ea4 000000000000 000000000000
87 $ hg debugindex .hg/store/00manifest.i
88 rev offset length base linkrev nodeid p1 p2
89 0 0 48 0 0 43eadb1d2d06 000000000000 000000000000
90 1 48 48 1 1 8b89697eba2c 43eadb1d2d06 000000000000
91 2 96 48 2 2 626a32663c2f 8b89697eba2c 000000000000
92 3 144 48 3 3 f54c32f13478 626a32663c2f 000000000000
93 4 192 58 3 6 de68e904d169 626a32663c2f 000000000000
94 5 250 68 3 7 09bb521d218d de68e904d169 000000000000
95 6 318 54 6 8 1fde233dfb0f f54c32f13478 000000000000
96 $ hg verify
97 checking changesets
98 checking manifests
99 crosschecking files in changesets and manifests
100 checking files
101 4 files, 9 changesets, 7 total revisions
102 38 $ cd ..
103 39
104 40 clone remote via stream
General Comments 0
You need to be logged in to leave comments. Login now