hgext/releasenotes.py
changeset 34340 741a511492d3
parent 33940 2a37459aedf2
child 34341 01e8ab4b6573
--- a/hgext/releasenotes.py	Tue Sep 26 03:56:20 2017 -0700
+++ b/hgext/releasenotes.py	Thu Sep 28 13:22:58 2017 +0530
@@ -552,7 +552,15 @@
     release note after it has been added to the release notes file.
     """
     sections = releasenotessections(ui, repo)
-    if opts.get('list'):
+
+    listflag = opts.get('list')
+
+    if listflag and opts.get('rev'):
+        raise error.Abort(_('cannot use both \'--list\' and \'--rev\''))
+    if listflag and opts.get('check'):
+        raise error.Abort(_('cannot use both \'--list\' and \'--check\''))
+
+    if listflag:
         return _getadmonitionlist(ui, sections)
 
     rev = opts.get('rev')