Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 39372:3fec8aa9b454
resolve: make condition clearer, and able to handle a new flag
Differential Revision: https://phab.mercurial-scm.org/D4377
author | Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> |
---|---|
date | Sun, 26 Aug 2018 15:23:03 -0400 |
parents | 337443f09fc8 |
children | 34ba47117164 |
comparison
equal
deleted
inserted
replaced
39371:eecd68ca041d | 39372:3fec8aa9b454 |
---|---|
4556 confirm = ui.configbool('commands', 'resolve.confirm') | 4556 confirm = ui.configbool('commands', 'resolve.confirm') |
4557 flaglist = 'all mark unmark list no_status'.split() | 4557 flaglist = 'all mark unmark list no_status'.split() |
4558 all, mark, unmark, show, nostatus = \ | 4558 all, mark, unmark, show, nostatus = \ |
4559 [opts.get(o) for o in flaglist] | 4559 [opts.get(o) for o in flaglist] |
4560 | 4560 |
4561 if (show and (mark or unmark)) or (mark and unmark): | 4561 if len(list(filter(None, [show, mark, unmark]))) > 1: |
4562 raise error.Abort(_("too many options specified")) | 4562 raise error.Abort(_("too many options specified")) |
4563 if pats and all: | 4563 if pats and all: |
4564 raise error.Abort(_("can't specify --all and patterns")) | 4564 raise error.Abort(_("can't specify --all and patterns")) |
4565 if not (all or pats or show or mark or unmark): | 4565 if not (all or pats or show or mark or unmark): |
4566 raise error.Abort(_('no files or directories specified'), | 4566 raise error.Abort(_('no files or directories specified'), |