Show More
@@ -2515,12 +2515,11 b' def grep(ui, repo, pattern, *pats, **opt' | |||||
2515 | Search revision history for a regular expression in the specified |
|
2515 | Search revision history for a regular expression in the specified | |
2516 | files or the entire project. |
|
2516 | files or the entire project. | |
2517 |
|
2517 | |||
2518 |
By default, grep |
|
2518 | By default, grep prints the most recent revision number for each | |
2519 | To search history and show the most recent revision number for each |
|
2519 | file in which it finds a match. To get it to print every revision | |
2520 | file in which it finds a match, use :hg:`grep -r tip:0`. |
|
2520 | that contains a change in match status ("-" for a match that becomes | |
2521 | To get it to print every revision that contains a change in match status |
|
2521 | a non-match, or "+" for a non-match that becomes a match), use the | |
2522 | ("-" for a match that becomes a non-match, or "+" for a non-match that |
|
2522 | --diff flag. | |
2523 | becomes a match), use the --diff flag. |
|
|||
2524 |
|
2523 | |||
2525 | PATTERN can be any Python (roughly Perl-compatible) regular |
|
2524 | PATTERN can be any Python (roughly Perl-compatible) regular | |
2526 | expression. |
|
2525 | expression. |
@@ -188,7 +188,7 b" coreconfigitem('color', 'pagermode'," | |||||
188 | default=dynamicdefault, |
|
188 | default=dynamicdefault, | |
189 | ) |
|
189 | ) | |
190 | coreconfigitem('commands', 'grep.all-files', |
|
190 | coreconfigitem('commands', 'grep.all-files', | |
191 |
default= |
|
191 | default=False, | |
192 | ) |
|
192 | ) | |
193 | coreconfigitem('commands', 'show.aliasprefix', |
|
193 | coreconfigitem('commands', 'show.aliasprefix', | |
194 | default=list, |
|
194 | default=list, |
@@ -59,6 +59,8 b' statuscopies = yes' | |||||
59 | interface = curses |
|
59 | interface = curses | |
60 |
|
60 | |||
61 | [commands] |
|
61 | [commands] | |
|
62 | # Grep working directory by default. | |||
|
63 | grep.all-files = True | |||
62 | # Make `hg status` emit cwd-relative paths by default. |
|
64 | # Make `hg status` emit cwd-relative paths by default. | |
63 | status.relative = yes |
|
65 | status.relative = yes | |
64 | # Refuse to perform an `hg update` that would cause a file content merge |
|
66 | # Refuse to perform an `hg update` that would cause a file content merge |
@@ -456,10 +456,15 b' files modified in the working directory' | |||||
456 |
|
456 | |||
457 | $ cd .. |
|
457 | $ cd .. | |
458 |
|
458 | |||
459 |
Change Default of grep, that is, the files not in current |
|
459 | Change Default of grep by ui.tweakdefaults, that is, the files not in current | |
460 | should not be grepp-ed on |
|
460 | working directory should not be grepp-ed on | |
|
461 | ||||
461 | $ hg init ab |
|
462 | $ hg init ab | |
462 | $ cd ab |
|
463 | $ cd ab | |
|
464 | $ cat <<'EOF' >> .hg/hgrc | |||
|
465 | > [ui] | |||
|
466 | > tweakdefaults = True | |||
|
467 | > EOF | |||
463 | $ echo "some text">>file1 |
|
468 | $ echo "some text">>file1 | |
464 | $ hg add file1 |
|
469 | $ hg add file1 | |
465 | $ hg commit -m "adds file1" |
|
470 | $ hg commit -m "adds file1" |
General Comments 0
You need to be logged in to leave comments.
Login now