hgwebdir backward compatibility issue in 1.5.x
TK Soh
teekaysoh at gmail.com
Mon Apr 5 18:25:37 CDT 2010
On Mon, Apr 5, 2010 at 7:35 PM, Matt Mackall <mpm at selenic.com> wrote:
> On Mon, 2010-04-05 at 09:32 +0000, TK Soh wrote:
>> Recently I updated our app server to Mercurial 1.5, the very afternoon
>> many users complained that they were getting RepoError when browsing
>> their index pages published via hgwebdir.cgi script in their cgi-bin.
>> Just to put out the fire quickly, I reverted back to 1.4.3.
>
> You forgot to attach the backtrace.
I did some debugging and found that the invalid paths defined in the
hgweb.config file is triggering the error. Hg <1.5 would ignore these
invalid paths. Also, the hgwebdir.cgi from 1.5.x don't see the
backtrace, but would present an empty index page with no repo list.
Traceback (most recent call last):
File "/user/r28629/public_html/cgi-bin/hg", line 20, in <module>
h.run()
File "/usr/lib/python2.5/site-packages/mercurial/hgweb/hgwebdir_mod.py",
line 99, in run
wsgicgi.launch(self)
File "/usr/lib/python2.5/site-packages/mercurial/hgweb/wsgicgi.py",
line 73, in launch
for chunk in content:
File "/usr/lib/python2.5/site-packages/mercurial/util.py", line 231,
in increasingchunks
for chunk in source:
File "/usr/lib/python2.5/site-packages/mercurial/templater.py", line
60, in process
item = iters[0].next()
File "/usr/lib/python2.5/site-packages/mercurial/templater.py", line
79, in _format
for i in v:
File "/usr/lib/python2.5/site-packages/mercurial/hgweb/hgwebdir_mod.py",
line 236, in entries
r = hg.repository(self.ui, path)
File "/usr/lib/python2.5/site-packages/mercurial/hg.py", line 82, in
repository
repo = _lookup(path).instance(ui, path, create)
File "/usr/lib/python2.5/site-packages/mercurial/localrepo.py", line
2212, in instance
return localrepository(ui, util.drop_scheme('file', path), create)
File "/usr/lib/python2.5/site-packages/mercurial/localrepo.py", line
62, in __init__
raise error.RepoError(_("repository %s not found") % path)
RepoError: repository /this/directory/is/not/hg/repo not found
Debugging on my app server was a little tricky, since I have to
actually install/upgrade Mercurial for testing (while no one is
connecting to the server). Any tip on such debugging would be
appreaciated.
More information about the Mercurial
mailing list