# HG changeset patch # User Yuya Nishihara # Date 2020-09-13 08:43:19 # Node ID ac7b9ed0a2459d9dffdf84b1871cdf5be5a108f5 # Parent 39ddb1121c4efb2721c5213548021935c915bbcc largefiles: replace use of walkchangerevs() with simple revset query Since it does nothing in prepare(), what we're doing is just walking revisions matching ".hglf" in reverse order. diff --git a/hgext/largefiles/lfcommands.py b/hgext/largefiles/lfcommands.py --- a/hgext/largefiles/lfcommands.py +++ b/hgext/largefiles/lfcommands.py @@ -486,15 +486,11 @@ def cachelfiles(ui, repo, node, filelist def downloadlfiles(ui, repo): - match = scmutil.match(repo[None], [repo.wjoin(lfutil.shortname)], {}) - - def prepare(ctx, fns): - pass - + tonode = repo.changelog.node totalsuccess = 0 totalmissing = 0 - for ctx in cmdutil.walkchangerevs(repo, match, {b'rev': None}, prepare): - success, missing = cachelfiles(ui, repo, ctx.node()) + for rev in repo.revs(b'reverse(file(%s))', b'path:' + lfutil.shortname): + success, missing = cachelfiles(ui, repo, tonode(rev)) totalsuccess += len(success) totalmissing += len(missing) ui.status(_(b"%d additional largefiles cached\n") % totalsuccess)