views:

68

answers:

2

The wiki mentions it's possible to do this under hg serve, but there aren't any examples (such as a sample webdir-conf file). Yes I know it would be better to do this all under Apache, but this is a local machine and hg serve just makes sense for us.

+3  A: 

As you've hinted at you use the hg serve --webdir-conf FILE invocation and the webdir.conf format is the same as it is for hgweb.cgi. So those examples apply to you too:

http://mercurial.selenic.com/wiki/HgWebDirStepByStep#Preparing_the_config

so at your most basic you can do:

[collections]
repos/ = repos/

where repos/ is the path on your local system to the directory containing the repositories.

(and you're right it would be much better to take the time to do this under Apache).

Ry4an
Ok, awesome. So, once I set up collections what URL will I use for cloning? Something like http://10.10.1.252:8000/name_of_repo?
littlerobothead
Yeah, just got to http://10.10.1.252:8000 and you'll see a list of repos whose likes are valid clone sources.
Ry4an
+2  A: 

use this in your webdir config (for example)

foo.config << EOL

[paths]
power = power/Repo
billable = /path/to/billable/Repo
EOL 

hg serve --webdir-conf foo.config

Assuming your repos live in different places...

Doon