'hg serv' case insensitive?
Satish Balay
balay at mcs.anl.gov
Mon Jun 5 11:29:24 CDT 2006
On Mon, 5 Jun 2006, Thomas Arendsen Hein wrote:
> * Satish Balay <balay at fastmail.fm> [20060602 18:01]:
> > I've attempted to export a hg repository using 'hg serv --webdir-conf'
> > option.
> >
> > The repository is named FooBar - but 'hg serv' is exporting it as
> > 'foobar' [ignoring the caps]. I was expecting 'FooBar' to work.
>
> > echo "[paths]" > webdir.conf
> > echo "FooBar=FooBar" >> webdir.conf
>
> The config algorithm lowercases the config keys (the first FooBar),
> so this will be read as 'foobar=FooBar'.
>
> If you need uppercase or mixed case paths, you can use the
> hgwebdir.cgi script and pass the repositories as a list or
> dictionary, e.g.:
>
> repos = [
> 'FooBar',
> 'Baz',
> ('virtual', 'real/path'),
> ('SomeThing', 'located/here'),
> ]
>
> hgweb.hgwebdir([isinstance(repo, tuple) and repo or (repo, repo)
> for repo in repos]).run()
I've got errors with this [when I attempt to access http://localhost:8000/]
Satish
------
asterix:/home/balay/tmp>cat webdir.conf
[path]
repos = [ 'FooBar' ]
hgweb.hgwebdir([isinstance(repo, tuple) and repo or (repo, repo) for repo in repos]).run()
asterix:/home/balay/tmp>hg serv --webdir-conf webdir.conf
localhost.localdomain - - [05/Jun/2006 11:26:33] "GET / HTTP/1.1" 200 -
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 41383)
Traceback (most recent call last):
File "/usr/lib/python2.3/SocketServer.py", line 463, in process_request_thread
self.finish_request(request, client_address)
File "/usr/lib/python2.3/SocketServer.py", line 254, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.3/SocketServer.py", line 521, in __init__
self.handle()
File "/usr/lib/python2.3/BaseHTTPServer.py", line 324, in handle
self.handle_one_request()
File "/usr/lib/python2.3/BaseHTTPServer.py", line 318, in handle_one_request
method()
File "/usr/lib/python2.3/site-packages/mercurial/hgweb.py", line 955, in do_GET
self.do_POST()
File "/usr/lib/python2.3/site-packages/mercurial/hgweb.py", line 949, in do_POST
self.do_hgweb()
File "/usr/lib/python2.3/site-packages/mercurial/hgweb.py", line 993, in do_hgweb
hgwebobj = hgwebdir(webdir_conf)
File "/usr/lib/python2.3/site-packages/mercurial/hgweb.py", line 1022, in __init__
cp.read(config)
File "/usr/lib/python2.3/ConfigParser.py", line 263, in read
self._read(fp, filename)
File "/usr/lib/python2.3/ConfigParser.py", line 484, in _read
raise e
ParsingError: File contains parsing errors: webdir.conf
[line 4]: 'hgweb.hgwebdir([isinstance(repo, tuple) and repo or (repo, repo) for repo in repos]).run()\n'
----------------------------------------
localhost.localdomain - - [05/Jun/2006 11:26:33] "GET /favicon.ico HTTP/1.1" 200 -
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 41384)
Traceback (most recent call last):
File "/usr/lib/python2.3/SocketServer.py", line 463, in process_request_thread
self.finish_request(request, client_address)
File "/usr/lib/python2.3/SocketServer.py", line 254, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.3/SocketServer.py", line 521, in __init__
self.handle()
File "/usr/lib/python2.3/BaseHTTPServer.py", line 324, in handle
self.handle_one_request()
File "/usr/lib/python2.3/BaseHTTPServer.py", line 318, in handle_one_request
method()
File "/usr/lib/python2.3/site-packages/mercurial/hgweb.py", line 955, in do_GET
self.do_POST()
File "/usr/lib/python2.3/site-packages/mercurial/hgweb.py", line 949, in do_POST
self.do_hgweb()
File "/usr/lib/python2.3/site-packages/mercurial/hgweb.py", line 993, in do_hgweb
hgwebobj = hgwebdir(webdir_conf)
File "/usr/lib/python2.3/site-packages/mercurial/hgweb.py", line 1022, in __init__
cp.read(config)
File "/usr/lib/python2.3/ConfigParser.py", line 263, in read
self._read(fp, filename)
File "/usr/lib/python2.3/ConfigParser.py", line 484, in _read
raise e
ParsingError: File contains parsing errors: webdir.conf
[line 4]: 'hgweb.hgwebdir([isinstance(repo, tuple) and repo or (repo, repo) for repo in repos]).run()\n'
----------------------------------------
More information about the Mercurial
mailing list