58
58
class cmd_grep(Command):
59
59
"""Print lines matching PATTERN for specified files and revisions.
61
This command searches the specified files and revisions for a given pattern.
62
The pattern is specified as a Python regular expressions[1].
63
If the file name is not specified, the revisions starting with the current
64
directory are searched recursively. If the revision number is not specified,
65
the latest revision is searched.
67
Note that this command is different from POSIX grep in that it searches the
68
revisions of the branch and not the working copy. Unversioned files and
69
uncommitted changes are not seen.
71
When searching a pattern, the output is shown in the 'filepath:string' format.
72
If a revision is explicitly searched, the output is shown as 'filepath~N:string',
73
where N is the revision number.
61
This command searches the specified files and revisions for a given
62
pattern. The pattern is specified as a Python regular expressions[1].
64
If the file name is not specified, the revisions starting with the
65
current directory are searched recursively. If the revision number is
66
not specified, the working copy is searched. To search the last committed
67
revision, use the '-r -1' or '-r last:1' option.
69
Unversioned files are not searched unless explicitly specified on the
72
When searching a pattern, the output is shown in the 'filepath:string'
73
format. If a revision is explicitly searched, the output is shown as
74
'filepath~N:string', where N is the revision number.
75
76
[1] http://docs.python.org/library/re.html#regular-expression-syntax