diff --git a/tests/test-releasenotes-formatting.t b/tests/test-releasenotes-formatting.t --- a/tests/test-releasenotes-formatting.t +++ b/tests/test-releasenotes-formatting.t @@ -434,3 +434,43 @@ $ hg releasenotes -l -c abort: cannot use both '--list' and '--check' [255] + +Raise error when no filename is specified with --rev + + $ hg init relnotes-nofile + $ cd relnotes-nofile + $ hg releasenote -r . + ** unknown exception encountered, please report by visiting + ** https://mercurial-scm.org/wiki/BugTracker + ** Python 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609] + ** Mercurial Distributed SCM (version 4.3.3+701-c4594d38b2da+20171001) + ** Extensions loaded: releasenotes + Traceback (most recent call last): + File "/tmp/hgtests.5N93rp/install/bin/hg", line 47, in + dispatch.run() + File "/tmp/hgtests.5N93rp/install/lib/python/mercurial/dispatch.py", line 81, in run + status = (dispatch(req) or 0) & 255 + File "/tmp/hgtests.5N93rp/install/lib/python/mercurial/dispatch.py", line 163, in dispatch + ret = _runcatch(req) + File "/tmp/hgtests.5N93rp/install/lib/python/mercurial/dispatch.py", line 303, in _runcatch + return _callcatch(ui, _runcatchfunc) + File "/tmp/hgtests.5N93rp/install/lib/python/mercurial/dispatch.py", line 311, in _callcatch + return scmutil.callcatch(ui, func) + File "/tmp/hgtests.5N93rp/install/lib/python/mercurial/scmutil.py", line 151, in callcatch + return func() + File "/tmp/hgtests.5N93rp/install/lib/python/mercurial/dispatch.py", line 293, in _runcatchfunc + return _dispatch(req) + File "/tmp/hgtests.5N93rp/install/lib/python/mercurial/dispatch.py", line 929, in _dispatch + cmdpats, cmdoptions) + File "/tmp/hgtests.5N93rp/install/lib/python/mercurial/dispatch.py", line 691, in runcommand + ret = _runcommand(ui, options, cmd, d) + File "/tmp/hgtests.5N93rp/install/lib/python/mercurial/dispatch.py", line 937, in _runcommand + return cmdfunc() + File "/tmp/hgtests.5N93rp/install/lib/python/mercurial/dispatch.py", line 926, in + d = lambda: util.checksignature(func)(ui, *args, **strcmdopt) + File "/tmp/hgtests.5N93rp/install/lib/python/mercurial/util.py", line 1180, in check + return func(*args, **kwargs) + File "/tmp/hgtests.5N93rp/install/lib/python/hgext/releasenotes.py", line 580, in releasenotes + with open(file_, 'rb') as fh: + TypeError: coercing to Unicode: need string or buffer, NoneType found + [1]