On Mon, 16 Apr 2018 15:07:09 -0400, Matt Harbison wrote: > # HG changeset patch > # User Matt Harbison <matt_harbi...@yahoo.com> > # Date 1523746245 14400 > # Sat Apr 14 18:50:45 2018 -0400 > # Node ID fe6824bcc6b8228f2eb141ea96efb6797b5530d7 > # Parent 1859b9a7ddefe90971259da0793e9289fd65c63f > scmutil: teach the file prefetch hook to handle multiple commits
Queued, thanks. > diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py > --- a/mercurial/cmdutil.py > +++ b/mercurial/cmdutil.py > @@ -2258,16 +2258,15 @@ def cat(ui, repo, ctx, matcher, basefm, > mfnode = ctx.manifestnode() > try: > if mfnode and mfl[mfnode].find(file)[0]: > - scmutil.fileprefetchhooks(repo, ctx, [file]) > + scmutil.prefetchfiles(repo, [ctx.rev()], matcher) > write(file) > return 0 > except KeyError: > pass > > - files = [f for f in ctx.walk(matcher)] > - scmutil.fileprefetchhooks(repo, ctx, files) > - > - for abs in files: > + scmutil.prefetchfiles(repo, [ctx.rev()], matcher) Nit: these prefetchfiles() could be moved before the fast path. _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel