Show More
@@ -1,951 +1,1041 b'' | |||
|
1 | 1 | Setting up test |
|
2 | 2 | |
|
3 | 3 | $ hg init test |
|
4 | 4 | $ cd test |
|
5 | 5 | $ echo 0 > afile |
|
6 | 6 | $ hg add afile |
|
7 | 7 | $ hg commit -m "0.0" |
|
8 | 8 | $ echo 1 >> afile |
|
9 | 9 | $ hg commit -m "0.1" |
|
10 | 10 | $ echo 2 >> afile |
|
11 | 11 | $ hg commit -m "0.2" |
|
12 | 12 | $ echo 3 >> afile |
|
13 | 13 | $ hg commit -m "0.3" |
|
14 | 14 | $ hg update -C 0 |
|
15 | 15 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
16 | 16 | $ echo 1 >> afile |
|
17 | 17 | $ hg commit -m "1.1" |
|
18 | 18 | created new head |
|
19 | 19 | $ echo 2 >> afile |
|
20 | 20 | $ hg commit -m "1.2" |
|
21 | 21 | $ echo "a line" > fred |
|
22 | 22 | $ echo 3 >> afile |
|
23 | 23 | $ hg add fred |
|
24 | 24 | $ hg commit -m "1.3" |
|
25 | 25 | $ hg mv afile adifferentfile |
|
26 | 26 | $ hg commit -m "1.3m" |
|
27 | 27 | $ hg update -C 3 |
|
28 | 28 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
29 | 29 | $ hg mv afile anotherfile |
|
30 | 30 | $ hg commit -m "0.3m" |
|
31 | 31 | $ hg verify |
|
32 | 32 | checking changesets |
|
33 | 33 | checking manifests |
|
34 | 34 | crosschecking files in changesets and manifests |
|
35 | 35 | checking files |
|
36 | 36 | checked 9 changesets with 7 changes to 4 files |
|
37 | 37 | $ cd .. |
|
38 | 38 | $ hg init empty |
|
39 | 39 | |
|
40 | 40 | Bundle and phase |
|
41 | 41 | |
|
42 | 42 | $ hg -R test phase --force --secret 0 |
|
43 | 43 | $ hg -R test bundle phase.hg empty |
|
44 | 44 | searching for changes |
|
45 | 45 | no changes found (ignored 9 secret changesets) |
|
46 | 46 | [1] |
|
47 | 47 | $ hg -R test phase --draft -r 'head()' |
|
48 | 48 | |
|
49 | 49 | Bundle --all |
|
50 | 50 | |
|
51 | 51 | $ hg -R test bundle --all all.hg |
|
52 | 52 | 9 changesets found |
|
53 | 53 | |
|
54 | 54 | Bundle test to full.hg |
|
55 | 55 | |
|
56 | 56 | $ hg -R test bundle full.hg empty |
|
57 | 57 | searching for changes |
|
58 | 58 | 9 changesets found |
|
59 | 59 | |
|
60 | 60 | Unbundle full.hg in test |
|
61 | 61 | |
|
62 | 62 | $ hg -R test unbundle full.hg |
|
63 | 63 | adding changesets |
|
64 | 64 | adding manifests |
|
65 | 65 | adding file changes |
|
66 | 66 | added 0 changesets with 0 changes to 4 files |
|
67 | 67 | (run 'hg update' to get a working copy) |
|
68 | 68 | |
|
69 | 69 | Verify empty |
|
70 | 70 | |
|
71 | 71 | $ hg -R empty heads |
|
72 | 72 | [1] |
|
73 | 73 | $ hg -R empty verify |
|
74 | 74 | checking changesets |
|
75 | 75 | checking manifests |
|
76 | 76 | crosschecking files in changesets and manifests |
|
77 | 77 | checking files |
|
78 | 78 | checked 0 changesets with 0 changes to 0 files |
|
79 | 79 | |
|
80 | 80 | #if repobundlerepo |
|
81 | 81 | |
|
82 | 82 | Pull full.hg into test (using --cwd) |
|
83 | 83 | |
|
84 | 84 | $ hg --cwd test pull ../full.hg |
|
85 | 85 | pulling from ../full.hg |
|
86 | 86 | searching for changes |
|
87 | 87 | no changes found |
|
88 | 88 | |
|
89 | 89 | Verify that there are no leaked temporary files after pull (issue2797) |
|
90 | 90 | |
|
91 | 91 | $ ls test/.hg | grep .hg10un |
|
92 | 92 | [1] |
|
93 | 93 | |
|
94 | 94 | Pull full.hg into empty (using --cwd) |
|
95 | 95 | |
|
96 | 96 | $ hg --cwd empty pull ../full.hg |
|
97 | 97 | pulling from ../full.hg |
|
98 | 98 | requesting all changes |
|
99 | 99 | adding changesets |
|
100 | 100 | adding manifests |
|
101 | 101 | adding file changes |
|
102 | 102 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
103 | 103 | new changesets f9ee2f85a263:aa35859c02ea (9 drafts) |
|
104 | 104 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
105 | 105 | |
|
106 | 106 | Rollback empty |
|
107 | 107 | |
|
108 | 108 | $ hg -R empty rollback |
|
109 | 109 | repository tip rolled back to revision -1 (undo pull) |
|
110 | 110 | |
|
111 | 111 | Pull full.hg into empty again (using --cwd) |
|
112 | 112 | |
|
113 | 113 | $ hg --cwd empty pull ../full.hg |
|
114 | 114 | pulling from ../full.hg |
|
115 | 115 | requesting all changes |
|
116 | 116 | adding changesets |
|
117 | 117 | adding manifests |
|
118 | 118 | adding file changes |
|
119 | 119 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
120 | 120 | new changesets f9ee2f85a263:aa35859c02ea (9 drafts) |
|
121 | 121 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
122 | 122 | |
|
123 | 123 | Pull full.hg into test (using -R) |
|
124 | 124 | |
|
125 | 125 | $ hg -R test pull full.hg |
|
126 | 126 | pulling from full.hg |
|
127 | 127 | searching for changes |
|
128 | 128 | no changes found |
|
129 | 129 | |
|
130 | 130 | Pull full.hg into empty (using -R) |
|
131 | 131 | |
|
132 | 132 | $ hg -R empty pull full.hg |
|
133 | 133 | pulling from full.hg |
|
134 | 134 | searching for changes |
|
135 | 135 | no changes found |
|
136 | 136 | |
|
137 | 137 | Rollback empty |
|
138 | 138 | |
|
139 | 139 | $ hg -R empty rollback |
|
140 | 140 | repository tip rolled back to revision -1 (undo pull) |
|
141 | 141 | |
|
142 | 142 | Pull full.hg into empty again (using -R) |
|
143 | 143 | |
|
144 | 144 | $ hg -R empty pull full.hg |
|
145 | 145 | pulling from full.hg |
|
146 | 146 | requesting all changes |
|
147 | 147 | adding changesets |
|
148 | 148 | adding manifests |
|
149 | 149 | adding file changes |
|
150 | 150 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
151 | 151 | new changesets f9ee2f85a263:aa35859c02ea (9 drafts) |
|
152 | 152 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
153 | 153 | |
|
154 | 154 | Log -R full.hg in fresh empty |
|
155 | 155 | |
|
156 | 156 | $ rm -r empty |
|
157 | 157 | $ hg init empty |
|
158 | 158 | $ cd empty |
|
159 | 159 | $ hg -R bundle://../full.hg log |
|
160 | 160 | changeset: 8:aa35859c02ea |
|
161 | 161 | tag: tip |
|
162 | 162 | parent: 3:eebf5a27f8ca |
|
163 | 163 | user: test |
|
164 | 164 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
165 | 165 | summary: 0.3m |
|
166 | 166 | |
|
167 | 167 | changeset: 7:a6a34bfa0076 |
|
168 | 168 | user: test |
|
169 | 169 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
170 | 170 | summary: 1.3m |
|
171 | 171 | |
|
172 | 172 | changeset: 6:7373c1169842 |
|
173 | 173 | user: test |
|
174 | 174 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
175 | 175 | summary: 1.3 |
|
176 | 176 | |
|
177 | 177 | changeset: 5:1bb50a9436a7 |
|
178 | 178 | user: test |
|
179 | 179 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
180 | 180 | summary: 1.2 |
|
181 | 181 | |
|
182 | 182 | changeset: 4:095197eb4973 |
|
183 | 183 | parent: 0:f9ee2f85a263 |
|
184 | 184 | user: test |
|
185 | 185 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
186 | 186 | summary: 1.1 |
|
187 | 187 | |
|
188 | 188 | changeset: 3:eebf5a27f8ca |
|
189 | 189 | user: test |
|
190 | 190 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
191 | 191 | summary: 0.3 |
|
192 | 192 | |
|
193 | 193 | changeset: 2:e38ba6f5b7e0 |
|
194 | 194 | user: test |
|
195 | 195 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
196 | 196 | summary: 0.2 |
|
197 | 197 | |
|
198 | 198 | changeset: 1:34c2bf6b0626 |
|
199 | 199 | user: test |
|
200 | 200 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
201 | 201 | summary: 0.1 |
|
202 | 202 | |
|
203 | 203 | changeset: 0:f9ee2f85a263 |
|
204 | 204 | user: test |
|
205 | 205 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
206 | 206 | summary: 0.0 |
|
207 | 207 | |
|
208 | 208 | Make sure bundlerepo doesn't leak tempfiles (issue2491) |
|
209 | 209 | |
|
210 | 210 | $ ls .hg |
|
211 | 211 | 00changelog.i |
|
212 | 212 | cache |
|
213 | 213 | requires |
|
214 | 214 | store |
|
215 | 215 | wcache |
|
216 | 216 | |
|
217 | 217 | Pull ../full.hg into empty (with hook) |
|
218 | 218 | |
|
219 | 219 | $ cat >> .hg/hgrc <<EOF |
|
220 | 220 | > [hooks] |
|
221 | 221 | > changegroup = sh -c "printenv.py --line changegroup" |
|
222 | 222 | > EOF |
|
223 | 223 | |
|
224 | 224 | doesn't work (yet ?) |
|
225 | 225 | NOTE: msys is mangling the URL below |
|
226 | 226 | |
|
227 | 227 | hg -R bundle://../full.hg verify |
|
228 | 228 | |
|
229 | 229 | $ hg pull bundle://../full.hg |
|
230 | 230 | pulling from bundle:../full.hg |
|
231 | 231 | requesting all changes |
|
232 | 232 | adding changesets |
|
233 | 233 | adding manifests |
|
234 | 234 | adding file changes |
|
235 | 235 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
236 | 236 | new changesets f9ee2f85a263:aa35859c02ea (9 drafts) |
|
237 | 237 | changegroup hook: HG_HOOKNAME=changegroup |
|
238 | 238 | HG_HOOKTYPE=changegroup |
|
239 | 239 | HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 |
|
240 | 240 | HG_NODE_LAST=aa35859c02ea8bd48da5da68cd2740ac71afcbaf |
|
241 | 241 | HG_SOURCE=pull |
|
242 | 242 | HG_TXNID=TXN:$ID$ |
|
243 | 243 | HG_TXNNAME=pull |
|
244 | 244 | bundle:../full.hg (no-msys !) |
|
245 | 245 | bundle;../full.hg (msys !) |
|
246 | 246 | HG_URL=bundle:../full.hg (no-msys !) |
|
247 | 247 | HG_URL=bundle;../full.hg (msys !) |
|
248 | 248 | |
|
249 | 249 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
250 | 250 | |
|
251 | 251 | Rollback empty |
|
252 | 252 | |
|
253 | 253 | $ hg rollback |
|
254 | 254 | repository tip rolled back to revision -1 (undo pull) |
|
255 | 255 | $ cd .. |
|
256 | 256 | |
|
257 | 257 | Log -R bundle:empty+full.hg |
|
258 | 258 | |
|
259 | 259 | $ hg -R bundle:empty+full.hg log --template="{rev} "; echo "" |
|
260 | 260 | 8 7 6 5 4 3 2 1 0 |
|
261 | 261 | |
|
262 | 262 | Pull full.hg into empty again (using -R; with hook) |
|
263 | 263 | |
|
264 | 264 | $ hg -R empty pull full.hg |
|
265 | 265 | pulling from full.hg |
|
266 | 266 | requesting all changes |
|
267 | 267 | adding changesets |
|
268 | 268 | adding manifests |
|
269 | 269 | adding file changes |
|
270 | 270 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
271 | 271 | new changesets f9ee2f85a263:aa35859c02ea (9 drafts) |
|
272 | 272 | changegroup hook: HG_HOOKNAME=changegroup |
|
273 | 273 | HG_HOOKTYPE=changegroup |
|
274 | 274 | HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 |
|
275 | 275 | HG_NODE_LAST=aa35859c02ea8bd48da5da68cd2740ac71afcbaf |
|
276 | 276 | HG_SOURCE=pull |
|
277 | 277 | HG_TXNID=TXN:$ID$ |
|
278 | 278 | HG_TXNNAME=pull |
|
279 | 279 | bundle:empty+full.hg |
|
280 | 280 | HG_URL=bundle:empty+full.hg |
|
281 | 281 | |
|
282 | 282 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
283 | 283 | |
|
284 | 284 | #endif |
|
285 | 285 | |
|
286 | 286 | Cannot produce streaming clone bundles with "hg bundle" |
|
287 | 287 | |
|
288 | 288 | $ hg -R test bundle -t packed1 packed.hg |
|
289 | 289 | abort: packed bundles cannot be produced by "hg bundle" |
|
290 | 290 | (use 'hg debugcreatestreamclonebundle') |
|
291 | 291 | [10] |
|
292 | 292 | |
|
293 | 293 | packed1 is produced properly |
|
294 | 294 | |
|
295 | #if reporevlogstore | |
|
295 | ||
|
296 | #if reporevlogstore rust | |
|
296 | 297 | |
|
297 | 298 | $ hg -R test debugcreatestreamclonebundle packed.hg |
|
298 |
writing 266 |
|
|
299 | writing 2665 bytes for 6 files (zstd !) | |
|
300 | bundle requirements: generaldelta, revlogv1, sparserevlog (no-rust !) | |
|
301 | bundle requirements: generaldelta, persistent-nodemap, revlogv1, sparserevlog (rust !) | |
|
299 | writing 2665 bytes for 6 files | |
|
300 | bundle requirements: generaldelta, persistent-nodemap, revlogv1, sparserevlog | |
|
301 | ||
|
302 | $ f -B 64 --size --sha1 --hexdump packed.hg | |
|
303 | packed.hg: size=2860, sha1=81d7a2e535892cda51e82c200f818de2cca828d3 | |
|
304 | 0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 06 00 00 |HGS1UN..........| | |
|
305 | 0010: 00 00 00 00 0a 69 00 36 67 65 6e 65 72 61 6c 64 |.....i.6generald| | |
|
306 | 0020: 65 6c 74 61 2c 70 65 72 73 69 73 74 65 6e 74 2d |elta,persistent-| | |
|
307 | 0030: 6e 6f 64 65 6d 61 70 2c 72 65 76 6c 6f 67 76 31 |nodemap,revlogv1| | |
|
308 | $ hg debugbundle --spec packed.hg | |
|
309 | none-packed1;requirements%3Dgeneraldelta%2Cpersistent-nodemap%2Crevlogv1%2Csparserevlog | |
|
310 | #endif | |
|
311 | ||
|
312 | #if reporevlogstore no-rust zstd | |
|
313 | ||
|
314 | $ hg -R test debugcreatestreamclonebundle packed.hg | |
|
315 | writing 2665 bytes for 6 files | |
|
316 | bundle requirements: generaldelta, revlogv1, sparserevlog | |
|
302 | 317 | |
|
303 | 318 | $ f -B 64 --size --sha1 --hexdump packed.hg |
|
304 | packed.hg: size=2840, sha1=12bf3eee3eb8a04c503ce2d29b48f0135c7edff5 (no-zstd !) | |
|
305 | packed.hg: size=2841, sha1=8b645a65f49b0ae43042a9f3da56d4bfdf1c7f99 (zstd no-rust !) | |
|
306 | packed.hg: size=2860, sha1=81d7a2e535892cda51e82c200f818de2cca828d3 (rust !) | |
|
319 | packed.hg: size=2841, sha1=8b645a65f49b0ae43042a9f3da56d4bfdf1c7f99 | |
|
307 | 320 | 0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 06 00 00 |HGS1UN..........| |
|
308 |
0010: 00 00 00 00 0a 6 |
|
|
309 |
0020: 65 6c 74 61 2c 72 65 76 6c 6f 67 76 31 2c 73 70 |elta,revlogv1,sp| |
|
|
310 |
0030: 61 72 73 65 72 65 76 6c 6f 67 00 64 61 74 61 2f |arserevlog.data/| |
|
|
311 | 0010: 00 00 00 00 0a 69 00 23 67 65 6e 65 72 61 6c 64 |.....i.#generald| (zstd no-rust !) | |
|
312 | 0020: 65 6c 74 61 2c 72 65 76 6c 6f 67 76 31 2c 73 70 |elta,revlogv1,sp| (zstd no-rust !) | |
|
313 | 0030: 61 72 73 65 72 65 76 6c 6f 67 00 64 61 74 61 2f |arserevlog.data/| (zstd no-rust !) | |
|
314 | 0010: 00 00 00 00 0a 69 00 36 67 65 6e 65 72 61 6c 64 |.....i.6generald| (rust !) | |
|
315 | 0020: 65 6c 74 61 2c 70 65 72 73 69 73 74 65 6e 74 2d |elta,persistent-| (rust !) | |
|
316 | 0030: 6e 6f 64 65 6d 61 70 2c 72 65 76 6c 6f 67 76 31 |nodemap,revlogv1| (rust !) | |
|
321 | 0010: 00 00 00 00 0a 69 00 23 67 65 6e 65 72 61 6c 64 |.....i.#generald| | |
|
322 | 0020: 65 6c 74 61 2c 72 65 76 6c 6f 67 76 31 2c 73 70 |elta,revlogv1,sp| | |
|
323 | 0030: 61 72 73 65 72 65 76 6c 6f 67 00 64 61 74 61 2f |arserevlog.data/| | |
|
324 | $ hg debugbundle --spec packed.hg | |
|
325 | none-packed1;requirements%3Dgeneraldelta%2Crevlogv1%2Csparserevlog | |
|
326 | #endif | |
|
327 | ||
|
328 | #if reporevlogstore no-rust no-zstd | |
|
317 | 329 | |
|
330 | $ hg -R test debugcreatestreamclonebundle packed.hg | |
|
331 | writing 2664 bytes for 6 files | |
|
332 | bundle requirements: generaldelta, revlogv1, sparserevlog | |
|
333 | ||
|
334 | $ f -B 64 --size --sha1 --hexdump packed.hg | |
|
335 | packed.hg: size=2840, sha1=12bf3eee3eb8a04c503ce2d29b48f0135c7edff5 | |
|
336 | 0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 06 00 00 |HGS1UN..........| | |
|
337 | 0010: 00 00 00 00 0a 68 00 23 67 65 6e 65 72 61 6c 64 |.....h.#generald| | |
|
338 | 0020: 65 6c 74 61 2c 72 65 76 6c 6f 67 76 31 2c 73 70 |elta,revlogv1,sp| | |
|
339 | 0030: 61 72 73 65 72 65 76 6c 6f 67 00 64 61 74 61 2f |arserevlog.data/| | |
|
318 | 340 | $ hg debugbundle --spec packed.hg |
|
319 |
none-packed1;requirements%3Dgeneraldelta%2Crevlogv1%2Csparserevlog |
|
|
320 | none-packed1;requirements%3Dgeneraldelta%2Cpersistent-nodemap%2Crevlogv1%2Csparserevlog (rust !) | |
|
341 | none-packed1;requirements%3Dgeneraldelta%2Crevlogv1%2Csparserevlog | |
|
342 | #endif | |
|
343 | ||
|
344 | #if reporevlogstore | |
|
321 | 345 | |
|
322 | 346 | generaldelta requirement is not listed in stream clone bundles unless used |
|
323 | 347 | |
|
324 | 348 | $ hg --config format.usegeneraldelta=false init testnongd |
|
325 | 349 | $ cd testnongd |
|
326 | 350 | $ touch foo |
|
327 | 351 | $ hg -q commit -A -m initial |
|
328 | 352 | $ cd .. |
|
353 | ||
|
354 | #endif | |
|
355 | ||
|
356 | #if reporevlogstore rust | |
|
357 | ||
|
329 | 358 | $ hg -R testnongd debugcreatestreamclonebundle packednongd.hg |
|
330 | 359 | writing 301 bytes for 3 files |
|
331 |
bundle requirements: revlogv1 |
|
|
332 | bundle requirements: persistent-nodemap, revlogv1 (rust !) | |
|
360 | bundle requirements: persistent-nodemap, revlogv1 | |
|
361 | ||
|
362 | $ f -B 64 --size --sha1 --hexdump packednongd.hg | |
|
363 | packednongd.hg: size=402, sha1=d3cc1417f0e8142cf9340aaaa520b660ad3ec3ea | |
|
364 | 0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 03 00 00 |HGS1UN..........| | |
|
365 | 0010: 00 00 00 00 01 2d 00 1c 70 65 72 73 69 73 74 65 |.....-..persiste| | |
|
366 | 0020: 6e 74 2d 6e 6f 64 65 6d 61 70 2c 72 65 76 6c 6f |nt-nodemap,revlo| | |
|
367 | 0030: 67 76 31 00 64 61 74 61 2f 66 6f 6f 2e 69 00 36 |gv1.data/foo.i.6| | |
|
368 | ||
|
369 | $ hg debugbundle --spec packednongd.hg | |
|
370 | none-packed1;requirements%3Dpersistent-nodemap%2Crevlogv1 | |
|
371 | ||
|
372 | #endif | |
|
373 | ||
|
374 | #if reporevlogstore no-rust zstd | |
|
375 | ||
|
376 | $ hg -R testnongd debugcreatestreamclonebundle packednongd.hg | |
|
377 | writing 301 bytes for 3 files | |
|
378 | bundle requirements: revlogv1 | |
|
333 | 379 | |
|
334 | 380 | $ f -B 64 --size --sha1 --hexdump packednongd.hg |
|
335 |
packednongd.hg: size=383, sha1=1d9c230238edd5d38907100b729ba72b1831fe6f |
|
|
336 | packednongd.hg: size=402, sha1=d3cc1417f0e8142cf9340aaaa520b660ad3ec3ea (rust !) | |
|
381 | packednongd.hg: size=383, sha1=1d9c230238edd5d38907100b729ba72b1831fe6f | |
|
337 | 382 | 0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 03 00 00 |HGS1UN..........| |
|
338 |
0010: 00 00 00 00 01 2d 00 09 72 65 76 6c 6f 67 76 31 |.....-..revlogv1| |
|
|
339 |
0020: 00 64 61 74 61 2f 66 6f 6f 2e 69 00 36 34 0a 00 |.data/foo.i.64..| |
|
|
340 |
0030: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| |
|
|
341 | 0010: 00 00 00 00 01 2d 00 1c 70 65 72 73 69 73 74 65 |.....-..persiste| (rust !) | |
|
342 | 0020: 6e 74 2d 6e 6f 64 65 6d 61 70 2c 72 65 76 6c 6f |nt-nodemap,revlo| (rust !) | |
|
343 | 0030: 67 76 31 00 64 61 74 61 2f 66 6f 6f 2e 69 00 36 |gv1.data/foo.i.6| (rust !) | |
|
383 | 0010: 00 00 00 00 01 2d 00 09 72 65 76 6c 6f 67 76 31 |.....-..revlogv1| | |
|
384 | 0020: 00 64 61 74 61 2f 66 6f 6f 2e 69 00 36 34 0a 00 |.data/foo.i.64..| | |
|
385 | 0030: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| | |
|
344 | 386 | |
|
345 | 387 | $ hg debugbundle --spec packednongd.hg |
|
346 |
none-packed1;requirements%3Drevlogv1 |
|
|
347 | none-packed1;requirements%3Dpersistent-nodemap%2Crevlogv1 (rust !) | |
|
388 | none-packed1;requirements%3Drevlogv1 | |
|
389 | ||
|
390 | ||
|
391 | #endif | |
|
392 | ||
|
393 | #if reporevlogstore no-rust no-zstd | |
|
394 | ||
|
395 | $ hg -R testnongd debugcreatestreamclonebundle packednongd.hg | |
|
396 | writing 301 bytes for 3 files | |
|
397 | bundle requirements: revlogv1 | |
|
398 | ||
|
399 | $ f -B 64 --size --sha1 --hexdump packednongd.hg | |
|
400 | packednongd.hg: size=383, sha1=1d9c230238edd5d38907100b729ba72b1831fe6f | |
|
401 | 0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 03 00 00 |HGS1UN..........| | |
|
402 | 0010: 00 00 00 00 01 2d 00 09 72 65 76 6c 6f 67 76 31 |.....-..revlogv1| | |
|
403 | 0020: 00 64 61 74 61 2f 66 6f 6f 2e 69 00 36 34 0a 00 |.data/foo.i.64..| | |
|
404 | 0030: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| | |
|
405 | ||
|
406 | $ hg debugbundle --spec packednongd.hg | |
|
407 | none-packed1;requirements%3Drevlogv1 | |
|
408 | ||
|
409 | ||
|
410 | #endif | |
|
411 | ||
|
412 | #if reporevlogstore | |
|
348 | 413 | |
|
349 | 414 | Warning emitted when packed bundles contain secret changesets |
|
350 | 415 | |
|
351 | 416 | $ hg init testsecret |
|
352 | 417 | $ cd testsecret |
|
353 | 418 | $ touch foo |
|
354 | 419 | $ hg -q commit -A -m initial |
|
355 | 420 | $ hg phase --force --secret -r . |
|
356 | 421 | $ cd .. |
|
357 | 422 | |
|
423 | #endif | |
|
424 | ||
|
425 | #if reporevlogstore rust | |
|
426 | ||
|
358 | 427 | $ hg -R testsecret debugcreatestreamclonebundle packedsecret.hg |
|
359 | 428 | (warning: stream clone bundle will contain secret revisions) |
|
360 | 429 | writing 301 bytes for 3 files |
|
361 |
bundle requirements: generaldelta, revlogv1, sparserevlog |
|
|
362 | bundle requirements: generaldelta, persistent-nodemap, revlogv1, sparserevlog (rust !) | |
|
430 | bundle requirements: generaldelta, persistent-nodemap, revlogv1, sparserevlog | |
|
431 | ||
|
432 | #endif | |
|
433 | ||
|
434 | #if reporevlogstore no-rust zstd | |
|
435 | ||
|
436 | $ hg -R testsecret debugcreatestreamclonebundle packedsecret.hg | |
|
437 | (warning: stream clone bundle will contain secret revisions) | |
|
438 | writing 301 bytes for 3 files | |
|
439 | bundle requirements: generaldelta, revlogv1, sparserevlog | |
|
440 | ||
|
441 | #endif | |
|
442 | ||
|
443 | #if reporevlogstore no-rust no-zstd | |
|
444 | ||
|
445 | $ hg -R testsecret debugcreatestreamclonebundle packedsecret.hg | |
|
446 | (warning: stream clone bundle will contain secret revisions) | |
|
447 | writing 301 bytes for 3 files | |
|
448 | bundle requirements: generaldelta, revlogv1, sparserevlog | |
|
449 | ||
|
450 | #endif | |
|
451 | ||
|
452 | #if reporevlogstore | |
|
363 | 453 | |
|
364 | 454 | Unpacking packed1 bundles with "hg unbundle" isn't allowed |
|
365 | 455 | |
|
366 | 456 | $ hg init packed |
|
367 | 457 | $ hg -R packed unbundle packed.hg |
|
368 | 458 | abort: packed bundles cannot be applied with "hg unbundle" |
|
369 | 459 | (use "hg debugapplystreamclonebundle") |
|
370 | 460 | [10] |
|
371 | 461 | |
|
372 | 462 | packed1 can be consumed from debug command |
|
373 | 463 | |
|
374 | 464 | (this also confirms that streamclone-ed changes are visible via |
|
375 | 465 | @filecache properties to in-process procedures before closing |
|
376 | 466 | transaction) |
|
377 | 467 | |
|
378 | 468 | $ cat > $TESTTMP/showtip.py <<EOF |
|
379 | 469 | > from __future__ import absolute_import |
|
380 | 470 | > |
|
381 | 471 | > def showtip(ui, repo, hooktype, **kwargs): |
|
382 | 472 | > ui.warn(b'%s: %s\n' % (hooktype, repo[b'tip'].hex()[:12])) |
|
383 | 473 | > |
|
384 | 474 | > def reposetup(ui, repo): |
|
385 | 475 | > # this confirms (and ensures) that (empty) 00changelog.i |
|
386 | 476 | > # before streamclone is already cached as repo.changelog |
|
387 | 477 | > ui.setconfig(b'hooks', b'pretxnopen.showtip', showtip) |
|
388 | 478 | > |
|
389 | 479 | > # this confirms that streamclone-ed changes are visible to |
|
390 | 480 | > # in-process procedures before closing transaction |
|
391 | 481 | > ui.setconfig(b'hooks', b'pretxnclose.showtip', showtip) |
|
392 | 482 | > |
|
393 | 483 | > # this confirms that streamclone-ed changes are still visible |
|
394 | 484 | > # after closing transaction |
|
395 | 485 | > ui.setconfig(b'hooks', b'txnclose.showtip', showtip) |
|
396 | 486 | > EOF |
|
397 | 487 | $ cat >> $HGRCPATH <<EOF |
|
398 | 488 | > [extensions] |
|
399 | 489 | > showtip = $TESTTMP/showtip.py |
|
400 | 490 | > EOF |
|
401 | 491 | |
|
402 | 492 | $ hg -R packed debugapplystreamclonebundle packed.hg |
|
403 | 493 | 6 files to transfer, 2.60 KB of data |
|
404 | 494 | pretxnopen: 000000000000 |
|
405 | 495 | pretxnclose: aa35859c02ea |
|
406 | 496 | transferred 2.60 KB in * seconds (* */sec) (glob) |
|
407 | 497 | txnclose: aa35859c02ea |
|
408 | 498 | |
|
409 | 499 | (for safety, confirm visibility of streamclone-ed changes by another |
|
410 | 500 | process, too) |
|
411 | 501 | |
|
412 | 502 | $ hg -R packed tip -T "{node|short}\n" |
|
413 | 503 | aa35859c02ea |
|
414 | 504 | |
|
415 | 505 | $ cat >> $HGRCPATH <<EOF |
|
416 | 506 | > [extensions] |
|
417 | 507 | > showtip = ! |
|
418 | 508 | > EOF |
|
419 | 509 | |
|
420 | 510 | Does not work on non-empty repo |
|
421 | 511 | |
|
422 | 512 | $ hg -R packed debugapplystreamclonebundle packed.hg |
|
423 | 513 | abort: cannot apply stream clone bundle on non-empty repo |
|
424 | 514 | [255] |
|
425 | 515 | |
|
426 | 516 | #endif |
|
427 | 517 | |
|
428 | 518 | Create partial clones |
|
429 | 519 | |
|
430 | 520 | $ rm -r empty |
|
431 | 521 | $ hg init empty |
|
432 | 522 | $ hg clone -r 3 test partial |
|
433 | 523 | adding changesets |
|
434 | 524 | adding manifests |
|
435 | 525 | adding file changes |
|
436 | 526 | added 4 changesets with 4 changes to 1 files |
|
437 | 527 | new changesets f9ee2f85a263:eebf5a27f8ca |
|
438 | 528 | updating to branch default |
|
439 | 529 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
440 | 530 | $ hg clone partial partial2 |
|
441 | 531 | updating to branch default |
|
442 | 532 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
443 | 533 | $ cd partial |
|
444 | 534 | |
|
445 | 535 | #if repobundlerepo |
|
446 | 536 | |
|
447 | 537 | Log -R full.hg in partial |
|
448 | 538 | |
|
449 | 539 | $ hg -R bundle://../full.hg log -T phases |
|
450 | 540 | changeset: 8:aa35859c02ea |
|
451 | 541 | tag: tip |
|
452 | 542 | phase: draft |
|
453 | 543 | parent: 3:eebf5a27f8ca |
|
454 | 544 | user: test |
|
455 | 545 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
456 | 546 | summary: 0.3m |
|
457 | 547 | |
|
458 | 548 | changeset: 7:a6a34bfa0076 |
|
459 | 549 | phase: draft |
|
460 | 550 | user: test |
|
461 | 551 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
462 | 552 | summary: 1.3m |
|
463 | 553 | |
|
464 | 554 | changeset: 6:7373c1169842 |
|
465 | 555 | phase: draft |
|
466 | 556 | user: test |
|
467 | 557 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
468 | 558 | summary: 1.3 |
|
469 | 559 | |
|
470 | 560 | changeset: 5:1bb50a9436a7 |
|
471 | 561 | phase: draft |
|
472 | 562 | user: test |
|
473 | 563 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
474 | 564 | summary: 1.2 |
|
475 | 565 | |
|
476 | 566 | changeset: 4:095197eb4973 |
|
477 | 567 | phase: draft |
|
478 | 568 | parent: 0:f9ee2f85a263 |
|
479 | 569 | user: test |
|
480 | 570 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
481 | 571 | summary: 1.1 |
|
482 | 572 | |
|
483 | 573 | changeset: 3:eebf5a27f8ca |
|
484 | 574 | phase: public |
|
485 | 575 | user: test |
|
486 | 576 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
487 | 577 | summary: 0.3 |
|
488 | 578 | |
|
489 | 579 | changeset: 2:e38ba6f5b7e0 |
|
490 | 580 | phase: public |
|
491 | 581 | user: test |
|
492 | 582 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
493 | 583 | summary: 0.2 |
|
494 | 584 | |
|
495 | 585 | changeset: 1:34c2bf6b0626 |
|
496 | 586 | phase: public |
|
497 | 587 | user: test |
|
498 | 588 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
499 | 589 | summary: 0.1 |
|
500 | 590 | |
|
501 | 591 | changeset: 0:f9ee2f85a263 |
|
502 | 592 | phase: public |
|
503 | 593 | user: test |
|
504 | 594 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
505 | 595 | summary: 0.0 |
|
506 | 596 | |
|
507 | 597 | |
|
508 | 598 | Incoming full.hg in partial |
|
509 | 599 | |
|
510 | 600 | $ hg incoming bundle://../full.hg |
|
511 | 601 | comparing with bundle:../full.hg |
|
512 | 602 | searching for changes |
|
513 | 603 | changeset: 4:095197eb4973 |
|
514 | 604 | parent: 0:f9ee2f85a263 |
|
515 | 605 | user: test |
|
516 | 606 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
517 | 607 | summary: 1.1 |
|
518 | 608 | |
|
519 | 609 | changeset: 5:1bb50a9436a7 |
|
520 | 610 | user: test |
|
521 | 611 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
522 | 612 | summary: 1.2 |
|
523 | 613 | |
|
524 | 614 | changeset: 6:7373c1169842 |
|
525 | 615 | user: test |
|
526 | 616 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
527 | 617 | summary: 1.3 |
|
528 | 618 | |
|
529 | 619 | changeset: 7:a6a34bfa0076 |
|
530 | 620 | user: test |
|
531 | 621 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
532 | 622 | summary: 1.3m |
|
533 | 623 | |
|
534 | 624 | changeset: 8:aa35859c02ea |
|
535 | 625 | tag: tip |
|
536 | 626 | parent: 3:eebf5a27f8ca |
|
537 | 627 | user: test |
|
538 | 628 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
539 | 629 | summary: 0.3m |
|
540 | 630 | |
|
541 | 631 | |
|
542 | 632 | Outgoing -R full.hg vs partial2 in partial |
|
543 | 633 | |
|
544 | 634 | $ hg -R bundle://../full.hg outgoing ../partial2 |
|
545 | 635 | comparing with ../partial2 |
|
546 | 636 | searching for changes |
|
547 | 637 | changeset: 4:095197eb4973 |
|
548 | 638 | parent: 0:f9ee2f85a263 |
|
549 | 639 | user: test |
|
550 | 640 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
551 | 641 | summary: 1.1 |
|
552 | 642 | |
|
553 | 643 | changeset: 5:1bb50a9436a7 |
|
554 | 644 | user: test |
|
555 | 645 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
556 | 646 | summary: 1.2 |
|
557 | 647 | |
|
558 | 648 | changeset: 6:7373c1169842 |
|
559 | 649 | user: test |
|
560 | 650 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
561 | 651 | summary: 1.3 |
|
562 | 652 | |
|
563 | 653 | changeset: 7:a6a34bfa0076 |
|
564 | 654 | user: test |
|
565 | 655 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
566 | 656 | summary: 1.3m |
|
567 | 657 | |
|
568 | 658 | changeset: 8:aa35859c02ea |
|
569 | 659 | tag: tip |
|
570 | 660 | parent: 3:eebf5a27f8ca |
|
571 | 661 | user: test |
|
572 | 662 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
573 | 663 | summary: 0.3m |
|
574 | 664 | |
|
575 | 665 | |
|
576 | 666 | Outgoing -R does-not-exist.hg vs partial2 in partial |
|
577 | 667 | |
|
578 | 668 | $ hg -R bundle://../does-not-exist.hg outgoing ../partial2 |
|
579 | 669 | abort: *../does-not-exist.hg* (glob) |
|
580 | 670 | [255] |
|
581 | 671 | |
|
582 | 672 | #endif |
|
583 | 673 | |
|
584 | 674 | $ cd .. |
|
585 | 675 | |
|
586 | 676 | hide outer repo |
|
587 | 677 | $ hg init |
|
588 | 678 | |
|
589 | 679 | Direct clone from bundle (all-history) |
|
590 | 680 | |
|
591 | 681 | #if repobundlerepo |
|
592 | 682 | |
|
593 | 683 | $ hg clone full.hg full-clone |
|
594 | 684 | requesting all changes |
|
595 | 685 | adding changesets |
|
596 | 686 | adding manifests |
|
597 | 687 | adding file changes |
|
598 | 688 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
599 | 689 | new changesets f9ee2f85a263:aa35859c02ea (9 drafts) |
|
600 | 690 | updating to branch default |
|
601 | 691 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
602 | 692 | $ hg -R full-clone heads |
|
603 | 693 | changeset: 8:aa35859c02ea |
|
604 | 694 | tag: tip |
|
605 | 695 | parent: 3:eebf5a27f8ca |
|
606 | 696 | user: test |
|
607 | 697 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
608 | 698 | summary: 0.3m |
|
609 | 699 | |
|
610 | 700 | changeset: 7:a6a34bfa0076 |
|
611 | 701 | user: test |
|
612 | 702 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
613 | 703 | summary: 1.3m |
|
614 | 704 | |
|
615 | 705 | $ rm -r full-clone |
|
616 | 706 | |
|
617 | 707 | When cloning from a non-copiable repository into '', do not |
|
618 | 708 | recurse infinitely (issue2528) |
|
619 | 709 | |
|
620 | 710 | $ hg clone full.hg '' |
|
621 | 711 | abort: empty destination path is not valid |
|
622 | 712 | [10] |
|
623 | 713 | |
|
624 | 714 | test for https://bz.mercurial-scm.org/216 |
|
625 | 715 | |
|
626 | 716 | Unbundle incremental bundles into fresh empty in one go |
|
627 | 717 | |
|
628 | 718 | $ rm -r empty |
|
629 | 719 | $ hg init empty |
|
630 | 720 | $ hg -R test bundle --base null -r 0 ../0.hg |
|
631 | 721 | 1 changesets found |
|
632 | 722 | $ hg -R test bundle --base 0 -r 1 ../1.hg |
|
633 | 723 | 1 changesets found |
|
634 | 724 | $ hg -R empty unbundle -u ../0.hg ../1.hg |
|
635 | 725 | adding changesets |
|
636 | 726 | adding manifests |
|
637 | 727 | adding file changes |
|
638 | 728 | added 1 changesets with 1 changes to 1 files |
|
639 | 729 | new changesets f9ee2f85a263 (1 drafts) |
|
640 | 730 | adding changesets |
|
641 | 731 | adding manifests |
|
642 | 732 | adding file changes |
|
643 | 733 | added 1 changesets with 1 changes to 1 files |
|
644 | 734 | new changesets 34c2bf6b0626 (1 drafts) |
|
645 | 735 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
646 | 736 | |
|
647 | 737 | View full contents of the bundle |
|
648 | 738 | $ hg -R test bundle --base null -r 3 ../partial.hg |
|
649 | 739 | 4 changesets found |
|
650 | 740 | $ cd test |
|
651 | 741 | $ hg -R ../../partial.hg log -r "bundle()" |
|
652 | 742 | changeset: 0:f9ee2f85a263 |
|
653 | 743 | user: test |
|
654 | 744 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
655 | 745 | summary: 0.0 |
|
656 | 746 | |
|
657 | 747 | changeset: 1:34c2bf6b0626 |
|
658 | 748 | user: test |
|
659 | 749 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
660 | 750 | summary: 0.1 |
|
661 | 751 | |
|
662 | 752 | changeset: 2:e38ba6f5b7e0 |
|
663 | 753 | user: test |
|
664 | 754 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
665 | 755 | summary: 0.2 |
|
666 | 756 | |
|
667 | 757 | changeset: 3:eebf5a27f8ca |
|
668 | 758 | user: test |
|
669 | 759 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
670 | 760 | summary: 0.3 |
|
671 | 761 | |
|
672 | 762 | $ cd .. |
|
673 | 763 | |
|
674 | 764 | #endif |
|
675 | 765 | |
|
676 | 766 | test for 540d1059c802 |
|
677 | 767 | |
|
678 | 768 | $ hg init orig |
|
679 | 769 | $ cd orig |
|
680 | 770 | $ echo foo > foo |
|
681 | 771 | $ hg add foo |
|
682 | 772 | $ hg ci -m 'add foo' |
|
683 | 773 | |
|
684 | 774 | $ hg clone . ../copy |
|
685 | 775 | updating to branch default |
|
686 | 776 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
687 | 777 | $ hg tag foo |
|
688 | 778 | |
|
689 | 779 | $ cd ../copy |
|
690 | 780 | $ echo >> foo |
|
691 | 781 | $ hg ci -m 'change foo' |
|
692 | 782 | $ hg bundle ../bundle.hg ../orig |
|
693 | 783 | searching for changes |
|
694 | 784 | 1 changesets found |
|
695 | 785 | |
|
696 | 786 | $ cd .. |
|
697 | 787 | |
|
698 | 788 | #if repobundlerepo |
|
699 | 789 | $ cd orig |
|
700 | 790 | $ hg incoming ../bundle.hg |
|
701 | 791 | comparing with ../bundle.hg |
|
702 | 792 | searching for changes |
|
703 | 793 | changeset: 2:ed1b79f46b9a |
|
704 | 794 | tag: tip |
|
705 | 795 | parent: 0:bbd179dfa0a7 |
|
706 | 796 | user: test |
|
707 | 797 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
708 | 798 | summary: change foo |
|
709 | 799 | |
|
710 | 800 | $ cd .. |
|
711 | 801 | |
|
712 | 802 | test bundle with # in the filename (issue2154): |
|
713 | 803 | |
|
714 | 804 | $ cp bundle.hg 'test#bundle.hg' |
|
715 | 805 | $ cd orig |
|
716 | 806 | $ hg incoming '../test#bundle.hg' |
|
717 | 807 | comparing with ../test |
|
718 | 808 | abort: unknown revision 'bundle.hg' |
|
719 | 809 | [10] |
|
720 | 810 | |
|
721 | 811 | note that percent encoding is not handled: |
|
722 | 812 | |
|
723 | 813 | $ hg incoming ../test%23bundle.hg |
|
724 | 814 | abort: repository ../test%23bundle.hg not found |
|
725 | 815 | [255] |
|
726 | 816 | $ cd .. |
|
727 | 817 | |
|
728 | 818 | #endif |
|
729 | 819 | |
|
730 | 820 | test to bundle revisions on the newly created branch (issue3828): |
|
731 | 821 | |
|
732 | 822 | $ hg -q clone -U test test-clone |
|
733 | 823 | $ cd test |
|
734 | 824 | |
|
735 | 825 | $ hg -q branch foo |
|
736 | 826 | $ hg commit -m "create foo branch" |
|
737 | 827 | $ hg -q outgoing ../test-clone |
|
738 | 828 | 9:b4f5acb1ee27 |
|
739 | 829 | $ hg -q bundle --branch foo foo.hg ../test-clone |
|
740 | 830 | #if repobundlerepo |
|
741 | 831 | $ hg -R foo.hg -q log -r "bundle()" |
|
742 | 832 | 9:b4f5acb1ee27 |
|
743 | 833 | #endif |
|
744 | 834 | |
|
745 | 835 | $ cd .. |
|
746 | 836 | |
|
747 | 837 | test for https://bz.mercurial-scm.org/1144 |
|
748 | 838 | |
|
749 | 839 | test that verify bundle does not traceback |
|
750 | 840 | |
|
751 | 841 | partial history bundle, fails w/ unknown parent |
|
752 | 842 | |
|
753 | 843 | $ hg -R bundle.hg verify |
|
754 | 844 | abort: 00changelog@bbd179dfa0a71671c253b3ae0aa1513b60d199fa: unknown parent |
|
755 | 845 | [50] |
|
756 | 846 | |
|
757 | 847 | full history bundle, refuses to verify non-local repo |
|
758 | 848 | |
|
759 | 849 | #if repobundlerepo |
|
760 | 850 | $ hg -R all.hg verify |
|
761 | 851 | abort: cannot verify bundle or remote repos |
|
762 | 852 | [255] |
|
763 | 853 | #endif |
|
764 | 854 | |
|
765 | 855 | but, regular verify must continue to work |
|
766 | 856 | |
|
767 | 857 | $ hg -R orig verify |
|
768 | 858 | checking changesets |
|
769 | 859 | checking manifests |
|
770 | 860 | crosschecking files in changesets and manifests |
|
771 | 861 | checking files |
|
772 | 862 | checked 2 changesets with 2 changes to 2 files |
|
773 | 863 | |
|
774 | 864 | #if repobundlerepo |
|
775 | 865 | diff against bundle |
|
776 | 866 | |
|
777 | 867 | $ hg init b |
|
778 | 868 | $ cd b |
|
779 | 869 | $ hg -R ../all.hg diff -r tip |
|
780 | 870 | diff -r aa35859c02ea anotherfile |
|
781 | 871 | --- a/anotherfile Thu Jan 01 00:00:00 1970 +0000 |
|
782 | 872 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
783 | 873 | @@ -1,4 +0,0 @@ |
|
784 | 874 | -0 |
|
785 | 875 | -1 |
|
786 | 876 | -2 |
|
787 | 877 | -3 |
|
788 | 878 | $ cd .. |
|
789 | 879 | #endif |
|
790 | 880 | |
|
791 | 881 | bundle single branch |
|
792 | 882 | |
|
793 | 883 | $ hg init branchy |
|
794 | 884 | $ cd branchy |
|
795 | 885 | $ echo a >a |
|
796 | 886 | $ echo x >x |
|
797 | 887 | $ hg ci -Ama |
|
798 | 888 | adding a |
|
799 | 889 | adding x |
|
800 | 890 | $ echo c >c |
|
801 | 891 | $ echo xx >x |
|
802 | 892 | $ hg ci -Amc |
|
803 | 893 | adding c |
|
804 | 894 | $ echo c1 >c1 |
|
805 | 895 | $ hg ci -Amc1 |
|
806 | 896 | adding c1 |
|
807 | 897 | $ hg up 0 |
|
808 | 898 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
809 | 899 | $ echo b >b |
|
810 | 900 | $ hg ci -Amb |
|
811 | 901 | adding b |
|
812 | 902 | created new head |
|
813 | 903 | $ echo b1 >b1 |
|
814 | 904 | $ echo xx >x |
|
815 | 905 | $ hg ci -Amb1 |
|
816 | 906 | adding b1 |
|
817 | 907 | $ hg clone -q -r2 . part |
|
818 | 908 | |
|
819 | 909 | == bundling via incoming |
|
820 | 910 | |
|
821 | 911 | $ hg in -R part --bundle incoming.hg --template "{node}\n" . |
|
822 | 912 | comparing with . |
|
823 | 913 | searching for changes |
|
824 | 914 | 1a38c1b849e8b70c756d2d80b0b9a3ac0b7ea11a |
|
825 | 915 | 057f4db07f61970e1c11e83be79e9d08adc4dc31 |
|
826 | 916 | |
|
827 | 917 | == bundling |
|
828 | 918 | |
|
829 | 919 | $ hg bundle bundle.hg part --debug --config progress.debug=true |
|
830 | 920 | query 1; heads |
|
831 | 921 | searching for changes |
|
832 | 922 | all remote heads known locally |
|
833 | 923 | 2 changesets found |
|
834 | 924 | list of changesets: |
|
835 | 925 | 1a38c1b849e8b70c756d2d80b0b9a3ac0b7ea11a |
|
836 | 926 | 057f4db07f61970e1c11e83be79e9d08adc4dc31 |
|
837 | 927 | bundle2-output-bundle: "HG20", (1 params) 2 parts total |
|
838 | 928 | bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload |
|
839 | 929 | changesets: 1/2 chunks (50.00%) |
|
840 | 930 | changesets: 2/2 chunks (100.00%) |
|
841 | 931 | manifests: 1/2 chunks (50.00%) |
|
842 | 932 | manifests: 2/2 chunks (100.00%) |
|
843 | 933 | files: b 1/3 files (33.33%) |
|
844 | 934 | files: b1 2/3 files (66.67%) |
|
845 | 935 | files: x 3/3 files (100.00%) |
|
846 | 936 | bundle2-output-part: "cache:rev-branch-cache" (advisory) streamed payload |
|
847 | 937 | |
|
848 | 938 | #if repobundlerepo |
|
849 | 939 | == Test for issue3441 |
|
850 | 940 | |
|
851 | 941 | $ hg clone -q -r0 . part2 |
|
852 | 942 | $ hg -q -R part2 pull bundle.hg |
|
853 | 943 | $ hg -R part2 verify |
|
854 | 944 | checking changesets |
|
855 | 945 | checking manifests |
|
856 | 946 | crosschecking files in changesets and manifests |
|
857 | 947 | checking files |
|
858 | 948 | checked 3 changesets with 5 changes to 4 files |
|
859 | 949 | #endif |
|
860 | 950 | |
|
861 | 951 | == Test bundling no commits |
|
862 | 952 | |
|
863 | 953 | $ hg bundle -r 'public()' no-output.hg |
|
864 | 954 | abort: no commits to bundle |
|
865 | 955 | [10] |
|
866 | 956 | |
|
867 | 957 | $ cd .. |
|
868 | 958 | |
|
869 | 959 | When user merges to the revision existing only in the bundle, |
|
870 | 960 | it should show warning that second parent of the working |
|
871 | 961 | directory does not exist |
|
872 | 962 | |
|
873 | 963 | $ hg init update2bundled |
|
874 | 964 | $ cd update2bundled |
|
875 | 965 | $ cat <<EOF >> .hg/hgrc |
|
876 | 966 | > [extensions] |
|
877 | 967 | > strip = |
|
878 | 968 | > EOF |
|
879 | 969 | $ echo "aaa" >> a |
|
880 | 970 | $ hg commit -A -m 0 |
|
881 | 971 | adding a |
|
882 | 972 | $ echo "bbb" >> b |
|
883 | 973 | $ hg commit -A -m 1 |
|
884 | 974 | adding b |
|
885 | 975 | $ echo "ccc" >> c |
|
886 | 976 | $ hg commit -A -m 2 |
|
887 | 977 | adding c |
|
888 | 978 | $ hg update -r 1 |
|
889 | 979 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
890 | 980 | $ echo "ddd" >> d |
|
891 | 981 | $ hg commit -A -m 3 |
|
892 | 982 | adding d |
|
893 | 983 | created new head |
|
894 | 984 | $ hg update -r 2 |
|
895 | 985 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
896 | 986 | $ hg log -G |
|
897 | 987 | o changeset: 3:8bd3e1f196af |
|
898 | 988 | | tag: tip |
|
899 | 989 | | parent: 1:a01eca7af26d |
|
900 | 990 | | user: test |
|
901 | 991 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
902 | 992 | | summary: 3 |
|
903 | 993 | | |
|
904 | 994 | | @ changeset: 2:4652c276ac4f |
|
905 | 995 | |/ user: test |
|
906 | 996 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
907 | 997 | | summary: 2 |
|
908 | 998 | | |
|
909 | 999 | o changeset: 1:a01eca7af26d |
|
910 | 1000 | | user: test |
|
911 | 1001 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
912 | 1002 | | summary: 1 |
|
913 | 1003 | | |
|
914 | 1004 | o changeset: 0:4fe08cd4693e |
|
915 | 1005 | user: test |
|
916 | 1006 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
917 | 1007 | summary: 0 |
|
918 | 1008 | |
|
919 | 1009 | |
|
920 | 1010 | #if repobundlerepo |
|
921 | 1011 | $ hg bundle --base 1 -r 3 ../update2bundled.hg |
|
922 | 1012 | 1 changesets found |
|
923 | 1013 | $ hg strip -r 3 |
|
924 | 1014 | saved backup bundle to $TESTTMP/update2bundled/.hg/strip-backup/8bd3e1f196af-017e56d8-backup.hg |
|
925 | 1015 | $ hg merge -R ../update2bundled.hg -r 3 |
|
926 | 1016 | setting parent to node 8bd3e1f196af289b2b121be08031e76d7ae92098 that only exists in the bundle |
|
927 | 1017 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
928 | 1018 | (branch merge, don't forget to commit) |
|
929 | 1019 | |
|
930 | 1020 | When user updates to the revision existing only in the bundle, |
|
931 | 1021 | it should show warning |
|
932 | 1022 | |
|
933 | 1023 | $ hg update -R ../update2bundled.hg --clean -r 3 |
|
934 | 1024 | setting parent to node 8bd3e1f196af289b2b121be08031e76d7ae92098 that only exists in the bundle |
|
935 | 1025 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
936 | 1026 | |
|
937 | 1027 | When user updates to the revision existing in the local repository |
|
938 | 1028 | the warning shouldn't be emitted |
|
939 | 1029 | |
|
940 | 1030 | $ hg update -R ../update2bundled.hg -r 0 |
|
941 | 1031 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
942 | 1032 | #endif |
|
943 | 1033 | |
|
944 | 1034 | Test the option that create slim bundle |
|
945 | 1035 | |
|
946 | 1036 | $ hg bundle -a --config devel.bundle.delta=p1 ./slim.hg |
|
947 | 1037 | 3 changesets found |
|
948 | 1038 | |
|
949 | 1039 | Test the option that create and no-delta's bundle |
|
950 | 1040 | $ hg bundle -a --config devel.bundle.delta=full ./full.hg |
|
951 | 1041 | 3 changesets found |
General Comments 0
You need to be logged in to leave comments.
Login now