1

I'm setting up an hgwebdir configuration for the first time with Mercurial on apache2. I can see the three repositories I've set up in the first page, and I've figured out how to modify their names so they don't resemble the directory path.

But when I click to go to one of the repositories, the URL becomes http://localhost/hg/hgweb.cgi/path/to/repos. I would like the directory to be http://localhost/hg/name instead as that is easier to remember for people who want to clone the repository.

Is there anyway to do that with hgwebdir?

1 Answers1

1

It really depends on the web server you are using.

In my case I'm using Apache and simply edited the httpd-vhosts.conf file and for the domain running hgweb.cgi set up the following Script Alias:

ScriptAlias /hg /FULL/PATH/TO/hgweb.cgi

Also I see you are referring to hgwebdir.cgi script. This has since been merged with the hgweb.cgi script since version 1.6. You can get the latest version of this file from the Mercurial source repository:

http://www.selenic.com/repo/hg/raw-file/stable/hgweb.cgi

Martin Geisler
  • 1,271
  • 9
  • 23
hipyhop
  • 11
  • 1