largefiles: remove unused 'rev' parameter from downloadlfiles()
It's no longer used since 83ead8cb0ff2 "largefiles: implement pull
--all-largefiles as a special case of --lfrev."
--- a/hgext/largefiles/lfcommands.py Sat Sep 12 11:18:12 2020 -0700
+++ b/hgext/largefiles/lfcommands.py Fri Sep 11 10:47:17 2020 +0900
@@ -485,7 +485,7 @@
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 @@
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)
--- a/hgext/largefiles/overrides.py Sat Sep 12 11:18:12 2020 -0700
+++ b/hgext/largefiles/overrides.py Fri Sep 11 10:47:17 2020 +0900
@@ -1094,7 +1094,7 @@
# 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