##// END OF EJS Templates
releasenotes: raise error on simultaneous usage of flags...
Rishabh Madan -
r34341:741a5114 default
parent child Browse files
Show More
@@ -552,7 +552,15 b' def releasenotes(ui, repo, file_=None, *'
552 552 release note after it has been added to the release notes file.
553 553 """
554 554 sections = releasenotessections(ui, repo)
555 if opts.get('list'):
555
556 listflag = opts.get('list')
557
558 if listflag and opts.get('rev'):
559 raise error.Abort(_('cannot use both \'--list\' and \'--rev\''))
560 if listflag and opts.get('check'):
561 raise error.Abort(_('cannot use both \'--list\' and \'--check\''))
562
563 if listflag:
556 564 return _getadmonitionlist(ui, sections)
557 565
558 566 rev = opts.get('rev')
@@ -420,3 +420,17 b' Usage of --list flag'
420 420 fix: Bug Fixes
421 421 perf: Performance Improvements
422 422 api: API Changes
423
424 $ cd ..
425
426 Raise error on simultaneous usage of flags
427
428 $ hg init relnotes-raise-error
429 $ cd relnotes-raise-error
430 $ hg releasenotes -r . -l
431 abort: cannot use both '--list' and '--rev'
432 [255]
433
434 $ hg releasenotes -l -c
435 abort: cannot use both '--list' and '--check'
436 [255]
General Comments 0
You need to be logged in to leave comments. Login now