AttributeError with setting up hgweb
Matthew Smit
programmdude at gmail.com
Fri Feb 22 01:35:58 UTC 2013
I have a server that is running Apache and I am attempting to get it to
serve mercurial. However I have an issue with getting it working.
My .cgi script is:
#!/usr/bin/env python
import sys; sys.path.insert(0, "~/python/lib64/python2.6/site-packages")
# Uncomment to send python tracebacks to the browser if an error occurs:
import cgitb; cgitb.enable()
from mercurial import demandimport; demandimport.enable()
from mercurial.hgweb import hgweb, wsgicgi
application = hgweb([('/', '~/repo-storage/*')])
wsgicgi.launch(application)
The stack trace it outputs is:
~/repo/index.cgi in () 7
8 from mercurial import demandimport; demandimport.enable()
9 from mercurial.hgweb import hgweb, wsgicgi
10 application = hgweb([('/', '~/repo-storage/*')])
11 wsgicgi.launch(application)
application *undefined*, *hgweb* = <function hgweb>
/usr/lib64/python2.6/site-packages/mercurial/hgweb/__init__.py
in *hgweb*(*args=([('/', '~/repo-storage/*')],), **kwargs={}) 10
11 def hgweb(*args, **kwargs):
12 return hgweb_mod.hgweb(*args, **kwargs)
13
14 def hgwebdir(*args, **kwargs):
*global* *hgweb_mod* = <module 'mercurial.hgweb.hgweb_mod' from
'/usr/l...2.6/site-packages/mercurial/hgweb/hgweb_mod.pyc'>, hgweb_mod.*
hgweb* = <class 'mercurial.hgweb.hgweb_mod.hgweb'>, *args* = ([('/',
'~/repo-storage/*')],), *kwargs* = {}
/usr/lib64/python2.6/site-packages/mercurial/hgweb/hgweb_mod.py
in *__init__*(self=<mercurial.hgweb.hgweb_mod.hgweb object>, repo=[('/',
'~/repo-storage/*')], name=None) 39
# a repo owner may set web.templates in .hg/hgrc to get any file
40 # readable by the user running the CGI script
41 self.templatepath = self.config('web', 'templates')
42
43
# The CGI scripts are often run by a user different from the repo owner.
*self* = <mercurial.hgweb.hgweb_mod.hgweb object>, self.templatepath *
undefined*, self.*config* = <bound method hgweb.config of
<mercurial.hgweb.hgweb_mod.hgweb object>>
/usr/lib64/python2.6/site-packages/mercurial/hgweb/hgweb_mod.py
in *config*(self=<mercurial.hgweb.hgweb_mod.hgweb object>, section='web',
name='templates', default=None, untrusted=True) 44
# Trust the settings from the .hg/hgrc files by default.
45 def config(self, section, name, default=None, untrusted=True):
46 return self.repo.ui.config(section, name, default,
47 untrusted=untrusted)
48
*self* = <mercurial.hgweb.hgweb_mod.hgweb object>, self.*repo* = [('/',
'~/repo-storage/*')], self.repo.ui *undefined*, *section* = 'web', *name* =
'templates', *default* = None, *untrusted* = True*<type
'exceptions.AttributeError'>*: 'list' object has no attribute 'ui'
args = ("'list' object has no attribute 'ui'",)
message = "'list' object has no attribute 'ui'"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20130222/a317a643/attachment-0002.html>
More information about the Mercurial
mailing list