diff mercurial/commands.py @ 38342:b8f45fc27370

grep: adds allfiles mode Adds an allfiles flag that lets you grep on all files in the revision and not just the one that were modified in that changeset. This would work on a single revision and get all the files that were there in that revision. So it's like grepping on a previous state. Using this with wdir() :: `hg grep -r "wdir()" --allfiles` is what the default behavior is desired for grep. Support for multiple revisions to be added later. Differential Revision: https://phab.mercurial-scm.org/D3728
author Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
date Wed, 13 Jun 2018 16:22:54 +0530
parents c924e7dbcd0f
children 31ed65f9c5ad
line wrap: on
line diff
--- a/mercurial/commands.py	Wed Jun 13 22:50:32 2018 +0530
+++ b/mercurial/commands.py	Wed Jun 13 16:22:54 2018 +0530
@@ -2403,6 +2403,8 @@
     ('n', 'line-number', None, _('print matching line numbers')),
     ('r', 'rev', [],
      _('only search files changed within revision range'), _('REV')),
+    ('', 'allfiles', False,
+     _('include all files in the changeset while grepping (EXPERIMENTAL)')),
     ('u', 'user', None, _('list the author (long with -v)')),
     ('d', 'date', None, _('list the date (short with -q)')),
     ] + formatteropts + walkopts,