comparison mercurial/commands.py @ 38650:eba69ddd4e52

grep: search working directory files by default if --all-files is specified The default was -rtip:0 before, but "--all-files -rtip:0" would be the most useless combination, and it isn't supported yet. Let's change the default to something useful. This isn't flagged as BC since --all-files isn't released. Differential Revision: https://phab.mercurial-scm.org/D3917
author Yuya Nishihara <yuya@tcha.org>
date Wed, 11 Jul 2018 21:35:31 +0900
parents 0d0f8bd692c4
children 5e4027db52f4
comparison
equal deleted inserted replaced
38649:0d0f8bd692c4 38650:eba69ddd4e52
2533 """ 2533 """
2534 opts = pycompat.byteskwargs(opts) 2534 opts = pycompat.byteskwargs(opts)
2535 diff = opts.get('all') or opts.get('diff') 2535 diff = opts.get('all') or opts.get('diff')
2536 if diff and opts.get('all_files'): 2536 if diff and opts.get('all_files'):
2537 raise error.Abort(_('--diff and --all-files are mutually exclusive')) 2537 raise error.Abort(_('--diff and --all-files are mutually exclusive'))
2538 if opts.get('all_files') and not opts.get('rev'):
2539 opts['rev'] = ['wdir()']
2538 2540
2539 reflags = re.M 2541 reflags = re.M
2540 if opts.get('ignore_case'): 2542 if opts.get('ignore_case'):
2541 reflags |= re.I 2543 reflags |= re.I
2542 try: 2544 try: