Setup Mercurial on Solaris Nevada build 59
Monday Apr 09, 2007
Solaris Nevada build 59 shipped with Mercurial 0.9.3:
$ hg --version
Mercurial Distributed SCM (version 0.9.3)
Setup Mercurial server on it is pretty easy.
- $ mkdir -p /workspace/scm/hg/hgroot/g11n
- $ cd /workspace/scm/hg/hgroot/g11n
- $ hg init
- $ cat <<EOF > .hg/hgrc
[web]
contact = Simford Dong
description = G11N Internal CWS
style = gitweb
allow_archive = gz zip bz2
allow_push = * - $ cp /usr/demo/mercurial/hgwebdir.cgi /workspace/scm/hg/hgroot
- $ chmod a+x /workspace/scm/hg/hgroot/hgwebdir.cgi
- $ cat <<EOF > /workspace/scm/hg/hgroot/hgweb.config
[paths]
g11n = g11n - Append following lines into /etc/apache2/httpd.conf
ScriptAliasMatch ^/hg(.*) /workspace/scm/hg/hgroot/hgwebdir.cgi$1
<Directory "/workspace/scm/hg/hgroot">
Order allow,deny
Allow from all
AllowOverride All
Options ExecCGI
AddHandler cgi-script .cgi
<Limit POST>
AuthType Basic
AuthName "Mercurial Repository"
AuthUserFile /workspace/scm/hg/auth/hgpasswd
Require valid-user
</Limit>
</Directory> - # svcadm refresh svc:/network/http:apache2
- # chown -R webservd:webservd /workspace/scm/hg/hgroot/g11n
- Done.
NOTE: following part will enable push back over http, if you don't like this feature, you can skip them.
- 'allow_push = *' part of step 4
- '<Limit POST> ... </Limit>' part of step 8
- step 10











