##// END OF EJS Templates
test: use generaldelta for test-bundle.t...
Pierre-Yves David -
r26923:608cabec default
parent child Browse files
Show More
@@ -1,717 +1,725 b''
1
2 $ cat << EOF >> $HGRCPATH
3 > [format]
4 > usegeneraldelta=yes
5 > EOF
6
1 Setting up test
7 Setting up test
2
8
3 $ hg init test
9 $ hg init test
4 $ cd test
10 $ cd test
5 $ echo 0 > afile
11 $ echo 0 > afile
6 $ hg add afile
12 $ hg add afile
7 $ hg commit -m "0.0"
13 $ hg commit -m "0.0"
8 $ echo 1 >> afile
14 $ echo 1 >> afile
9 $ hg commit -m "0.1"
15 $ hg commit -m "0.1"
10 $ echo 2 >> afile
16 $ echo 2 >> afile
11 $ hg commit -m "0.2"
17 $ hg commit -m "0.2"
12 $ echo 3 >> afile
18 $ echo 3 >> afile
13 $ hg commit -m "0.3"
19 $ hg commit -m "0.3"
14 $ hg update -C 0
20 $ hg update -C 0
15 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
21 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
16 $ echo 1 >> afile
22 $ echo 1 >> afile
17 $ hg commit -m "1.1"
23 $ hg commit -m "1.1"
18 created new head
24 created new head
19 $ echo 2 >> afile
25 $ echo 2 >> afile
20 $ hg commit -m "1.2"
26 $ hg commit -m "1.2"
21 $ echo "a line" > fred
27 $ echo "a line" > fred
22 $ echo 3 >> afile
28 $ echo 3 >> afile
23 $ hg add fred
29 $ hg add fred
24 $ hg commit -m "1.3"
30 $ hg commit -m "1.3"
25 $ hg mv afile adifferentfile
31 $ hg mv afile adifferentfile
26 $ hg commit -m "1.3m"
32 $ hg commit -m "1.3m"
27 $ hg update -C 3
33 $ hg update -C 3
28 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
34 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
29 $ hg mv afile anotherfile
35 $ hg mv afile anotherfile
30 $ hg commit -m "0.3m"
36 $ hg commit -m "0.3m"
31 $ hg verify
37 $ hg verify
32 checking changesets
38 checking changesets
33 checking manifests
39 checking manifests
34 crosschecking files in changesets and manifests
40 crosschecking files in changesets and manifests
35 checking files
41 checking files
36 4 files, 9 changesets, 7 total revisions
42 4 files, 9 changesets, 7 total revisions
37 $ cd ..
43 $ cd ..
38 $ hg init empty
44 $ hg init empty
39
45
40 Bundle and phase
46 Bundle and phase
41
47
42 $ hg -R test phase --force --secret 0
48 $ hg -R test phase --force --secret 0
43 $ hg -R test bundle phase.hg empty
49 $ hg -R test bundle phase.hg empty
44 searching for changes
50 searching for changes
45 no changes found (ignored 9 secret changesets)
51 no changes found (ignored 9 secret changesets)
46 [1]
52 [1]
47 $ hg -R test phase --draft -r 'head()'
53 $ hg -R test phase --draft -r 'head()'
48
54
49 Bundle --all
55 Bundle --all
50
56
51 $ hg -R test bundle --all all.hg
57 $ hg -R test bundle --all all.hg
52 9 changesets found
58 9 changesets found
53
59
54 Bundle test to full.hg
60 Bundle test to full.hg
55
61
56 $ hg -R test bundle full.hg empty
62 $ hg -R test bundle full.hg empty
57 searching for changes
63 searching for changes
58 9 changesets found
64 9 changesets found
59
65
60 Unbundle full.hg in test
66 Unbundle full.hg in test
61
67
62 $ hg -R test unbundle full.hg
68 $ hg -R test unbundle full.hg
63 adding changesets
69 adding changesets
64 adding manifests
70 adding manifests
65 adding file changes
71 adding file changes
66 added 0 changesets with 0 changes to 4 files
72 added 0 changesets with 0 changes to 4 files
67 (run 'hg update' to get a working copy)
73 (run 'hg update' to get a working copy)
68
74
69 Verify empty
75 Verify empty
70
76
71 $ hg -R empty heads
77 $ hg -R empty heads
72 [1]
78 [1]
73 $ hg -R empty verify
79 $ hg -R empty verify
74 checking changesets
80 checking changesets
75 checking manifests
81 checking manifests
76 crosschecking files in changesets and manifests
82 crosschecking files in changesets and manifests
77 checking files
83 checking files
78 0 files, 0 changesets, 0 total revisions
84 0 files, 0 changesets, 0 total revisions
79
85
80 Pull full.hg into test (using --cwd)
86 Pull full.hg into test (using --cwd)
81
87
82 $ hg --cwd test pull ../full.hg
88 $ hg --cwd test pull ../full.hg
83 pulling from ../full.hg
89 pulling from ../full.hg
84 searching for changes
90 searching for changes
85 no changes found
91 no changes found
86
92
87 Verify that there are no leaked temporary files after pull (issue2797)
93 Verify that there are no leaked temporary files after pull (issue2797)
88
94
89 $ ls test/.hg | grep .hg10un
95 $ ls test/.hg | grep .hg10un
90 [1]
96 [1]
91
97
92 Pull full.hg into empty (using --cwd)
98 Pull full.hg into empty (using --cwd)
93
99
94 $ hg --cwd empty pull ../full.hg
100 $ hg --cwd empty pull ../full.hg
95 pulling from ../full.hg
101 pulling from ../full.hg
96 requesting all changes
102 requesting all changes
97 adding changesets
103 adding changesets
98 adding manifests
104 adding manifests
99 adding file changes
105 adding file changes
100 added 9 changesets with 7 changes to 4 files (+1 heads)
106 added 9 changesets with 7 changes to 4 files (+1 heads)
101 (run 'hg heads' to see heads, 'hg merge' to merge)
107 (run 'hg heads' to see heads, 'hg merge' to merge)
102
108
103 Rollback empty
109 Rollback empty
104
110
105 $ hg -R empty rollback
111 $ hg -R empty rollback
106 repository tip rolled back to revision -1 (undo pull)
112 repository tip rolled back to revision -1 (undo pull)
107
113
108 Pull full.hg into empty again (using --cwd)
114 Pull full.hg into empty again (using --cwd)
109
115
110 $ hg --cwd empty pull ../full.hg
116 $ hg --cwd empty pull ../full.hg
111 pulling from ../full.hg
117 pulling from ../full.hg
112 requesting all changes
118 requesting all changes
113 adding changesets
119 adding changesets
114 adding manifests
120 adding manifests
115 adding file changes
121 adding file changes
116 added 9 changesets with 7 changes to 4 files (+1 heads)
122 added 9 changesets with 7 changes to 4 files (+1 heads)
117 (run 'hg heads' to see heads, 'hg merge' to merge)
123 (run 'hg heads' to see heads, 'hg merge' to merge)
118
124
119 Pull full.hg into test (using -R)
125 Pull full.hg into test (using -R)
120
126
121 $ hg -R test pull full.hg
127 $ hg -R test pull full.hg
122 pulling from full.hg
128 pulling from full.hg
123 searching for changes
129 searching for changes
124 no changes found
130 no changes found
125
131
126 Pull full.hg into empty (using -R)
132 Pull full.hg into empty (using -R)
127
133
128 $ hg -R empty pull full.hg
134 $ hg -R empty pull full.hg
129 pulling from full.hg
135 pulling from full.hg
130 searching for changes
136 searching for changes
131 no changes found
137 no changes found
132
138
133 Rollback empty
139 Rollback empty
134
140
135 $ hg -R empty rollback
141 $ hg -R empty rollback
136 repository tip rolled back to revision -1 (undo pull)
142 repository tip rolled back to revision -1 (undo pull)
137
143
138 Pull full.hg into empty again (using -R)
144 Pull full.hg into empty again (using -R)
139
145
140 $ hg -R empty pull full.hg
146 $ hg -R empty pull full.hg
141 pulling from full.hg
147 pulling from full.hg
142 requesting all changes
148 requesting all changes
143 adding changesets
149 adding changesets
144 adding manifests
150 adding manifests
145 adding file changes
151 adding file changes
146 added 9 changesets with 7 changes to 4 files (+1 heads)
152 added 9 changesets with 7 changes to 4 files (+1 heads)
147 (run 'hg heads' to see heads, 'hg merge' to merge)
153 (run 'hg heads' to see heads, 'hg merge' to merge)
148
154
149 Log -R full.hg in fresh empty
155 Log -R full.hg in fresh empty
150
156
151 $ rm -r empty
157 $ rm -r empty
152 $ hg init empty
158 $ hg init empty
153 $ cd empty
159 $ cd empty
154 $ hg -R bundle://../full.hg log
160 $ hg -R bundle://../full.hg log
155 changeset: 8:aa35859c02ea
161 changeset: 8:aa35859c02ea
156 tag: tip
162 tag: tip
157 parent: 3:eebf5a27f8ca
163 parent: 3:eebf5a27f8ca
158 user: test
164 user: test
159 date: Thu Jan 01 00:00:00 1970 +0000
165 date: Thu Jan 01 00:00:00 1970 +0000
160 summary: 0.3m
166 summary: 0.3m
161
167
162 changeset: 7:a6a34bfa0076
168 changeset: 7:a6a34bfa0076
163 user: test
169 user: test
164 date: Thu Jan 01 00:00:00 1970 +0000
170 date: Thu Jan 01 00:00:00 1970 +0000
165 summary: 1.3m
171 summary: 1.3m
166
172
167 changeset: 6:7373c1169842
173 changeset: 6:7373c1169842
168 user: test
174 user: test
169 date: Thu Jan 01 00:00:00 1970 +0000
175 date: Thu Jan 01 00:00:00 1970 +0000
170 summary: 1.3
176 summary: 1.3
171
177
172 changeset: 5:1bb50a9436a7
178 changeset: 5:1bb50a9436a7
173 user: test
179 user: test
174 date: Thu Jan 01 00:00:00 1970 +0000
180 date: Thu Jan 01 00:00:00 1970 +0000
175 summary: 1.2
181 summary: 1.2
176
182
177 changeset: 4:095197eb4973
183 changeset: 4:095197eb4973
178 parent: 0:f9ee2f85a263
184 parent: 0:f9ee2f85a263
179 user: test
185 user: test
180 date: Thu Jan 01 00:00:00 1970 +0000
186 date: Thu Jan 01 00:00:00 1970 +0000
181 summary: 1.1
187 summary: 1.1
182
188
183 changeset: 3:eebf5a27f8ca
189 changeset: 3:eebf5a27f8ca
184 user: test
190 user: test
185 date: Thu Jan 01 00:00:00 1970 +0000
191 date: Thu Jan 01 00:00:00 1970 +0000
186 summary: 0.3
192 summary: 0.3
187
193
188 changeset: 2:e38ba6f5b7e0
194 changeset: 2:e38ba6f5b7e0
189 user: test
195 user: test
190 date: Thu Jan 01 00:00:00 1970 +0000
196 date: Thu Jan 01 00:00:00 1970 +0000
191 summary: 0.2
197 summary: 0.2
192
198
193 changeset: 1:34c2bf6b0626
199 changeset: 1:34c2bf6b0626
194 user: test
200 user: test
195 date: Thu Jan 01 00:00:00 1970 +0000
201 date: Thu Jan 01 00:00:00 1970 +0000
196 summary: 0.1
202 summary: 0.1
197
203
198 changeset: 0:f9ee2f85a263
204 changeset: 0:f9ee2f85a263
199 user: test
205 user: test
200 date: Thu Jan 01 00:00:00 1970 +0000
206 date: Thu Jan 01 00:00:00 1970 +0000
201 summary: 0.0
207 summary: 0.0
202
208
203 Make sure bundlerepo doesn't leak tempfiles (issue2491)
209 Make sure bundlerepo doesn't leak tempfiles (issue2491)
204
210
205 $ ls .hg
211 $ ls .hg
206 00changelog.i
212 00changelog.i
207 cache
213 cache
208 requires
214 requires
209 store
215 store
210
216
211 Pull ../full.hg into empty (with hook)
217 Pull ../full.hg into empty (with hook)
212
218
213 $ echo "[hooks]" >> .hg/hgrc
219 $ echo "[hooks]" >> .hg/hgrc
214 $ echo "changegroup = printenv.py changegroup" >> .hg/hgrc
220 $ echo "changegroup = printenv.py changegroup" >> .hg/hgrc
215
221
216 doesn't work (yet ?)
222 doesn't work (yet ?)
217
223
218 hg -R bundle://../full.hg verify
224 hg -R bundle://../full.hg verify
219
225
220 $ hg pull bundle://../full.hg
226 $ hg pull bundle://../full.hg
221 pulling from bundle:../full.hg
227 pulling from bundle:../full.hg
222 requesting all changes
228 requesting all changes
223 adding changesets
229 adding changesets
224 adding manifests
230 adding manifests
225 adding file changes
231 adding file changes
226 added 9 changesets with 7 changes to 4 files (+1 heads)
232 added 9 changesets with 7 changes to 4 files (+1 heads)
227 changegroup hook: HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=bundle:../full.hg (glob)
233 changegroup hook: HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=bundle:../full.hg (glob)
228 (run 'hg heads' to see heads, 'hg merge' to merge)
234 (run 'hg heads' to see heads, 'hg merge' to merge)
229
235
230 Rollback empty
236 Rollback empty
231
237
232 $ hg rollback
238 $ hg rollback
233 repository tip rolled back to revision -1 (undo pull)
239 repository tip rolled back to revision -1 (undo pull)
234 $ cd ..
240 $ cd ..
235
241
236 Log -R bundle:empty+full.hg
242 Log -R bundle:empty+full.hg
237
243
238 $ hg -R bundle:empty+full.hg log --template="{rev} "; echo ""
244 $ hg -R bundle:empty+full.hg log --template="{rev} "; echo ""
239 8 7 6 5 4 3 2 1 0
245 8 7 6 5 4 3 2 1 0
240
246
241 Pull full.hg into empty again (using -R; with hook)
247 Pull full.hg into empty again (using -R; with hook)
242
248
243 $ hg -R empty pull full.hg
249 $ hg -R empty pull full.hg
244 pulling from full.hg
250 pulling from full.hg
245 requesting all changes
251 requesting all changes
246 adding changesets
252 adding changesets
247 adding manifests
253 adding manifests
248 adding file changes
254 adding file changes
249 added 9 changesets with 7 changes to 4 files (+1 heads)
255 added 9 changesets with 7 changes to 4 files (+1 heads)
250 changegroup hook: HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=bundle:empty+full.hg (glob)
256 changegroup hook: HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=bundle:empty+full.hg (glob)
251 (run 'hg heads' to see heads, 'hg merge' to merge)
257 (run 'hg heads' to see heads, 'hg merge' to merge)
252
258
253 Cannot produce streaming clone bundles with "hg bundle"
259 Cannot produce streaming clone bundles with "hg bundle"
254
260
255 $ hg -R test bundle -t packed1 packed.hg
261 $ hg -R test bundle -t packed1 packed.hg
256 abort: packed bundles cannot be produced by "hg bundle"
262 abort: packed bundles cannot be produced by "hg bundle"
257 (use "hg debugcreatestreamclonebundle")
263 (use "hg debugcreatestreamclonebundle")
258 [255]
264 [255]
259
265
260 packed1 is produced properly
266 packed1 is produced properly
261
267
262 $ hg -R test debugcreatestreamclonebundle packed.hg
268 $ hg -R test debugcreatestreamclonebundle packed.hg
263 writing 2608 bytes for 6 files
269 writing 2663 bytes for 6 files
264 bundle requirements: revlogv1
270 bundle requirements: generaldelta, revlogv1
265
271
266 $ f -B 64 --size --sha1 --hexdump packed.hg
272 $ f -B 64 --size --sha1 --hexdump packed.hg
267 packed.hg: size=2758, sha1=864c1c7b490bac9f2950ef5a660668378ac0524e
273 packed.hg: size=2826, sha1=e139f97692a142b19cdcff64a69697d5307ce6d4
268 0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 06 00 00 |HGS1UN..........|
274 0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 06 00 00 |HGS1UN..........|
269 0010: 00 00 00 00 0a 30 00 09 72 65 76 6c 6f 67 76 31 |.....0..revlogv1|
275 0010: 00 00 00 00 0a 67 00 16 67 65 6e 65 72 61 6c 64 |.....g..generald|
270 0020: 00 64 61 74 61 2f 61 64 69 66 66 65 72 65 6e 74 |.data/adifferent|
276 0020: 65 6c 74 61 2c 72 65 76 6c 6f 67 76 31 00 64 61 |elta,revlogv1.da|
271 0030: 66 69 6c 65 2e 69 00 31 33 39 0a 00 01 00 01 00 |file.i.139......|
277 0030: 74 61 2f 61 64 69 66 66 65 72 65 6e 74 66 69 6c |ta/adifferentfil|
272
278
273 generaldelta requirement is listed in stream clone bundles
279 generaldelta requirement is listed in stream clone bundles
274
280
275 $ hg --config format.generaldelta=true init testgd
281 $ hg --config format.generaldelta=true init testgd
276 $ cd testgd
282 $ cd testgd
277 $ touch foo
283 $ touch foo
278 $ hg -q commit -A -m initial
284 $ hg -q commit -A -m initial
279 $ cd ..
285 $ cd ..
280 $ hg -R testgd debugcreatestreamclonebundle packedgd.hg
286 $ hg -R testgd debugcreatestreamclonebundle packedgd.hg
281 writing 301 bytes for 3 files
287 writing 301 bytes for 3 files
282 bundle requirements: generaldelta, revlogv1
288 bundle requirements: generaldelta, revlogv1
283
289
284 $ f -B 64 --size --sha1 --hexdump packedgd.hg
290 $ f -B 64 --size --sha1 --hexdump packedgd.hg
285 packedgd.hg: size=396, sha1=981f9e589799335304a5a9a44caa3623a48d2a9f
291 packedgd.hg: size=396, sha1=981f9e589799335304a5a9a44caa3623a48d2a9f
286 0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 03 00 00 |HGS1UN..........|
292 0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 03 00 00 |HGS1UN..........|
287 0010: 00 00 00 00 01 2d 00 16 67 65 6e 65 72 61 6c 64 |.....-..generald|
293 0010: 00 00 00 00 01 2d 00 16 67 65 6e 65 72 61 6c 64 |.....-..generald|
288 0020: 65 6c 74 61 2c 72 65 76 6c 6f 67 76 31 00 64 61 |elta,revlogv1.da|
294 0020: 65 6c 74 61 2c 72 65 76 6c 6f 67 76 31 00 64 61 |elta,revlogv1.da|
289 0030: 74 61 2f 66 6f 6f 2e 69 00 36 34 0a 00 03 00 01 |ta/foo.i.64.....|
295 0030: 74 61 2f 66 6f 6f 2e 69 00 36 34 0a 00 03 00 01 |ta/foo.i.64.....|
290
296
291 Unpacking packed1 bundles with "hg unbundle" isn't allowed
297 Unpacking packed1 bundles with "hg unbundle" isn't allowed
292
298
293 $ hg init packed
299 $ hg init packed
294 $ hg -R packed unbundle packed.hg
300 $ hg -R packed unbundle packed.hg
295 abort: packed bundles cannot be applied with "hg unbundle"
301 abort: packed bundles cannot be applied with "hg unbundle"
296 (use "hg debugapplystreamclonebundle")
302 (use "hg debugapplystreamclonebundle")
297 [255]
303 [255]
298
304
299 packed1 can be consumed from debug command
305 packed1 can be consumed from debug command
300
306
301 $ hg -R packed debugapplystreamclonebundle packed.hg
307 $ hg -R packed debugapplystreamclonebundle packed.hg
302 6 files to transfer, 2.55 KB of data
308 6 files to transfer, 2.60 KB of data
303 transferred 2.55 KB in *.* seconds (*) (glob)
309 transferred 2.60 KB in *.* seconds (* */sec) (glob)
304
310
305 Does not work on non-empty repo
311 Does not work on non-empty repo
306
312
307 $ hg -R packed debugapplystreamclonebundle packed.hg
313 $ hg -R packed debugapplystreamclonebundle packed.hg
308 abort: cannot apply stream clone bundle on non-empty repo
314 abort: cannot apply stream clone bundle on non-empty repo
309 [255]
315 [255]
310
316
311 Create partial clones
317 Create partial clones
312
318
313 $ rm -r empty
319 $ rm -r empty
314 $ hg init empty
320 $ hg init empty
315 $ hg clone -r 3 test partial
321 $ hg clone -r 3 test partial
316 adding changesets
322 adding changesets
317 adding manifests
323 adding manifests
318 adding file changes
324 adding file changes
319 added 4 changesets with 4 changes to 1 files
325 added 4 changesets with 4 changes to 1 files
320 updating to branch default
326 updating to branch default
321 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
327 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
322 $ hg clone partial partial2
328 $ hg clone partial partial2
323 updating to branch default
329 updating to branch default
324 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
330 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
325 $ cd partial
331 $ cd partial
326
332
327 Log -R full.hg in partial
333 Log -R full.hg in partial
328
334
329 $ hg -R bundle://../full.hg log -T phases
335 $ hg -R bundle://../full.hg log -T phases
330 changeset: 8:aa35859c02ea
336 changeset: 8:aa35859c02ea
331 tag: tip
337 tag: tip
332 phase: draft
338 phase: draft
333 parent: 3:eebf5a27f8ca
339 parent: 3:eebf5a27f8ca
334 user: test
340 user: test
335 date: Thu Jan 01 00:00:00 1970 +0000
341 date: Thu Jan 01 00:00:00 1970 +0000
336 summary: 0.3m
342 summary: 0.3m
337
343
338 changeset: 7:a6a34bfa0076
344 changeset: 7:a6a34bfa0076
339 phase: draft
345 phase: draft
340 user: test
346 user: test
341 date: Thu Jan 01 00:00:00 1970 +0000
347 date: Thu Jan 01 00:00:00 1970 +0000
342 summary: 1.3m
348 summary: 1.3m
343
349
344 changeset: 6:7373c1169842
350 changeset: 6:7373c1169842
345 phase: draft
351 phase: draft
346 user: test
352 user: test
347 date: Thu Jan 01 00:00:00 1970 +0000
353 date: Thu Jan 01 00:00:00 1970 +0000
348 summary: 1.3
354 summary: 1.3
349
355
350 changeset: 5:1bb50a9436a7
356 changeset: 5:1bb50a9436a7
351 phase: draft
357 phase: draft
352 user: test
358 user: test
353 date: Thu Jan 01 00:00:00 1970 +0000
359 date: Thu Jan 01 00:00:00 1970 +0000
354 summary: 1.2
360 summary: 1.2
355
361
356 changeset: 4:095197eb4973
362 changeset: 4:095197eb4973
357 phase: draft
363 phase: draft
358 parent: 0:f9ee2f85a263
364 parent: 0:f9ee2f85a263
359 user: test
365 user: test
360 date: Thu Jan 01 00:00:00 1970 +0000
366 date: Thu Jan 01 00:00:00 1970 +0000
361 summary: 1.1
367 summary: 1.1
362
368
363 changeset: 3:eebf5a27f8ca
369 changeset: 3:eebf5a27f8ca
364 phase: public
370 phase: public
365 user: test
371 user: test
366 date: Thu Jan 01 00:00:00 1970 +0000
372 date: Thu Jan 01 00:00:00 1970 +0000
367 summary: 0.3
373 summary: 0.3
368
374
369 changeset: 2:e38ba6f5b7e0
375 changeset: 2:e38ba6f5b7e0
370 phase: public
376 phase: public
371 user: test
377 user: test
372 date: Thu Jan 01 00:00:00 1970 +0000
378 date: Thu Jan 01 00:00:00 1970 +0000
373 summary: 0.2
379 summary: 0.2
374
380
375 changeset: 1:34c2bf6b0626
381 changeset: 1:34c2bf6b0626
376 phase: public
382 phase: public
377 user: test
383 user: test
378 date: Thu Jan 01 00:00:00 1970 +0000
384 date: Thu Jan 01 00:00:00 1970 +0000
379 summary: 0.1
385 summary: 0.1
380
386
381 changeset: 0:f9ee2f85a263
387 changeset: 0:f9ee2f85a263
382 phase: public
388 phase: public
383 user: test
389 user: test
384 date: Thu Jan 01 00:00:00 1970 +0000
390 date: Thu Jan 01 00:00:00 1970 +0000
385 summary: 0.0
391 summary: 0.0
386
392
387
393
388 Incoming full.hg in partial
394 Incoming full.hg in partial
389
395
390 $ hg incoming bundle://../full.hg
396 $ hg incoming bundle://../full.hg
391 comparing with bundle:../full.hg
397 comparing with bundle:../full.hg
392 searching for changes
398 searching for changes
393 changeset: 4:095197eb4973
399 changeset: 4:095197eb4973
394 parent: 0:f9ee2f85a263
400 parent: 0:f9ee2f85a263
395 user: test
401 user: test
396 date: Thu Jan 01 00:00:00 1970 +0000
402 date: Thu Jan 01 00:00:00 1970 +0000
397 summary: 1.1
403 summary: 1.1
398
404
399 changeset: 5:1bb50a9436a7
405 changeset: 5:1bb50a9436a7
400 user: test
406 user: test
401 date: Thu Jan 01 00:00:00 1970 +0000
407 date: Thu Jan 01 00:00:00 1970 +0000
402 summary: 1.2
408 summary: 1.2
403
409
404 changeset: 6:7373c1169842
410 changeset: 6:7373c1169842
405 user: test
411 user: test
406 date: Thu Jan 01 00:00:00 1970 +0000
412 date: Thu Jan 01 00:00:00 1970 +0000
407 summary: 1.3
413 summary: 1.3
408
414
409 changeset: 7:a6a34bfa0076
415 changeset: 7:a6a34bfa0076
410 user: test
416 user: test
411 date: Thu Jan 01 00:00:00 1970 +0000
417 date: Thu Jan 01 00:00:00 1970 +0000
412 summary: 1.3m
418 summary: 1.3m
413
419
414 changeset: 8:aa35859c02ea
420 changeset: 8:aa35859c02ea
415 tag: tip
421 tag: tip
416 parent: 3:eebf5a27f8ca
422 parent: 3:eebf5a27f8ca
417 user: test
423 user: test
418 date: Thu Jan 01 00:00:00 1970 +0000
424 date: Thu Jan 01 00:00:00 1970 +0000
419 summary: 0.3m
425 summary: 0.3m
420
426
421
427
422 Outgoing -R full.hg vs partial2 in partial
428 Outgoing -R full.hg vs partial2 in partial
423
429
424 $ hg -R bundle://../full.hg outgoing ../partial2
430 $ hg -R bundle://../full.hg outgoing ../partial2
425 comparing with ../partial2
431 comparing with ../partial2
426 searching for changes
432 searching for changes
427 changeset: 4:095197eb4973
433 changeset: 4:095197eb4973
428 parent: 0:f9ee2f85a263
434 parent: 0:f9ee2f85a263
429 user: test
435 user: test
430 date: Thu Jan 01 00:00:00 1970 +0000
436 date: Thu Jan 01 00:00:00 1970 +0000
431 summary: 1.1
437 summary: 1.1
432
438
433 changeset: 5:1bb50a9436a7
439 changeset: 5:1bb50a9436a7
434 user: test
440 user: test
435 date: Thu Jan 01 00:00:00 1970 +0000
441 date: Thu Jan 01 00:00:00 1970 +0000
436 summary: 1.2
442 summary: 1.2
437
443
438 changeset: 6:7373c1169842
444 changeset: 6:7373c1169842
439 user: test
445 user: test
440 date: Thu Jan 01 00:00:00 1970 +0000
446 date: Thu Jan 01 00:00:00 1970 +0000
441 summary: 1.3
447 summary: 1.3
442
448
443 changeset: 7:a6a34bfa0076
449 changeset: 7:a6a34bfa0076
444 user: test
450 user: test
445 date: Thu Jan 01 00:00:00 1970 +0000
451 date: Thu Jan 01 00:00:00 1970 +0000
446 summary: 1.3m
452 summary: 1.3m
447
453
448 changeset: 8:aa35859c02ea
454 changeset: 8:aa35859c02ea
449 tag: tip
455 tag: tip
450 parent: 3:eebf5a27f8ca
456 parent: 3:eebf5a27f8ca
451 user: test
457 user: test
452 date: Thu Jan 01 00:00:00 1970 +0000
458 date: Thu Jan 01 00:00:00 1970 +0000
453 summary: 0.3m
459 summary: 0.3m
454
460
455
461
456 Outgoing -R does-not-exist.hg vs partial2 in partial
462 Outgoing -R does-not-exist.hg vs partial2 in partial
457
463
458 $ hg -R bundle://../does-not-exist.hg outgoing ../partial2
464 $ hg -R bundle://../does-not-exist.hg outgoing ../partial2
459 abort: *../does-not-exist.hg* (glob)
465 abort: *../does-not-exist.hg* (glob)
460 [255]
466 [255]
461 $ cd ..
467 $ cd ..
462
468
463 hide outer repo
469 hide outer repo
464 $ hg init
470 $ hg init
465
471
466 Direct clone from bundle (all-history)
472 Direct clone from bundle (all-history)
467
473
468 $ hg clone full.hg full-clone
474 $ hg clone full.hg full-clone
469 requesting all changes
475 requesting all changes
470 adding changesets
476 adding changesets
471 adding manifests
477 adding manifests
472 adding file changes
478 adding file changes
473 added 9 changesets with 7 changes to 4 files (+1 heads)
479 added 9 changesets with 7 changes to 4 files (+1 heads)
474 updating to branch default
480 updating to branch default
475 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
481 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
476 $ hg -R full-clone heads
482 $ hg -R full-clone heads
477 changeset: 8:aa35859c02ea
483 changeset: 8:aa35859c02ea
478 tag: tip
484 tag: tip
479 parent: 3:eebf5a27f8ca
485 parent: 3:eebf5a27f8ca
480 user: test
486 user: test
481 date: Thu Jan 01 00:00:00 1970 +0000
487 date: Thu Jan 01 00:00:00 1970 +0000
482 summary: 0.3m
488 summary: 0.3m
483
489
484 changeset: 7:a6a34bfa0076
490 changeset: 7:a6a34bfa0076
485 user: test
491 user: test
486 date: Thu Jan 01 00:00:00 1970 +0000
492 date: Thu Jan 01 00:00:00 1970 +0000
487 summary: 1.3m
493 summary: 1.3m
488
494
489 $ rm -r full-clone
495 $ rm -r full-clone
490
496
491 When cloning from a non-copiable repository into '', do not
497 When cloning from a non-copiable repository into '', do not
492 recurse infinitely (issue2528)
498 recurse infinitely (issue2528)
493
499
494 $ hg clone full.hg ''
500 $ hg clone full.hg ''
495 abort: empty destination path is not valid
501 abort: empty destination path is not valid
496 [255]
502 [255]
497
503
498 test for https://bz.mercurial-scm.org/216
504 test for https://bz.mercurial-scm.org/216
499
505
500 Unbundle incremental bundles into fresh empty in one go
506 Unbundle incremental bundles into fresh empty in one go
501
507
502 $ rm -r empty
508 $ rm -r empty
503 $ hg init empty
509 $ hg init empty
504 $ hg -R test bundle --base null -r 0 ../0.hg
510 $ hg -R test bundle --base null -r 0 ../0.hg
505 1 changesets found
511 1 changesets found
506 $ hg -R test bundle --base 0 -r 1 ../1.hg
512 $ hg -R test bundle --base 0 -r 1 ../1.hg
507 1 changesets found
513 1 changesets found
508 $ hg -R empty unbundle -u ../0.hg ../1.hg
514 $ hg -R empty unbundle -u ../0.hg ../1.hg
509 adding changesets
515 adding changesets
510 adding manifests
516 adding manifests
511 adding file changes
517 adding file changes
512 added 1 changesets with 1 changes to 1 files
518 added 1 changesets with 1 changes to 1 files
513 adding changesets
519 adding changesets
514 adding manifests
520 adding manifests
515 adding file changes
521 adding file changes
516 added 1 changesets with 1 changes to 1 files
522 added 1 changesets with 1 changes to 1 files
517 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
523 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
518
524
519 View full contents of the bundle
525 View full contents of the bundle
520 $ hg -R test bundle --base null -r 3 ../partial.hg
526 $ hg -R test bundle --base null -r 3 ../partial.hg
521 4 changesets found
527 4 changesets found
522 $ cd test
528 $ cd test
523 $ hg -R ../../partial.hg log -r "bundle()"
529 $ hg -R ../../partial.hg log -r "bundle()"
524 changeset: 0:f9ee2f85a263
530 changeset: 0:f9ee2f85a263
525 user: test
531 user: test
526 date: Thu Jan 01 00:00:00 1970 +0000
532 date: Thu Jan 01 00:00:00 1970 +0000
527 summary: 0.0
533 summary: 0.0
528
534
529 changeset: 1:34c2bf6b0626
535 changeset: 1:34c2bf6b0626
530 user: test
536 user: test
531 date: Thu Jan 01 00:00:00 1970 +0000
537 date: Thu Jan 01 00:00:00 1970 +0000
532 summary: 0.1
538 summary: 0.1
533
539
534 changeset: 2:e38ba6f5b7e0
540 changeset: 2:e38ba6f5b7e0
535 user: test
541 user: test
536 date: Thu Jan 01 00:00:00 1970 +0000
542 date: Thu Jan 01 00:00:00 1970 +0000
537 summary: 0.2
543 summary: 0.2
538
544
539 changeset: 3:eebf5a27f8ca
545 changeset: 3:eebf5a27f8ca
540 user: test
546 user: test
541 date: Thu Jan 01 00:00:00 1970 +0000
547 date: Thu Jan 01 00:00:00 1970 +0000
542 summary: 0.3
548 summary: 0.3
543
549
544 $ cd ..
550 $ cd ..
545
551
546 test for 540d1059c802
552 test for 540d1059c802
547
553
548 test for 540d1059c802
554 test for 540d1059c802
549
555
550 $ hg init orig
556 $ hg init orig
551 $ cd orig
557 $ cd orig
552 $ echo foo > foo
558 $ echo foo > foo
553 $ hg add foo
559 $ hg add foo
554 $ hg ci -m 'add foo'
560 $ hg ci -m 'add foo'
555
561
556 $ hg clone . ../copy
562 $ hg clone . ../copy
557 updating to branch default
563 updating to branch default
558 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
564 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
559 $ hg tag foo
565 $ hg tag foo
560
566
561 $ cd ../copy
567 $ cd ../copy
562 $ echo >> foo
568 $ echo >> foo
563 $ hg ci -m 'change foo'
569 $ hg ci -m 'change foo'
564 $ hg bundle ../bundle.hg ../orig
570 $ hg bundle ../bundle.hg ../orig
565 searching for changes
571 searching for changes
566 1 changesets found
572 1 changesets found
567
573
568 $ cd ../orig
574 $ cd ../orig
569 $ hg incoming ../bundle.hg
575 $ hg incoming ../bundle.hg
570 comparing with ../bundle.hg
576 comparing with ../bundle.hg
571 searching for changes
577 searching for changes
572 changeset: 2:ed1b79f46b9a
578 changeset: 2:ed1b79f46b9a
573 tag: tip
579 tag: tip
574 parent: 0:bbd179dfa0a7
580 parent: 0:bbd179dfa0a7
575 user: test
581 user: test
576 date: Thu Jan 01 00:00:00 1970 +0000
582 date: Thu Jan 01 00:00:00 1970 +0000
577 summary: change foo
583 summary: change foo
578
584
579 $ cd ..
585 $ cd ..
580
586
581 test bundle with # in the filename (issue2154):
587 test bundle with # in the filename (issue2154):
582
588
583 $ cp bundle.hg 'test#bundle.hg'
589 $ cp bundle.hg 'test#bundle.hg'
584 $ cd orig
590 $ cd orig
585 $ hg incoming '../test#bundle.hg'
591 $ hg incoming '../test#bundle.hg'
586 comparing with ../test
592 comparing with ../test
587 abort: unknown revision 'bundle.hg'!
593 abort: unknown revision 'bundle.hg'!
588 [255]
594 [255]
589
595
590 note that percent encoding is not handled:
596 note that percent encoding is not handled:
591
597
592 $ hg incoming ../test%23bundle.hg
598 $ hg incoming ../test%23bundle.hg
593 abort: repository ../test%23bundle.hg not found!
599 abort: repository ../test%23bundle.hg not found!
594 [255]
600 [255]
595 $ cd ..
601 $ cd ..
596
602
597 test to bundle revisions on the newly created branch (issue3828):
603 test to bundle revisions on the newly created branch (issue3828):
598
604
599 $ hg -q clone -U test test-clone
605 $ hg -q clone -U test test-clone
600 $ cd test
606 $ cd test
601
607
602 $ hg -q branch foo
608 $ hg -q branch foo
603 $ hg commit -m "create foo branch"
609 $ hg commit -m "create foo branch"
604 $ hg -q outgoing ../test-clone
610 $ hg -q outgoing ../test-clone
605 9:b4f5acb1ee27
611 9:b4f5acb1ee27
606 $ hg -q bundle --branch foo foo.hg ../test-clone
612 $ hg -q bundle --branch foo foo.hg ../test-clone
607 $ hg -R foo.hg -q log -r "bundle()"
613 $ hg -R foo.hg -q log -r "bundle()"
608 9:b4f5acb1ee27
614 9:b4f5acb1ee27
609
615
610 $ cd ..
616 $ cd ..
611
617
612 test for https://bz.mercurial-scm.org/1144
618 test for https://bz.mercurial-scm.org/1144
613
619
614 test that verify bundle does not traceback
620 test that verify bundle does not traceback
615
621
616 partial history bundle, fails w/ unknown parent
622 partial history bundle, fails w/ unknown parent
617
623
618 $ hg -R bundle.hg verify
624 $ hg -R bundle.hg verify
619 abort: 00changelog.i@bbd179dfa0a7: unknown parent!
625 abort: 00changelog.i@bbd179dfa0a7: unknown parent!
620 [255]
626 [255]
621
627
622 full history bundle, refuses to verify non-local repo
628 full history bundle, refuses to verify non-local repo
623
629
624 $ hg -R all.hg verify
630 $ hg -R all.hg verify
625 abort: cannot verify bundle or remote repos
631 abort: cannot verify bundle or remote repos
626 [255]
632 [255]
627
633
628 but, regular verify must continue to work
634 but, regular verify must continue to work
629
635
630 $ hg -R orig verify
636 $ hg -R orig verify
631 checking changesets
637 checking changesets
632 checking manifests
638 checking manifests
633 crosschecking files in changesets and manifests
639 crosschecking files in changesets and manifests
634 checking files
640 checking files
635 2 files, 2 changesets, 2 total revisions
641 2 files, 2 changesets, 2 total revisions
636
642
637 diff against bundle
643 diff against bundle
638
644
639 $ hg init b
645 $ hg init b
640 $ cd b
646 $ cd b
641 $ hg -R ../all.hg diff -r tip
647 $ hg -R ../all.hg diff -r tip
642 diff -r aa35859c02ea anotherfile
648 diff -r aa35859c02ea anotherfile
643 --- a/anotherfile Thu Jan 01 00:00:00 1970 +0000
649 --- a/anotherfile Thu Jan 01 00:00:00 1970 +0000
644 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
650 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
645 @@ -1,4 +0,0 @@
651 @@ -1,4 +0,0 @@
646 -0
652 -0
647 -1
653 -1
648 -2
654 -2
649 -3
655 -3
650 $ cd ..
656 $ cd ..
651
657
652 bundle single branch
658 bundle single branch
653
659
654 $ hg init branchy
660 $ hg init branchy
655 $ cd branchy
661 $ cd branchy
656 $ echo a >a
662 $ echo a >a
657 $ echo x >x
663 $ echo x >x
658 $ hg ci -Ama
664 $ hg ci -Ama
659 adding a
665 adding a
660 adding x
666 adding x
661 $ echo c >c
667 $ echo c >c
662 $ echo xx >x
668 $ echo xx >x
663 $ hg ci -Amc
669 $ hg ci -Amc
664 adding c
670 adding c
665 $ echo c1 >c1
671 $ echo c1 >c1
666 $ hg ci -Amc1
672 $ hg ci -Amc1
667 adding c1
673 adding c1
668 $ hg up 0
674 $ hg up 0
669 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
675 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
670 $ echo b >b
676 $ echo b >b
671 $ hg ci -Amb
677 $ hg ci -Amb
672 adding b
678 adding b
673 created new head
679 created new head
674 $ echo b1 >b1
680 $ echo b1 >b1
675 $ echo xx >x
681 $ echo xx >x
676 $ hg ci -Amb1
682 $ hg ci -Amb1
677 adding b1
683 adding b1
678 $ hg clone -q -r2 . part
684 $ hg clone -q -r2 . part
679
685
680 == bundling via incoming
686 == bundling via incoming
681
687
682 $ hg in -R part --bundle incoming.hg --template "{node}\n" .
688 $ hg in -R part --bundle incoming.hg --template "{node}\n" .
683 comparing with .
689 comparing with .
684 searching for changes
690 searching for changes
685 1a38c1b849e8b70c756d2d80b0b9a3ac0b7ea11a
691 1a38c1b849e8b70c756d2d80b0b9a3ac0b7ea11a
686 057f4db07f61970e1c11e83be79e9d08adc4dc31
692 057f4db07f61970e1c11e83be79e9d08adc4dc31
687
693
688 == bundling
694 == bundling
689
695
690 $ hg bundle bundle.hg part --debug --config progress.debug=true
696 $ hg bundle bundle.hg part --debug --config progress.debug=true
691 query 1; heads
697 query 1; heads
692 searching for changes
698 searching for changes
693 all remote heads known locally
699 all remote heads known locally
694 2 changesets found
700 2 changesets found
695 list of changesets:
701 list of changesets:
696 1a38c1b849e8b70c756d2d80b0b9a3ac0b7ea11a
702 1a38c1b849e8b70c756d2d80b0b9a3ac0b7ea11a
697 057f4db07f61970e1c11e83be79e9d08adc4dc31
703 057f4db07f61970e1c11e83be79e9d08adc4dc31
704 bundle2-output-bundle: "HG20", (1 params) 1 parts total
705 bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload
698 bundling: 1/2 changesets (50.00%)
706 bundling: 1/2 changesets (50.00%)
699 bundling: 2/2 changesets (100.00%)
707 bundling: 2/2 changesets (100.00%)
700 bundling: 1/2 manifests (50.00%)
708 bundling: 1/2 manifests (50.00%)
701 bundling: 2/2 manifests (100.00%)
709 bundling: 2/2 manifests (100.00%)
702 bundling: b 1/3 files (33.33%)
710 bundling: b 1/3 files (33.33%)
703 bundling: b1 2/3 files (66.67%)
711 bundling: b1 2/3 files (66.67%)
704 bundling: x 3/3 files (100.00%)
712 bundling: x 3/3 files (100.00%)
705
713
706 == Test for issue3441
714 == Test for issue3441
707
715
708 $ hg clone -q -r0 . part2
716 $ hg clone -q -r0 . part2
709 $ hg -q -R part2 pull bundle.hg
717 $ hg -q -R part2 pull bundle.hg
710 $ hg -R part2 verify
718 $ hg -R part2 verify
711 checking changesets
719 checking changesets
712 checking manifests
720 checking manifests
713 crosschecking files in changesets and manifests
721 crosschecking files in changesets and manifests
714 checking files
722 checking files
715 4 files, 3 changesets, 5 total revisions
723 4 files, 3 changesets, 5 total revisions
716
724
717 $ cd ..
725 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now