D2938: grep: make grep search on working directory by default

Yuya Nishihara yuya at tcha.org
Wed Jun 6 10:10:33 EDT 2018


>   Hey @yuja 
>   Can you explain why you did this ?
>   
>   > - slowpath = match.anypats() or (not match.always() and opts.get('removed')) +    slowpath = True

>From my vague memory, I guess I would think that if we do `s/ctx.files()/ctx/`
(which means we're looking for revisions where files exist, not files change),
the use of `walkfilerevs()` is not valid since filelogs only contain "changes."

To be clear, I'm not saying that will be the desired behavior of `hg grep` of
"--all-files" of multiple revisions. It might be better to skip intermediate
revisions where files are unchanged.


More information about the Mercurial-devel mailing list