tests: fix test-check-module-imports.t broken by D9150
Differential Revision: https://phab.mercurial-scm.org/D9177
tests: make test-convert-git.t work across changed default branch name
Recent git versions default to "main" instead of "master", which
breaks our test.
Differential Revision: https://phab.mercurial-scm.org/D9174
tests: update test-copies-chain-merge.t to not use empty files
Merging empty files is not very interesting or realistic.
tests: only diff the `Cargo.lock` in `test-check-cargo-lock.t`
While not perfect (you could be running tests while developing with a justified
modification to `Cargo.lock`), that use-case is small enough that I don't think
it's really going to be an issue.
This stops the test from failing for unrelated changes when running it locally.
Differential Revision: https://phab.mercurial-scm.org/D9170
tests: update/remove outdated comments in test-copies-chain-merge.t
1b8fd4af3318 fixed the test case but missed updating the comments mentioning the
bug. Thanks for @martinvonz who spotted these outdated comments.
Differential Revision: https://phab.mercurial-scm.org/D9168
cmdutil: rewrite walkchangerevs() by using logcmdutil functions
cmdutil.walkchangerevs() now takes (revs, makefilematcher) in place of
(match, opts), and only provides the "windowing" functionality. Unused
classes and functions will be removed by the next patch.
"hg grep --follow" (--all-files) is still broken since there is no logic
to follow copies while traversing changelog, but at least, it does follow
the DAG.
grep: filter target files by matcher
Prepares for the migration to logcmdutil's logic, where cmdutil.walkchangerevs()
won't always build an exact set of paths to be scanned.
cmdutil: make walkchangerevs() call prepare with matcher instead of filenames
Prepares for migrating walkchangerevs() to logcmdutil's logic, which provides
matcher-based interface.