From: Zac Medico Date: Thu, 25 Jul 2013 18:00:20 +0000 (-0700) Subject: repoman: auto disable bad commit opts, bug 478156 X-Git-Tag: v2.2.0_alpha189~10 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c9a73d5f8d52803a703e8827c42ab3274ad3ec84;p=portage.git repoman: auto disable bad commit opts, bug 478156 --- diff --git a/bin/repoman b/bin/repoman index f21dacc1b..bbade9511 100755 --- a/bin/repoman +++ b/bin/repoman @@ -287,12 +287,6 @@ def ParseArgs(argv, qahelp): if opts.mode == 'ci': opts.mode = 'commit' # backwards compat shortcut - if opts.mode == 'commit' and not (opts.force or opts.pretend): - if opts.ignore_masked: - parser.error('Commit mode and --ignore-masked are not compatible') - if opts.without_mask: - parser.error('Commit mode and --without-mask are not compatible') - # Use the verbosity and quiet options to fiddle with the loglevel appropriately for val in range(opts.verbosity): logger = logging.getLogger() @@ -302,6 +296,14 @@ def ParseArgs(argv, qahelp): logger = logging.getLogger() logger.setLevel(logger.getEffectiveLevel() + 10) + if opts.mode == 'commit' and not (opts.force or opts.pretend): + if opts.ignore_masked: + opts.ignore_masked = False + logging.warn('Commit mode automatically disables --ignore-masked') + if opts.without_mask: + opts.without_mask = False + logging.warn('Commit mode automatically disables --without-mask') + return (opts, args) qahelp = {