hg grep:
hg grep [OPTION]... PATTERN [FILE]...
search for a pattern in specified files and revisions
Search revisions of files for a regular expression.
This command behaves differently than Unix grep. It only accepts
Python/Perl regexps. It searches repository history, not the working
directory. It always prints the revision number in which a match appears.
By default, grep only prints output for the first revision of a file in
which it finds a match. To get it to print every revision 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
Returns 0 if a match is found, 1 otherwise.
options:
-0
-f
copies and renames
-i
-l
-n
-r
-u
-d
-I
-X
[+] marked option can be specified multiple times
use "hg -v help grep" to show global options
:
hg grep "a string"
, .
- , hg log -v, , hg log -p, .