Show More
@@ -1624,6 +1624,8 b' def export(repo, revs, basefm, fntemplat' | |||
|
1624 | 1624 | the given template. |
|
1625 | 1625 | Otherwise: All revs will be written to basefm. |
|
1626 | 1626 | ''' |
|
1627 | scmutil.prefetchfiles(repo, revs, match) | |
|
1628 | ||
|
1627 | 1629 | if not fntemplate: |
|
1628 | 1630 | _exportfile(repo, revs, basefm, '<unnamed>', switch_parent, opts, match) |
|
1629 | 1631 | else: |
@@ -1632,6 +1634,8 b' def export(repo, revs, basefm, fntemplat' | |||
|
1632 | 1634 | |
|
1633 | 1635 | def exportfile(repo, revs, fp, switch_parent=False, opts=None, match=None): |
|
1634 | 1636 | """Export changesets to the given file stream""" |
|
1637 | scmutil.prefetchfiles(repo, revs, match) | |
|
1638 | ||
|
1635 | 1639 | dest = getattr(fp, 'name', '<unnamed>') |
|
1636 | 1640 | with formatter.formatter(repo.ui, fp, 'export', {}) as fm: |
|
1637 | 1641 | _exportfile(repo, revs, fm, dest, switch_parent, opts, match) |
@@ -304,6 +304,67 b' Misc: process dies early if a requiremen' | |||
|
304 | 304 | (see https://mercurial-scm.org/wiki/MissingRequirement for more information) |
|
305 | 305 | [255] |
|
306 | 306 | |
|
307 | $ echo 'this is an lfs file' > $TESTTMP/client6_clone/lfspair1.bin | |
|
308 | $ echo 'this is an lfs file too' > $TESTTMP/client6_clone/lfspair2.bin | |
|
309 | $ hg -R $TESTTMP/client6_clone ci -Aqm 'add lfs pair' | |
|
310 | $ hg -R $TESTTMP/client6_clone push -q | |
|
311 | ||
|
312 | $ hg clone -qU http://localhost:$HGPORT $TESTTMP/bulkfetch | |
|
313 | ||
|
314 | Export will prefetch all needed files across all needed revisions | |
|
315 | ||
|
316 | $ hg -R $TESTTMP/bulkfetch -v export -r 0:tip -o all.export | |
|
317 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs | |
|
318 | exporting patches: | |
|
319 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs | |
|
320 | lfs: need to transfer 4 objects (92 bytes) | |
|
321 | lfs: downloading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes) | |
|
322 | lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de | |
|
323 | lfs: downloading bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc (23 bytes) | |
|
324 | lfs: processed: bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc | |
|
325 | lfs: downloading cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 (20 bytes) | |
|
326 | lfs: processed: cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 | |
|
327 | lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes) | |
|
328 | lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e | |
|
329 | all.export | |
|
330 | lfs: found bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc in the local lfs store | |
|
331 | lfs: found a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de in the local lfs store | |
|
332 | lfs: found cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 in the local lfs store | |
|
333 | lfs: found d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e in the local lfs store | |
|
334 | ||
|
335 | Export with selected files is used with `extdiff --patch` | |
|
336 | ||
|
337 | $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs | |
|
338 | $ hg --config extensions.extdiff= \ | |
|
339 | > -R $TESTTMP/bulkfetch -v extdiff -r 2:tip --patch $TESTTMP/bulkfetch/lfs.bin | |
|
340 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs | |
|
341 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs | |
|
342 | lfs: downloading bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc (23 bytes) | |
|
343 | lfs: processed: bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc | |
|
344 | */hg-8374dc4052cb.patch (glob) | |
|
345 | lfs: found bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc in the local lfs store | |
|
346 | */hg-9640b57e77b1.patch (glob) | |
|
347 | --- */hg-8374dc4052cb.patch * (glob) | |
|
348 | +++ */hg-9640b57e77b1.patch * (glob) | |
|
349 | @@ -2,12 +2,7 @@ | |
|
350 | # User test | |
|
351 | # Date 0 0 | |
|
352 | # Thu Jan 01 00:00:00 1970 +0000 | |
|
353 | -# Node ID 8374dc4052cbd388e79d9dc4ddb29784097aa354 | |
|
354 | -# Parent 1477875038c60152e391238920a16381c627b487 | |
|
355 | -lfs | |
|
356 | +# Node ID 9640b57e77b14c3a0144fb4478b6cc13e13ea0d1 | |
|
357 | +# Parent d3b84d50eacbd56638e11abce6b8616aaba54420 | |
|
358 | +add lfs pair | |
|
359 | ||
|
360 | -diff -r 1477875038c6 -r 8374dc4052cb lfs.bin | |
|
361 | ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
|
362 | -+++ b/lfs.bin Thu Jan 01 00:00:00 1970 +0000 | |
|
363 | -@@ -0,0 +1,1 @@ | |
|
364 | -+this is a big lfs file | |
|
365 | cleaning up temp directory | |
|
366 | [1] | |
|
367 | ||
|
307 | 368 | #endif |
|
308 | 369 | |
|
309 | 370 |
$ $ |
General Comments 0
You need to be logged in to leave comments.
Login now