views:

64

answers:

1

I'm trying to serve a merurial repository with apache, and when I try to push to the repo I see this in the apache error.log. On the client side I get a 500 error.

How do I get this to go away????

[Sun Jun 06 14:43:25 2010] [error] [client 192.168.1.8] /var/lib/python-support/python2.6/mercurial/hgweb/common.py:24: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
[Sun Jun 06 14:43:25 2010] [error] [client 192.168.1.8]   self.message = message
[Sun Jun 06 14:43:25 2010] [error] [client 192.168.1.8] /var/lib/python-support/python2.6/mercurial/hgweb/hgweb_mod.py:104: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
[Sun Jun 06 14:43:25 2010] [error] [client 192.168.1.8]   if not inst.message:
[Sun Jun 06 14:43:25 2010] [error] [client 192.168.1.8] /var/lib/python-support/python2.6/mercurial/hgweb/hgweb_mod.py:106: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
[Sun Jun 06 14:43:25 2010] [error] [client 192.168.1.8]   return '0\\n%s\\n' % inst.message,
A: 

The deprecation warning is a red herring. It's just letting you know that the server code accessed a python exception in a way that will eventually be unsupported. What you really want to find out is what exception was raised in the first place. (Was there an error message along with that 500 error?)

Forest
nope, this is all i see in my console:pushing to http://hg.corp.localproject.com/hgwebdir.cgi/localprojectsearching for changesabort: HTTP Error 500: Internal Server Error
Josh Nankin
And there's nothing else in the server log after the deprecation warnings? It looks like it's trying to return an error code and message, which I would have expected to show up in the server output (and therefore the client output). In that case I suggest discovering the exception message by either sniffing the server response with wireshark or temporarily editing hgweb_mod.py line 106 and inserting `raise inst #` before the return statement (and watching the server log when you try it again).
Forest
If all else fails, someone on the Mercurial mailing list may have seen this problem before. http://selenic.com/mailman/listinfo/mercurial
Forest
so, it seems it was a permissions issue. I found this out by cloning the repo on the same machine where apache was and trying to push there.looks like the deprecation warnings were in fact preventing the error from being displayed. i hope they fix that soon.thanks forest!
Josh Nankin
You're welcome. You might want to submit a bug report to let the mercurial developers know that this particular permissions problem was difficult to diagnose due to the minimal error reporting.
Forest
I posted this question on the mercurial mailing list, and someone told me to use the latest version of mercurial. turns out on ubuntu 9.04, the package repo has hg 1.1.2, which is way out of date. I'm going to update my ubuntu and hg to prevent problems in the future.
Josh Nankin
You can add:[ui]debug=trueto your hgweb.config, this will ouput erros to the Apache log.
Ton