Some basic help for a noob

Paul Boddie paul.boddie at biotek.uio.no
Fri Jan 20 11:49:31 UTC 2012


On 20/01/12 11:30, coolblue2000 wrote:
> I have used Sourcesafe and Subversion and am now making the move to
> Mercurial. However I have a couple of quite basic questions due to the
> different nature of Mercurial.
>
> 1. I have set up a two repositories on a server and then set it up as a
> webserver. However only one repository is shown (and currently that is an
> old one that has been removed....) when I go to http://myserver:8000/. How
> do I see the other repositories or do I have to assign a different webserver
> (and hence port) to each repository (which would seem a little clunky)

If you follow the instructions at...

http://mercurial.selenic.com/wiki/PublishingRepositories#hgweb

...you will see that setting up an instance of hgweb will let you serve 
multiple repositories, provided that you specify the paths of those 
repositories in the configuration file.

If you're using an instance of "hg serve" to publish a repository then 
it won't serve other repositories as well: you will need an instance of 
"hg serve" per repository with its own port, but that's likely to be 
awkward to manage over time, especially if you make more and more 
repositories.

It is recommended that you use hgweb for what you're trying to do, 
although this will involve setting up a separate Web server program.

> 2. How do I clone a repository on my local machine to the central repository
> on the server? Currently I get an error telling me to enter another path.
> (Surely I do not have to setup a webserver on my local machine and pull from
> the server as that again would seem clunky to me).

You can't use hgweb to clone a repository to the server, as far as I 
know, but you can use ssh for this:

hg clone repository ssh://user@host/repositories/repository

Some people have modified hgweb to set up clones on the server that you 
can then push to, but I'm not sure that any of those changes were ever 
incorporated into hgweb proper.

Paul



More information about the Mercurial mailing list