Issue #333 resolved

HgCGIExceptionHandler returns unhelpful error

John Peacock
created an issue

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://jpeacock@10.79.1.213: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.

Comments (5)

  1. Sebastian Sdorra repo owner

    Fixed with 2318d83.

    Mercurial ends now with a output like the following:

    pushing to http://localhost:8081/scm/hg/test
    http authorization required
    realm: SONIA :: SCM Manager
    user: scmadmin
    password:
    searching for changes
    remote: adding changesets
    remote: adding manifests
    remote: adding file changes
    remote: added 1 changesets with 1 changes to 1 files
    remote: ERROR: Not supported yet.
    remote: transaction abort!
    remote: rollback completed
    

    The message "ERROR: Not supported yet." comes from a PreReceiveRepositoryHook which aborts the push.

  2. Log in to comment