483 return ret |
483 return ret |
484 |
484 |
485 return ([], []) |
485 return ([], []) |
486 |
486 |
487 |
487 |
488 def downloadlfiles(ui, repo, rev=None): |
488 def downloadlfiles(ui, repo): |
489 match = scmutil.match(repo[None], [repo.wjoin(lfutil.shortname)], {}) |
489 match = scmutil.match(repo[None], [repo.wjoin(lfutil.shortname)], {}) |
490 |
490 |
491 def prepare(ctx, fns): |
491 def prepare(ctx, fns): |
492 pass |
492 pass |
493 |
493 |
494 totalsuccess = 0 |
494 totalsuccess = 0 |
495 totalmissing = 0 |
495 totalmissing = 0 |
496 if rev != []: # walkchangerevs on empty list would return all revs |
496 for ctx in cmdutil.walkchangerevs(repo, match, {b'rev': None}, prepare): |
497 for ctx in cmdutil.walkchangerevs(repo, match, {b'rev': rev}, prepare): |
497 success, missing = cachelfiles(ui, repo, ctx.node()) |
498 success, missing = cachelfiles(ui, repo, ctx.node()) |
498 totalsuccess += len(success) |
499 totalsuccess += len(success) |
499 totalmissing += len(missing) |
500 totalmissing += len(missing) |
|
501 ui.status(_(b"%d additional largefiles cached\n") % totalsuccess) |
500 ui.status(_(b"%d additional largefiles cached\n") % totalsuccess) |
502 if totalmissing > 0: |
501 if totalmissing > 0: |
503 ui.status(_(b"%d largefiles failed to download\n") % totalmissing) |
502 ui.status(_(b"%d largefiles failed to download\n") % totalmissing) |
504 return totalsuccess, totalmissing |
503 return totalsuccess, totalmissing |
505 |
504 |