diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -4226,8 +4226,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 --git a/tests/test-subrepo-recursion.t b/tests/test-subrepo-recursion.t --- a/tests/test-subrepo-recursion.t +++ b/tests/test-subrepo-recursion.t @@ -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: