grep: clarify that --all works exactly the same way as --diff
7fbb5d76c555 "grep: add --diff flag" says as such, but the help strings
have diverged since, and it's getting fuzzier what this --all will do.
tests: run test-check-py3-compat only in pure python mode
This test was added few years ago to detect syntax and import related warnings
and kickstart the python-3 porting efforts. It tries to parse the ast and import
the module.
When using in strict modes like `HGMODULEPOLICY=rust` or `HGMODULEPOLICY=c`, the
test fails. Let's run the test only on pure python mode.
We now have full test suite being run with python 3 and some people even use hg
with python 3 in production (like me).
log: make -frREV PATH detect missing files before falling back to slow path
If -rREV isn't specified, "log --follow" would abort on nonexistent paths.
Let's implement this behavior for "-frREV" case as we have ctx.hasdir() now.
Otherwise "log -frREV PATH" would silently fall back to slow path and files
wouldn't be followed across renames.
The loop is quadratic (as before), but the size of the startctxs and
match.files() should be small in general.
Some tests are marked as BROKEN since file renames aren't tracked in the
slow path. This is a known limitation of the current history traversal
function.
log: fix -fr'wdir()' PATH to follow newly added file
Testing filelog doesn't make sense in this case because the file existence
is tested against the specified changectxs. If the filelog is empty and
if startctxs != [wctx], 'f not in c' should be triggered.
log: reorganize if-else and for loop in logcmdutil._makematcher()
The test conditions are branchy depending on --follow and --rev options,
so it should be better to switch first by --follow --rev.
Note that revs is not empty so "if follow and startctxs" can be replaced
with "if follow and opts.get(b'rev')".