Show More
@@ -3276,7 +3276,7 b' statemod.addunfinished(' | |||
|
3276 | 3276 | b'diff', |
|
3277 | 3277 | None, |
|
3278 | 3278 | _( |
|
3279 |
b' |
|
|
3279 | b'search revision differences for when the pattern was added ' | |
|
3280 | 3280 | b'or removed' |
|
3281 | 3281 | ), |
|
3282 | 3282 | ), |
@@ -3302,7 +3302,7 b' statemod.addunfinished(' | |||
|
3302 | 3302 | b'r', |
|
3303 | 3303 | b'rev', |
|
3304 | 3304 | [], |
|
3305 |
_(b' |
|
|
3305 | _(b'search files changed within revision range'), | |
|
3306 | 3306 | _(b'REV'), |
|
3307 | 3307 | ), |
|
3308 | 3308 | ( |
@@ -3324,23 +3324,27 b' statemod.addunfinished(' | |||
|
3324 | 3324 | intents={INTENT_READONLY}, |
|
3325 | 3325 | ) |
|
3326 | 3326 | def grep(ui, repo, pattern, *pats, **opts): |
|
3327 |
"""search |
|
|
3328 | ||
|
3329 |
Search revision history for a regular |
|
|
3330 | files or the entire project. | |
|
3331 | ||
|
3332 |
By default, grep |
|
|
3333 | file in which it finds a match. To get it to print every revision | |
|
3334 | that contains a change in match status ("-" for a match that becomes | |
|
3335 | a non-match, or "+" for a non-match that becomes a match), use the | |
|
3336 | --diff flag. | |
|
3327 | """search for a pattern in specified files | |
|
3328 | ||
|
3329 | Search the working directory or revision history for a regular | |
|
3330 | expression in the specified files for the entire repository. | |
|
3331 | ||
|
3332 | By default, grep searches the repository files in the working | |
|
3333 | directory and prints the files where it finds a match. To specify | |
|
3334 | historical revisions instead of the working directory, use the | |
|
3335 | --rev flag. | |
|
3336 | ||
|
3337 | To search instead historical revision differences that contains a | |
|
3338 | change in match status ("-" for a match that becomes a non-match, | |
|
3339 | or "+" for a non-match that becomes a match), use the --diff flag. | |
|
3337 | 3340 | |
|
3338 | 3341 | PATTERN can be any Python (roughly Perl-compatible) regular |
|
3339 | 3342 | expression. |
|
3340 | 3343 | |
|
3341 |
If no FILEs are specified |
|
|
3342 | the repository are searched, including those that don't exist in the | |
|
3343 | current branch or have been deleted in a prior changeset. | |
|
3344 | If no FILEs are specified and the --rev flag isn't supplied, all | |
|
3345 | files in the working directory are searched. When using the --rev | |
|
3346 | flag and specifying FILEs, use the --follow argument to also | |
|
3347 | follow the specified FILEs across renames and copies. | |
|
3344 | 3348 | |
|
3345 | 3349 | .. container:: verbose |
|
3346 | 3350 | |
@@ -3363,6 +3367,7 b' def grep(ui, repo, pattern, *pats, **opt' | |||
|
3363 | 3367 | See :hg:`help templates.operators` for the list expansion syntax. |
|
3364 | 3368 | |
|
3365 | 3369 | Returns 0 if a match is found, 1 otherwise. |
|
3370 | ||
|
3366 | 3371 | """ |
|
3367 | 3372 | opts = pycompat.byteskwargs(opts) |
|
3368 | 3373 | diff = opts.get(b'all') or opts.get(b'diff') |
@@ -336,7 +336,7 b' Testing -h/--help:' | |||
|
336 | 336 | cat output the current or given revision of files |
|
337 | 337 | copy mark files as copied for the next commit |
|
338 | 338 | diff diff repository (or selected files) |
|
339 |
grep search |
|
|
339 | grep search for a pattern in specified files | |
|
340 | 340 | |
|
341 | 341 | Change navigation: |
|
342 | 342 | |
@@ -468,7 +468,7 b' Testing -h/--help:' | |||
|
468 | 468 | cat output the current or given revision of files |
|
469 | 469 | copy mark files as copied for the next commit |
|
470 | 470 | diff diff repository (or selected files) |
|
471 |
grep search |
|
|
471 | grep search for a pattern in specified files | |
|
472 | 472 | |
|
473 | 473 | Change navigation: |
|
474 | 474 |
@@ -40,7 +40,7 b' Test hiding some commands (which also ha' | |||
|
40 | 40 | cat output the current or given revision of files |
|
41 | 41 | copy mark files as copied for the next commit |
|
42 | 42 | diff diff repository (or selected files) |
|
43 |
grep search |
|
|
43 | grep search for a pattern in specified files | |
|
44 | 44 | |
|
45 | 45 | Change navigation: |
|
46 | 46 | |
@@ -176,7 +176,7 b' Test hiding some topics.' | |||
|
176 | 176 | cat output the current or given revision of files |
|
177 | 177 | copy mark files as copied for the next commit |
|
178 | 178 | diff diff repository (or selected files) |
|
179 |
grep search |
|
|
179 | grep search for a pattern in specified files | |
|
180 | 180 | |
|
181 | 181 | Change navigation: |
|
182 | 182 |
@@ -92,7 +92,7 b' the extension is unknown.' | |||
|
92 | 92 | cat output the current or given revision of files |
|
93 | 93 | copy mark files as copied for the next commit |
|
94 | 94 | diff diff repository (or selected files) |
|
95 |
grep search |
|
|
95 | grep search for a pattern in specified files | |
|
96 | 96 | |
|
97 | 97 | Change navigation: |
|
98 | 98 | |
@@ -220,7 +220,7 b' the extension is unknown.' | |||
|
220 | 220 | cat output the current or given revision of files |
|
221 | 221 | copy mark files as copied for the next commit |
|
222 | 222 | diff diff repository (or selected files) |
|
223 |
grep search |
|
|
223 | grep search for a pattern in specified files | |
|
224 | 224 | |
|
225 | 225 | Change navigation: |
|
226 | 226 | |
@@ -2590,7 +2590,7 b' Dish up an empty repo; serve it cold.' | |||
|
2590 | 2590 | grep |
|
2591 | 2591 | </a> |
|
2592 | 2592 | </td><td> |
|
2593 |
search |
|
|
2593 | search for a pattern in specified files | |
|
2594 | 2594 | </td></tr> |
|
2595 | 2595 | <tr><td> |
|
2596 | 2596 | <a href="/help/hashelp"> |
General Comments 0
You need to be logged in to leave comments.
Login now