Search code examples
mercurialhgweb

Use path with spaces in hgweb config?


When hosting Mercurial source control respositories with hgweb, is it possible to use a path with spaces in your hgweb.config file? In particular, can you point me to an authoritative source documenting that it can't work or to instructions on how to make it work? Thus far, my Google searching has not proven fruitful.

The particulars of my setup is that I am trying to host Mercurial repositories using hgweb hosted through IIS. Also, I am trying to map UNC file paths. In particular, a config file with paths such as

[paths]
repo1 = \\path\with\no\spaces
repo2 = \\path2\with\no\spaces\*

is working fine in my current setup. However, an entry such as

[paths]
repo3 = \\path\with spaces

is not working. While changing the folder name is a last resort option, I do not consider it as an answer to this question as it would interfere with development.


Solution

  • From Mercurial HG Config file documentation (hg/help/config), whitespaces are considered as separator except when placed in double quotation marks, so it should work using this notation, though I did not test it:

    repo3 = "\\path\with spaces"