Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Serving multiple repos with hg serve. How?

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.

like image 762
nickmjones Avatar asked Aug 16 '10 13:08

nickmjones


3 Answers

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:

https://www.mercurial-scm.org/wiki/HgWebDirStepByStep#Preparing_the_config

so at your most basic you can do:

[paths]
/repos = /webdata/hg_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).

like image 78
Ry4an Brase Avatar answered Oct 14 '22 13:10

Ry4an Brase


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...

like image 28
Doon Avatar answered Oct 14 '22 11:10

Doon


As an alternative You can use RhodeCode, it's standalone app written in pylons.

"RhodeCode is Pylons framework based Mercurial repository browser/management with build in push/pull server and full text search and permissions system."

A demo can be viewed here.

http://demo.rhodecode.org

Regards

like image 32
marcinkuzminski Avatar answered Oct 14 '22 11:10

marcinkuzminski