Monday, December 22, 2008

How to setup multiple hg repositories locally without apache or lighttpd

In my previous blog post I created the following:
  • a single local repository with a web interface plus pushlog
and in this blog post, I will show you what I did to create:
  • multiple local repositories with a web interface without pushlog
NOTE: I read this page which has much more information: "Publishing Repositories with hgwebdir.cgi" even though I do not use that file at all

These are the steps I followed:
  1. sudo mkdir -p /var/hg
  2. sudo chown -R armenzg /var/hg
  3. sudo cat <<> /var/hg/hgweb.config
    l10n-central/ = l10n-central/
  4. mkdir l10n-central
  5. hg init l10n-central/af
  6. hg init l10n-central/de
  7. hg serve --webdir-conf hgweb.config

You can now do this:

$> hg clone http://localhost:8000/af
$> hg clone http://localhost:8000/af


  1. You can even configure the hgweb.config file in your ~/.hgrc rather than specifying it on the command line:

    config = /path/to/hgweb.config

    you can also specify useful things like:

    port = 8080
    contact = Full Name <email@address>

  2. David, how/where can I learn more of these useful tags (if I could call them like that) and what can go inside them?

    I spent a lot of time trying to find out what other things I could put under "[collections]" and what was the correct syntax for this but I did not have too much luck

  3. BTW, thanks for the comment!

  4. Found!