D4157: grep: search all commits in allfiles mode
sangeet259 (Sangeet Kumar Mishra)
phabricator at mercurial-scm.org
Wed Aug 8 16:12:30 UTC 2018
sangeet259 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
All the commits are added to the 'wanted' set when allfiles mode is enabled.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D4157
AFFECTED FILES
mercurial/cmdutil.py
tests/test-grep.t
CHANGE DETAILS
diff --git a/tests/test-grep.t b/tests/test-grep.t
--- a/tests/test-grep.t
+++ b/tests/test-grep.t
@@ -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 ..
+
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -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:
To: sangeet259, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list