If you want to setup mercurial-server on fedora or centos/rhel server you are going to see lots of failure messages during installation and the installation will definitely fail.
Mercurial-server was written to run smoothly on debian-based systems, so I patched it to run on fedora/centos and I would like to share the patch with you.
Using the patch is straight-forward, simply download the tip or the latest version of mercurial-server and put the patch file into the extracted directory.
patch < mercurial-server-centos.patch
the patch is a few lines, so it’s naive for professionals.
Have Fun.










by Ahmed Kamal
03 Nov 2009 at 21:56
My favorite developer friend saves the day once more
by Steve Steiner
13 Mar 2010 at 20:52
This has been added to the mercurial-server Makefile so you can use:
sudo make setup-useradd
S
by Steve Steiner
13 Mar 2010 at 21:16
Also, when installing by hand, the refresh-auth command ends up in /usr/local/bin instead of /usr/share/mercurial-server.
I’m using mercurial-server 1.0.1, using the new setup-useradd make target. Trying to pull the hgadmin repo gives a password prompt, but there is no password for the hg user.
Hmmm…not sure what’s going on yet.
by Ahmed Sameh
30 Mar 2010 at 04:16
Thanks for the help Ahmed.
but while I tried to setup over CentOS 5.2 I had to remove the documentation build from the make file.
Just find the line that says:
`installfiles: installetc installdoc pythoninstall`
and replace it with:
`installfiles: installetc pythoninstall`
I had also to remove –system parameter from the useradd command.
I hope this help others…
by Ahmed Sameh
30 Mar 2010 at 04:19
I have forget to tell that I did not have to patch the file like you said, as they have included it in the current version.
just do make setup-useadd
by Ahmed S. Farghal
30 Mar 2010 at 16:44
yes, that was fixed by them already.
by Michael
30 Mar 2011 at 12:35
I had to update the docbook xsl (DOCBOOK_XSL=/usr/share/sgml/docbook/xsl-stylesheets-{version}), and change “–system” to “-r” for the useradd command (as mentioned).
(Also note that “sudo” won’t work; you have to run this as root…. it’s documented, but it’s also true.)