Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
38341:50f5fc232c16 | 38342:b8f45fc27370 |
---|---|
2401 ('l', 'files-with-matches', None, | 2401 ('l', 'files-with-matches', None, |
2402 _('print only filenames and revisions that match')), | 2402 _('print only filenames and revisions that match')), |
2403 ('n', 'line-number', None, _('print matching line numbers')), | 2403 ('n', 'line-number', None, _('print matching line numbers')), |
2404 ('r', 'rev', [], | 2404 ('r', 'rev', [], |
2405 _('only search files changed within revision range'), _('REV')), | 2405 _('only search files changed within revision range'), _('REV')), |
2406 ('', 'allfiles', False, | |
2407 _('include all files in the changeset while grepping (EXPERIMENTAL)')), | |
2406 ('u', 'user', None, _('list the author (long with -v)')), | 2408 ('u', 'user', None, _('list the author (long with -v)')), |
2407 ('d', 'date', None, _('list the date (short with -q)')), | 2409 ('d', 'date', None, _('list the date (short with -q)')), |
2408 ] + formatteropts + walkopts, | 2410 ] + formatteropts + walkopts, |
2409 _('[OPTION]... PATTERN [FILE]...'), | 2411 _('[OPTION]... PATTERN [FILE]...'), |
2410 inferrepo=True, | 2412 inferrepo=True, |