# HG changeset patch # User Sangeet Kumar Mishra # Date 1533736742 -19800 # Node ID d99468d2b09acc8f5c6c5ce5c1b08b47a742841f # Parent 0d032756e9bfa6c36d8dc484c95a787421d94df9 grep: search all commits in allfiles mode All the commits are added to the 'wanted' set when allfiles mode is enabled. Differential Revision: https://phab.mercurial-scm.org/D4157 diff -r 0d032756e9bf -r d99468d2b09a mercurial/cmdutil.py --- a/mercurial/cmdutil.py Wed Aug 08 17:07:27 2018 -0700 +++ b/mercurial/cmdutil.py Wed Aug 08 19:29:02 2018 +0530 @@ -1899,7 +1899,7 @@ # wanted: a cache of filenames that were changed (ctx.files()) and that # match the file filtering conditions. - if match.always(): + if match.always() or allfiles: # No files, no patterns. Display all revs. wanted = revs elif not slowpath: diff -r 0d032756e9bf -r d99468d2b09a tests/test-grep.t --- a/tests/test-grep.t Wed Aug 08 17:07:27 2018 -0700 +++ b/tests/test-grep.t Wed Aug 08 19:29:02 2018 +0530 @@ -500,4 +500,8 @@ $ hg grep -r "0:2" "unmod" --all-files um:0:unmod um:1:unmod + $ hg grep -r "0:2" "unmod" --all-files um + um:0:unmod + um:1:unmod $ cd .. +