diff mercurial/commands.py @ 45742:b5e0746e272b

incoming: leverage cmdutil.check_incompatible_arguments() Differential Revision: https://phab.mercurial-scm.org/D9220
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 15 Oct 2020 22:23:45 -0700
parents 4f7309fdfb60
children 3b23cec4953f
line wrap: on
line diff
--- 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(