comparison hgext/transplant.py @ 44194:d4c1501225c4

cmdutil: change check_incompatible_arguments() *arg to single iterable This makes it clearer on the call-sites that the first argument is special. Thanks to Yuya for the suggestion. Differential Revision: https://phab.mercurial-scm.org/D8018
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 27 Jan 2020 09:14:19 -0800
parents d50b4ad1d4a5
children 9d2b2df2c2ba
comparison
equal deleted inserted replaced
44193:3c265cef6edc 44194:d4c1501225c4
759 yield node 759 yield node
760 760
761 def checkopts(opts, revs): 761 def checkopts(opts, revs):
762 if opts.get(b'continue'): 762 if opts.get(b'continue'):
763 cmdutil.check_incompatible_arguments( 763 cmdutil.check_incompatible_arguments(
764 opts, b'continue', b'branch', b'all', b'merge' 764 opts, b'continue', [b'branch', b'all', b'merge']
765 ) 765 )
766 return 766 return
767 if opts.get(b'stop'): 767 if opts.get(b'stop'):
768 cmdutil.check_incompatible_arguments( 768 cmdutil.check_incompatible_arguments(
769 opts, b'stop', b'branch', b'all', b'merge' 769 opts, b'stop', [b'branch', b'all', b'merge']
770 ) 770 )
771 return 771 return
772 if not ( 772 if not (
773 opts.get(b'source') 773 opts.get(b'source')
774 or revs 774 or revs