# HG changeset patch # User Martin von Zweigbergk # Date 1602825825 25200 # Node ID b5e0746e272bea275b281ee0e9762dbe05d0a703 # Parent 4f7309fdfb60e8bfdd5bc400ac6b954157c06862 incoming: leverage cmdutil.check_incompatible_arguments() Differential Revision: https://phab.mercurial-scm.org/D9220 diff -r 4f7309fdfb60 -r b5e0746e272b mercurial/commands.py --- a/mercurial/commands.py Thu Oct 15 22:23:35 2020 -0700 +++ b/mercurial/commands.py Thu Oct 15 22:23:45 2020 -0700 @@ -4227,8 +4227,7 @@ hg._incoming(display, lambda: 1, ui, repo, source, opts, buffered=True) return 0 - if opts.get(b'bundle') and opts.get(b'subrepos'): - raise error.Abort(_(b'cannot combine --bundle and --subrepos')) + cmdutil.check_incompatible_arguments(opts, b'subrepos', [b'bundle']) if opts.get(b'bookmarks'): source, branches = hg.parseurl( diff -r 4f7309fdfb60 -r b5e0746e272b tests/test-subrepo-recursion.t --- a/tests/test-subrepo-recursion.t Thu Oct 15 22:23:35 2020 -0700 +++ b/tests/test-subrepo-recursion.t Thu Oct 15 22:23:45 2020 -0700 @@ -681,7 +681,7 @@ no changes found $ hg incoming -S --bundle incoming.hg - abort: cannot combine --bundle and --subrepos + abort: cannot specify both --subrepos and --bundle [255] Test missing subrepo: