comparison mercurial/commands.py @ 45720:508dfd1c18df

scmutil: move walkchangerevs() from cmdutil It's no longer a command-level function, but a pure helper to walk revisions in a windowed way. This change will help eliminate reverse dependency of revset.py -> grep.py -> cmdutil.py in future patches.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 04 Oct 2020 13:17:57 +0900
parents c10c87c8fe79
children f9d3ff23bfc0
comparison
equal deleted inserted replaced
45719:c10c87c8fe79 45720:508dfd1c18df
3530 ) 3530 )
3531 revs, makefilematcher = logcmdutil.makewalker(repo, wopts) 3531 revs, makefilematcher = logcmdutil.makewalker(repo, wopts)
3532 3532
3533 ui.pager(b'grep') 3533 ui.pager(b'grep')
3534 fm = ui.formatter(b'grep', opts) 3534 fm = ui.formatter(b'grep', opts)
3535 for ctx in cmdutil.walkchangerevs( 3535 for ctx in scmutil.walkchangerevs(
3536 repo, revs, makefilematcher, searcher._prep 3536 repo, revs, makefilematcher, searcher._prep
3537 ): 3537 ):
3538 rev = ctx.rev() 3538 rev = ctx.rev()
3539 parent = ctx.p1().rev() 3539 parent = ctx.p1().rev()
3540 for fn in sorted(revfiles.get(rev, [])): 3540 for fn in sorted(revfiles.get(rev, [])):