HgCGIExceptionHandler returns unhelpful error
While playing with the scm-message-regex-plugin, I misjudged the regex (because the Jira plugin was rewriting the commit message on the fly, apparently). However, rather than getting a useful error message about the reason the push was denied, I received this:
$ hg push pushing to http://firstname.lastname@example.org:8080/scm/hg/SecureTest http authorization required realm: SONIA :: SCM Manager user: jpeacock password: searching for changes abort: remote error: Mercurial/Python process ends with return code 1
Looking at the error message, you can see that the correct error was thrown:
... urllib2.HTTPError: HTTP Error 500: Invalid message, <a target="_blank" href="https://jira.int.messagesystems.com/browse/JRA-123">JRA-123</a> <a target="_blank" href="https://jira.int.messagesystems.com/browse/JRA-124">JRA-124</a> #time 2d 5h #comment Task completed ahead of schedule does not match regex (?:([A-Za-z]+-\d+) )+(?:#(time|comment) ([\d\w\s]+[\d\w]))*.* 14:10:40.226 [qtp2013125681-23] WARN sonia.scm.web.HgCGIExceptionHandler - Mercurial/Python process ends with return code 1
Am I judging that this is a limitation of the ExceptionHandler, rather than the plugin itself? Is reporting the exit code to the remote client in any way helpful? I can't see any utility in ignoring the actual error and just reporting a failure.