Show More
@@ -2533,6 +2533,9 b' def grep(ui, repo, pattern, *pats, **opt' | |||
|
2533 | 2533 | """ |
|
2534 | 2534 | opts = pycompat.byteskwargs(opts) |
|
2535 | 2535 | diff = opts.get('all') or opts.get('diff') |
|
2536 | if diff and opts.get('all_files'): | |
|
2537 | raise error.Abort(_('--diff and --all-files are mutually exclusive')) | |
|
2538 | ||
|
2536 | 2539 | reflags = re.M |
|
2537 | 2540 | if opts.get('ignore_case'): |
|
2538 | 2541 | reflags |= re.I |
@@ -412,6 +412,12 b' Test for showing working of allfiles fla' | |||
|
412 | 412 | $ hg grep -r "." "unmod" --all-files |
|
413 | 413 | um:1:unmod |
|
414 | 414 | |
|
415 | --diff --all-files makes no sense since --diff is the option to grep history | |
|
416 | ||
|
417 | $ hg grep --diff --all-files um | |
|
418 | abort: --diff and --all-files are mutually exclusive | |
|
419 | [255] | |
|
420 | ||
|
415 | 421 | $ cd .. |
|
416 | 422 | |
|
417 | 423 | Fix_Wdir(): test that passing wdir() t -r flag does greps on the |
General Comments 0
You need to be logged in to leave comments.
Login now