# HG changeset patch # User Yuya Nishihara # Date 1451189331 -32400 # Node ID 0ef50a5e3ae118ad96e0b70f762408584edf4c3b # Parent 48a6b1a22ccf42e1b7a47f2211d2afb3a1db886c hgweb: translate Abort in help command to 404 error c3784e3c3e8d changed the exception type to be raised if unknowncmd=False. diff -r 48a6b1a22ccf -r 0ef50a5e3ae1 mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py Mon Jan 08 11:11:06 2018 +0900 +++ b/mercurial/hgweb/webcommands.py Sun Dec 27 13:08:51 2015 +0900 @@ -1403,7 +1403,7 @@ try: doc = helpmod.help_(u, commands, topic, subtopic=subtopic) - except error.UnknownCommand: + except error.Abort: raise ErrorResponse(HTTP_NOT_FOUND) return tmpl('help', topic=topicname, doc=doc) diff -r 48a6b1a22ccf -r 0ef50a5e3ae1 tests/test-help.t --- a/tests/test-help.t Mon Jan 08 11:11:06 2018 +0900 +++ b/tests/test-help.t Sun Dec 27 13:08:51 2015 +0900 @@ -3391,6 +3391,70 @@ + $ get-with-headers.py 127.0.0.1:$HGPORT "help/unknowntopic" + 404 Not Found + + + + + + + + + + test: error + + + +
+ + +
+ + +

error

+ + + + +
+

+ An error occurred while processing your request: +

+

+ Not Found +

+
+
+
+ + + + + + + [1] + $ killdaemons.py #endif