Mercurial > hg
changeset 45741:4f7309fdfb60
grep: levarage cmdutil.check_incompatible_arguments()
Differential Revision: https://phab.mercurial-scm.org/D9219
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 15 Oct 2020 22:23:35 -0700 |
parents | d1cabce5ef05 |
children | b5e0746e272b |
files | mercurial/commands.py |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Thu Oct 15 21:48:43 2020 -0700 +++ b/mercurial/commands.py Thu Oct 15 22:23:35 2020 -0700 @@ -3365,11 +3365,10 @@ Returns 0 if a match is found, 1 otherwise. """ + cmdutil.check_incompatible_arguments(opts, 'all_files', ['all', 'diff']) opts = pycompat.byteskwargs(opts) diff = opts.get(b'all') or opts.get(b'diff') follow = opts.get(b'follow') - if diff and opts.get(b'all_files'): - raise error.Abort(_(b'--diff and --all-files are mutually exclusive')) if opts.get(b'all_files') is None and not diff: opts[b'all_files'] = True plaingrep = (