grep¶
Purpose: | Print lines matching PATTERN for specified files and revisions. |
||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Usage: | brz grep PATTERN [PATH…] |
||||||||||||||||||||||||||||||||||||||||||||||||||||
Options: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
Description: | This command searches the specified files and revisions for a given pattern. The pattern is specified as a Python regular expressions[1]. If the file name is not specified, the revisions starting with the current directory are searched recursively. If the revision number is not specified, the working copy is searched. To search the last committed revision, use the ‘-r -1’ or ‘-r last:1’ option. Unversioned files are not searched unless explicitly specified on the command line. Unversioned directores are not searched. When searching a pattern, the output is shown in the ‘filepath:string’ format. If a revision is explicitly searched, the output is shown as ‘filepath~N:string’, where N is the revision number. –include and –exclude options can be used to search only (or exclude from search) files with base name matches the specified Unix style GLOB pattern. The GLOB pattern an use *, ?, and […] as wildcards, and to quote wildcard or backslash character literally. Note that the glob pattern is not a regular expression. [1] http://docs.python.org/library/re.html#regular-expression-syntax |