##// END OF EJS Templates
diff: invoke the file prefetch hook...
Matt Harbison -
r37782:5e67c209 default
parent child Browse files
Show More
@@ -2466,6 +2466,10 b' def diffhunks(repo, node1=None, node2=No'
2466 # reported as copies. We want to show them in the diff as additions.
2466 # reported as copies. We want to show them in the diff as additions.
2467 del copy[dst]
2467 del copy[dst]
2468
2468
2469 prefetchmatch = scmutil.matchfiles(
2470 repo, list(modifiedset | addedset | removedset))
2471 scmutil.prefetchfiles(repo, [ctx1.rev(), ctx2.rev()], prefetchmatch)
2472
2469 def difffn(opts, losedata):
2473 def difffn(opts, losedata):
2470 return trydiff(repo, revs, ctx1, ctx2, modified, added, removed,
2474 return trydiff(repo, revs, ctx1, ctx2, modified, added, removed,
2471 copy, getfilectx, opts, losedata, prefix, relroot)
2475 copy, getfilectx, opts, losedata, prefix, relroot)
@@ -365,6 +365,71 b' Export with selected files is used with '
365 cleaning up temp directory
365 cleaning up temp directory
366 [1]
366 [1]
367
367
368 Diff will prefetch files
369
370 $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs
371 $ hg -R $TESTTMP/bulkfetch -v diff -r 2:tip
372 lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
373 lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
374 lfs: need to transfer 4 objects (92 bytes)
375 lfs: downloading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes)
376 lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de
377 lfs: downloading bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc (23 bytes)
378 lfs: processed: bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc
379 lfs: downloading cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 (20 bytes)
380 lfs: processed: cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782
381 lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes)
382 lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e
383 lfs: found bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc in the local lfs store
384 lfs: found a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de in the local lfs store
385 lfs: found cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 in the local lfs store
386 lfs: found d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e in the local lfs store
387 diff -r 8374dc4052cb -r 9640b57e77b1 lfs.bin
388 --- a/lfs.bin Thu Jan 01 00:00:00 1970 +0000
389 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
390 @@ -1,1 +0,0 @@
391 -this is a big lfs file
392 diff -r 8374dc4052cb -r 9640b57e77b1 lfs2.txt
393 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
394 +++ b/lfs2.txt Thu Jan 01 00:00:00 1970 +0000
395 @@ -0,0 +1,1 @@
396 +this is another lfs file
397 diff -r 8374dc4052cb -r 9640b57e77b1 lfspair1.bin
398 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
399 +++ b/lfspair1.bin Thu Jan 01 00:00:00 1970 +0000
400 @@ -0,0 +1,1 @@
401 +this is an lfs file
402 diff -r 8374dc4052cb -r 9640b57e77b1 lfspair2.bin
403 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
404 +++ b/lfspair2.bin Thu Jan 01 00:00:00 1970 +0000
405 @@ -0,0 +1,1 @@
406 +this is an lfs file too
407 diff -r 8374dc4052cb -r 9640b57e77b1 nonlfs.txt
408 --- a/nonlfs.txt Thu Jan 01 00:00:00 1970 +0000
409 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
410 @@ -1,1 +0,0 @@
411 -non-lfs
412 diff -r 8374dc4052cb -r 9640b57e77b1 nonlfs3.txt
413 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
414 +++ b/nonlfs3.txt Thu Jan 01 00:00:00 1970 +0000
415 @@ -0,0 +1,1 @@
416 +non-lfs
417
418 Only the files required by diff are prefetched
419
420 $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs
421 $ hg -R $TESTTMP/bulkfetch -v diff -r 2:tip $TESTTMP/bulkfetch/lfspair2.bin
422 lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
423 lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
424 lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes)
425 lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e
426 lfs: found d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e in the local lfs store
427 diff -r 8374dc4052cb -r 9640b57e77b1 lfspair2.bin
428 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
429 +++ b/lfspair2.bin Thu Jan 01 00:00:00 1970 +0000
430 @@ -0,0 +1,1 @@
431 +this is an lfs file too
432
368 #endif
433 #endif
369
434
370 $ $PYTHON $TESTDIR/killdaemons.py $DAEMON_PIDS
435 $ $PYTHON $TESTDIR/killdaemons.py $DAEMON_PIDS
General Comments 0
You need to be logged in to leave comments. Login now