'hg serv' case insensitive?

Thomas Arendsen Hein thomas at intevation.de
Mon Jun 5 09:53:02 CDT 2006


* 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()

Thomas

-- 
Email: thomas at intevation.de
http://intevation.de/~thomas/


More information about the Mercurial mailing list