Monday, June 14, 2010

Mercurial Server 1.0.1 Installation on Ubuntu

When we are working using Subversion, we can expose the Subversion repository using svnserve (open the default port 3690 and svn:// protocol) or leverage the Apache WebDav to expose your Subversion service in HTTP (the web protocol -- I've always tempted to write it as HTTP Protocol which is incorrect as the last P letter stands for 'protocol').

And of course if you are just as lazy as I, you will use the CollabNet Subversion or Edgewall Trac.

Mercurial Server from Lshift is one way to achieve similar thing. Though it is named Mercurial Server, it is not a server in traditional client/server perspective. It leverages the SSH authentication to make it like a central repository where multiple user can access and serves the same purpose.

Surprisingly, it is very easy to install in an Ubuntu box.

[sourcecode lang="shell"]
$ sudo apt-get install mercurial-server
[/sourcecode]

Gotcha! You have it now.
With this Mercurial Server, you can access the server using:
hg clone ssh://<ssh-user>@<host-name-or-ip-address>[:<ssh-port-num>]/<folder>

[sourcecode lang="shell"]
$ hg clone ssh://mercurial@192.168.0.1/projects
[/sourcecode]

No comments:

Post a Comment