hg grep [--diff] [OPTION]... PATTERN [FILE]...
search for a pattern in specified files
Search the working directory or revision history for a regular expression in the specified files for the entire repository.
By default, grep searches the repository files in the working directory and prints the files where it finds a match. To specify historical revisions instead of the working directory, use the --rev flag.
To search instead historical revision differences that contains a change in match status ("-" for a match that becomes a non-match, or "+" for a non-match that becomes a match), use the --diff flag.
PATTERN can be any Python (roughly Perl-compatible) regular expression.
If no FILEs are specified and the --rev flag isn't supplied, all files in the working directory are searched. When using the --rev flag and specifying FILEs, use the --follow argument to also follow the specified FILEs across renames and copies.
Template:
The following keywords are supported in addition to the common template keywords and functions. See also 'hg help templates'.
And each entry of "{texts}" provides the following sub-keywords.
See 'hg help templates.operators' for the list expansion syntax.
Returns 0 if a match is found, 1 otherwise.
options ([+] can be repeated):
| -0 | --print0 | заканчивать поля символом NUL |
| --all | an alias to --diff (DEPRECATED) | |
| --diff | search revision differences for when the pattern was added or removed | |
| -a | --text | обрабатывать все файлы как текстовые |
| -f | --follow | следовать истории набора изменений или истории файла при копированиях/переименованиях |
| -i | --ignore-case | игнорировать регистр букв |
| -l | --files-with-matches | печатать только имена совпадающих файлов и ревизий |
| -n | --line-number | печатать номера строк |
| -r | --rev РЕВИЗИЯ [+] | search files changed within revision range |
| --all-files | include all files in the changeset while grepping (DEPRECATED) | |
| -u | --user | показывать имя автора (длинный формат с -v) |
| -d | --date | показывать дату (короткий формат с -q) |
| -T | --template ШАБЛОН | отображать с помощью шаблона |
| -I | --include ШАБЛОН [+] | добавить файлы, имена которых соответствуют данным шаблонам |
| -X | --exclude ШАБЛОН [+] | не добавлять файлы, имена которых соответствуют данным шаблонам |
global options ([+] can be repeated):
| -R | --repository ХРАНИЛИЩЕ | корневой каталог хранилища или имя файла комплекта |
| --cwd КАТАЛОГ | сменить рабочий каталог | |
| -y | --noninteractive | не спрашивать, на все вопросы автоматически выбирать первый вариант |
| -q | --quiet | подавлять вывод |
| -v | --verbose | включить дополнительный вывод |
| --color ТИП | when to colorize (boolean, always, auto, never, or debug) | |
| --config КОНФИГ [+] | задать/переопределить параметр конфигурации (в виде 'секция.параметр=значение') | |
| --config-file HGRC [+] | load config file to set/override config options | |
| --debug | включить отладочный вывод | |
| --debugger | запустить отладчик | |
| --encoding КОДИРОВКА | установить кодировку (по умолчанию: UTF-8) | |
| --encodingmode РЕЖИМ | установить режим кодировки (по умолчанию: strict) | |
| --traceback | всегда печатать трассировку стека при исключении | |
| --time | время выполнения команды | |
| --profile | профилирование выполнения команды | |
| --version | напечатать информацию о версии и выйти | |
| -h | --help | показать справку и выйти |
| --hidden | учитывать скрытые наборы изменений | |
| --pager ТИП | когда использовать прокрутку (логический. always (всегда), auto(автоматически) или never (никогда) (по умолчанию: auto) |