224 $ dd if=/dev/zero bs=1k count=1k > anotherlarge 2> /dev/null |
224 $ dd if=/dev/zero bs=1k count=1k > anotherlarge 2> /dev/null |
225 $ hg add --lfsize=1 anotherlarge |
225 $ hg add --lfsize=1 anotherlarge |
226 $ hg commit -m "add anotherlarge (should be a largefile)" |
226 $ hg commit -m "add anotherlarge (should be a largefile)" |
227 $ cat .hglf/anotherlarge |
227 $ cat .hglf/anotherlarge |
228 3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 |
228 3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 |
|
229 $ hg tag mytag |
229 $ cd .. |
230 $ cd .. |
230 |
231 |
231 round-trip: converting back to a normal (non-largefiles) repo with |
232 round-trip: converting back to a normal (non-largefiles) repo with |
232 "lfconvert --to-normal" should give the same as ../bigfile-repo |
233 "lfconvert --to-normal" should give the same as ../bigfile-repo |
233 $ cd largefiles-repo |
234 $ cd largefiles-repo |
234 $ hg lfconvert --to-normal . ../normal-repo |
235 $ hg lfconvert --to-normal . ../normal-repo |
235 initializing destination ../normal-repo |
236 initializing destination ../normal-repo |
|
237 0 additional largefiles cached |
|
238 scanning source... |
|
239 sorting... |
|
240 converting... |
|
241 7 add large, normal1 |
|
242 6 add sub/* |
|
243 5 rename sub/ to stuff/ |
|
244 4 add normal3, modify sub/* |
|
245 3 remove large, normal3 |
|
246 2 merge |
|
247 1 add anotherlarge (should be a largefile) |
|
248 0 Added tag mytag for changeset abacddda7028 |
236 $ cd ../normal-repo |
249 $ cd ../normal-repo |
237 $ cat >> .hg/hgrc <<EOF |
250 $ cat >> .hg/hgrc <<EOF |
238 > [extensions] |
251 > [extensions] |
239 > largefiles = ! |
252 > largefiles = ! |
240 > EOF |
253 > EOF |
241 |
254 |
242 # Hmmm: the changeset ID for rev 5 is different from the original |
|
243 # normal repo (../bigfile-repo), because the changelog filelist |
|
244 # differs between the two incarnations of rev 5: this repo includes |
|
245 # 'large' in the list, but ../bigfile-repo does not. Since rev 5 |
|
246 # removes 'large' relative to the first parent in both repos, it seems |
|
247 # to me that lfconvert is doing a *better* job than |
|
248 # "hg remove" + "hg merge" + "hg commit". |
|
249 # $ hg -R ../bigfile-repo debugdata -c 5 |
|
250 # $ hg debugdata -c 5 |
|
251 $ hg log -G --template "{rev}:{node|short} {desc|firstline}\n" |
255 $ hg log -G --template "{rev}:{node|short} {desc|firstline}\n" |
252 o 6:1635824e6f59 add anotherlarge (should be a largefile) |
256 o 7:b5fedc110b9d Added tag mytag for changeset 867ab992ecf4 |
253 | |
257 | |
254 o 5:7215f8deeaaf merge |
258 o 6:867ab992ecf4 add anotherlarge (should be a largefile) |
|
259 | |
|
260 o 5:4884f215abda merge |
255 |\ |
261 |\ |
256 | o 4:7285f817b77e remove large, normal3 |
262 | o 4:7285f817b77e remove large, normal3 |
257 | | |
263 | | |
258 | o 3:67e3892e3534 add normal3, modify sub/* |
264 | o 3:67e3892e3534 add normal3, modify sub/* |
259 | | |
265 | | |
262 o 1:020c65d24e11 add sub/* |
268 o 1:020c65d24e11 add sub/* |
263 | |
269 | |
264 o 0:117b8328f97a add large, normal1 |
270 o 0:117b8328f97a add large, normal1 |
265 |
271 |
266 $ hg update |
272 $ hg update |
267 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
273 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
268 $ hg locate |
274 $ hg locate |
|
275 .hgtags |
269 anotherlarge |
276 anotherlarge |
270 normal1 |
277 normal1 |
271 stuff/maybelarge.dat |
278 stuff/maybelarge.dat |
272 stuff/normal2 |
279 stuff/normal2 |
273 $ [ -d .hg/largefiles ] && echo fail || echo pass |
280 $ [ -d .hg/largefiles ] && echo fail || echo pass |
282 assuming destination largefiles-repo-hg |
289 assuming destination largefiles-repo-hg |
283 initializing destination largefiles-repo-hg repository |
290 initializing destination largefiles-repo-hg repository |
284 scanning source... |
291 scanning source... |
285 sorting... |
292 sorting... |
286 converting... |
293 converting... |
287 6 add large, normal1 |
294 7 add large, normal1 |
288 5 add sub/* |
295 6 add sub/* |
289 4 rename sub/ to stuff/ |
296 5 rename sub/ to stuff/ |
290 3 add normal3, modify sub/* |
297 4 add normal3, modify sub/* |
291 2 remove large, normal3 |
298 3 remove large, normal3 |
292 1 merge |
299 2 merge |
293 0 add anotherlarge (should be a largefile) |
300 1 add anotherlarge (should be a largefile) |
|
301 0 Added tag mytag for changeset abacddda7028 |
294 |
302 |
295 $ hg -R largefiles-repo-hg log -G --template "{rev}:{node|short} {desc|firstline}\n" |
303 $ hg -R largefiles-repo-hg log -G --template "{rev}:{node|short} {desc|firstline}\n" |
|
304 o 7:2f08f66459b7 Added tag mytag for changeset 17126745edfd |
|
305 | |
296 o 6:17126745edfd add anotherlarge (should be a largefile) |
306 o 6:17126745edfd add anotherlarge (should be a largefile) |
297 | |
307 | |
298 o 5:9cc5aa7204f0 merge |
308 o 5:9cc5aa7204f0 merge |
299 |\ |
309 |\ |
300 | o 4:a5a02de7a8e4 remove large, normal3 |
310 | o 4:a5a02de7a8e4 remove large, normal3 |
313 $ hg -R largefiles-repo-hg verify --large --lfa |
323 $ hg -R largefiles-repo-hg verify --large --lfa |
314 checking changesets |
324 checking changesets |
315 checking manifests |
325 checking manifests |
316 crosschecking files in changesets and manifests |
326 crosschecking files in changesets and manifests |
317 checking files |
327 checking files |
318 8 files, 7 changesets, 12 total revisions |
328 9 files, 8 changesets, 13 total revisions |
319 searching 7 changesets for largefiles |
329 searching 8 changesets for largefiles |
320 changeset 0:d4892ec57ce2: large references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/2e000fa7e85759c7f4c254d4d9c33ef481e459a7 (glob) |
330 changeset 0:d4892ec57ce2: large references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/2e000fa7e85759c7f4c254d4d9c33ef481e459a7 (glob) |
321 changeset 1:334e5237836d: sub/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c (glob) |
331 changeset 1:334e5237836d: sub/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c (glob) |
322 changeset 2:261ad3f3f037: stuff/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c (glob) |
332 changeset 2:261ad3f3f037: stuff/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c (glob) |
323 changeset 3:55759520c76f: sub/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/76236b6a2c6102826c61af4297dd738fb3b1de38 (glob) |
333 changeset 3:55759520c76f: sub/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/76236b6a2c6102826c61af4297dd738fb3b1de38 (glob) |
324 changeset 5:9cc5aa7204f0: stuff/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/76236b6a2c6102826c61af4297dd738fb3b1de38 (glob) |
334 changeset 5:9cc5aa7204f0: stuff/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/76236b6a2c6102826c61af4297dd738fb3b1de38 (glob) |
334 Ensure the largefile can be cached in the source if necessary |
344 Ensure the largefile can be cached in the source if necessary |
335 $ hg clone -U largefiles-repo issue3519 |
345 $ hg clone -U largefiles-repo issue3519 |
336 $ rm -f "${USERCACHE}"/* |
346 $ rm -f "${USERCACHE}"/* |
337 $ hg lfconvert --to-normal issue3519 normalized3519 |
347 $ hg lfconvert --to-normal issue3519 normalized3519 |
338 initializing destination normalized3519 |
348 initializing destination normalized3519 |
|
349 4 additional largefiles cached |
|
350 scanning source... |
|
351 sorting... |
|
352 converting... |
|
353 7 add large, normal1 |
|
354 6 add sub/* |
|
355 5 rename sub/ to stuff/ |
|
356 4 add normal3, modify sub/* |
|
357 3 remove large, normal3 |
|
358 2 merge |
|
359 1 add anotherlarge (should be a largefile) |
|
360 0 Added tag mytag for changeset abacddda7028 |
339 |
361 |
340 Ensure the abort message is useful if a largefile is entirely unavailable |
362 Ensure the abort message is useful if a largefile is entirely unavailable |
341 $ rm -rf normalized3519 |
363 $ rm -rf normalized3519 |
342 $ rm "${USERCACHE}"/* |
364 $ rm "${USERCACHE}"/* |
343 $ rm issue3519/.hg/largefiles/* |
365 $ rm issue3519/.hg/largefiles/* |
344 $ rm largefiles-repo/.hg/largefiles/* |
366 $ rm largefiles-repo/.hg/largefiles/* |
345 $ hg lfconvert --to-normal issue3519 normalized3519 |
367 $ hg lfconvert --to-normal issue3519 normalized3519 |
346 initializing destination normalized3519 |
368 initializing destination normalized3519 |
|
369 anotherlarge: largefile 3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
370 stuff/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
371 stuff/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
372 sub/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
347 large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
373 large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
348 abort: missing largefile 'large' from revision d4892ec57ce212905215fad1d9018f56b99202ad |
374 sub/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
349 [255] |
375 large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
350 |
376 stuff/maybelarge.dat: largefile 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c not available from file:/*/$TESTTMP/largefiles-repo (glob) |
351 |
377 large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
378 sub/maybelarge.dat: largefile 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
379 large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
380 0 additional largefiles cached |
|
381 11 largefiles failed to download |
|
382 abort: all largefiles must be present locally |
|
383 [255] |
|
384 |
|
385 |