diff --git a/hgext/largefiles/lfcommands.py b/hgext/largefiles/lfcommands.py --- a/hgext/largefiles/lfcommands.py +++ b/hgext/largefiles/lfcommands.py @@ -485,7 +485,7 @@ def cachelfiles(ui, repo, node, filelist return ([], []) -def downloadlfiles(ui, repo, rev=None): +def downloadlfiles(ui, repo): match = scmutil.match(repo[None], [repo.wjoin(lfutil.shortname)], {}) def prepare(ctx, fns): @@ -493,11 +493,10 @@ def downloadlfiles(ui, repo, rev=None): totalsuccess = 0 totalmissing = 0 - if rev != []: # walkchangerevs on empty list would return all revs - for ctx in cmdutil.walkchangerevs(repo, match, {b'rev': rev}, prepare): - success, missing = cachelfiles(ui, repo, ctx.node()) - totalsuccess += len(success) - totalmissing += len(missing) + for ctx in cmdutil.walkchangerevs(repo, match, {b'rev': None}, prepare): + success, missing = cachelfiles(ui, repo, ctx.node()) + totalsuccess += len(success) + totalmissing += len(missing) ui.status(_(b"%d additional largefiles cached\n") % totalsuccess) if totalmissing > 0: ui.status(_(b"%d largefiles failed to download\n") % totalmissing) diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py --- a/hgext/largefiles/overrides.py +++ b/hgext/largefiles/overrides.py @@ -1094,7 +1094,7 @@ def hgclone(orig, ui, opts, *args, **kwa # truncated at that point. The user may expect a download count with # this option, so attempt whether or not this is a largefile repo. if opts.get(b'all_largefiles'): - success, missing = lfcommands.downloadlfiles(ui, repo, None) + success, missing = lfcommands.downloadlfiles(ui, repo) if missing != 0: return None