Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mercurial hg serve multiple repositories

Tags:

mercurial

I am setting up a central mercurial server, and want to host multiple repositories. Every web page I look at about this says to set up a config file that looks like this:

[collections]
repos/ = repos/

Where /repos is the folder and /repos is the path to use in the URL.

My question is which /repos is which??? I may want to use a name that is not the same as the path, as in:

[collections]
A/ = B/

Is A the physical path or the url path? Such a simple question you would think would have been answered, but I could not find any nontrivial examples.

like image 817
Daniel Williams Avatar asked Dec 29 '11 17:12

Daniel Williams


1 Answers

Ok, I got it. This is on Windows, and here is everything that I need in the hg.conf file:

[paths]
foo = C:\Data\repositories-hg/foo-hg
bar = C:\Data\repositories-hg/bar-hg

This lets met access the repo at the location C:\Data\repositories-hg/foo-hg as:

http://server:8000/foo

Therefore A is the url alias and B is the physical path. There's of course more to set up, but this accomplishes what need for now.

like image 131
Daniel Williams Avatar answered Oct 22 '22 05:10

Daniel Williams