--- a/hgext/releasenotes.py Thu Dec 12 15:51:09 2019 -0800
+++ b/hgext/releasenotes.py Thu Dec 12 22:30:59 2019 -0800
@@ -20,6 +20,7 @@
from mercurial.i18n import _
from mercurial.pycompat import open
from mercurial import (
+ cmdutil,
config,
error,
minirst,
@@ -653,14 +654,9 @@
opts = pycompat.byteskwargs(opts)
sections = releasenotessections(ui, repo)
- listflag = opts.get(b'list')
+ cmdutil.check_incompatible_arguments(opts, b'list', b'rev', b'check')
- if listflag and opts.get(b'rev'):
- raise error.Abort(_(b'cannot use both \'--list\' and \'--rev\''))
- if listflag and opts.get(b'check'):
- raise error.Abort(_(b'cannot use both \'--list\' and \'--check\''))
-
- if listflag:
+ if opts.get(b'list'):
return _getadmonitionlist(ui, sections)
rev = opts.get(b'rev')