Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mercurial server running multiple repositories

I'm using TortoiseHg, and I want to run it as a server. I've been able to run the server, pointing it to the root of the repository I've chosen.

  • http://192.168.1.64:8000 points to c:\myproject

I'm looking for a way to have a folder C:\projects, with multiple repositories inside, pointing my Hg server to that folder, and i would access my repositories like:

  • http://192.168.1.64:8000/project1 points to c:\projects\project1
  • http://192.168.1.64:8000/project2 points to c:\projects\project2

Can someone help me please?

like image 888
André Alçada Padez Avatar asked Dec 07 '22 20:12

André Alçada Padez


2 Answers

While using a full web server for repo hosting, as suggested by Lasse, is a good idea, nothing prevents you from serving multiple repositories using hg serve.

Here's my hgweb.config file:

[paths]
project-a = C:/hg/project-a/
library-b = C:/hg/library-b/

I start hg serve with this command:

hg serve --address 127.0.0.1 --port 8000 --webdir-conf C:/hg/hgweb.config --encoding utf8
like image 140
Helgi Avatar answered Jan 30 '23 18:01

Helgi


you should edit the hgweb.config file, as it is by default of view like:

[web]
style = gitweb

[collections]
<br>
/mercurial/collections = /mercurial/collections

so, assume that record as first /mercurial/collections is the identifier name whereas second (right side from equals sign) stands for physical path of repo.

for example, I have made it like:

[web]
style = gitweb

[collections]
myrepo1 = /mercurial/repositories/hang_over
myrepo2 = /mercurial/repositories/first_repo
myrepo3 = /mercurial/repositories/javaforever

Im making this under linux ubuntu distribution version.

anyways, here mercurial directory is in my root directory and I'm pointing from it to /mercurial/repositories.

hope it helped you.

Sincerely.

like image 25
Giorgi Tsiklauri Avatar answered Jan 30 '23 17:01

Giorgi Tsiklauri