I'm running RhodeCode 1.5.4, and somehow my repository got in a funny state so couldn't be pushed to. In the RhodeCode logs, this appeared as an exception which looks like it simply couldn't parse an unexpected output from hg...
ERROR [waitress] Exception when serving /totem-common Traceback (most recent call last): File "/var/www/rhodecode-parent/rhodecode-venv/lib/python2.6/site-packages/waitress-0.8.1-py2.6.egg/waitress/channel.py", line 329, in service task.service() File "/var/www/rhodecode-parent/rhodecode-venv/lib/python2.6/site-packages/waitress-0.8.1-py2.6.egg/waitress/task.py", line 173, in service self.execute() File "/var/www/rhodecode-parent/rhodecode-venv/lib/python2.6/site-packages/waitress-0.8.1-py2.6.egg/waitress/task.py", line 380, in execute app_iter = self.channel.server.application(env, start_response) File "/var/www/rhodecode-parent/rhodecode-venv/lib/python2.6/site-packages/Paste-220.127.116.11-py2.6.egg/paste/gzipper.py", line 35, in __call__ return self.application(environ, start_response) File "/var/www/rhodecode-parent/rhodecode-venv/lib/python2.6/site-packages/Paste-18.104.22.168-py2.6.egg/paste/cascade.py", line 130, in __call__ return self.apps[-1](environ, start_response) File "/var/www/rhodecode-parent/rhodecode-venv/lib/python2.6/site-packages/Paste-22.214.171.124-py2.6.egg/paste/registry.py", line 379, in __call__ app_iter = self.application(environ, start_response) File "/var/www/rhodecode-parent/rhodecode-venv/lib/python2.6/site-packages/RhodeCode-1.5.4-py2.6.egg/rhodecode/lib/middleware/https_fixup.py", line 37, in _ _call__ return self.application(environ, start_response) File "/var/www/rhodecode-parent/rhodecode-venv/lib/python2.6/site-packages/Pylons-1.0-py2.6.egg/pylons/middleware.py", line 150, in __call__ self.app, environ, catch_exc_info=True) File "/var/www/rhodecode-parent/rhodecode-venv/lib/python2.6/site-packages/Pylons-1.0-py2.6.egg/pylons/util.py", line 51, in call_wsgi_application output.extend(app_iter) TypeError: 'NoneType' object is not iterable
It turned out (when pushing directly to the repository not via RhodeCode), that hg was in fact returning "abort: abandoned transaction found - run hg recover!" but RhodeCode wasn't able to deal with this and just returned a 500 page, and the exception in the logs.
It might be good if it could at least log what came back in this instance, even if it does still have the 500 error? That way it'd be a bit easier to diagnose problems like this.