May 14, 2010

My musings on the education system...

This morning, I got into a conversation with @JohnMacIntyre and @JenRBoyd on Twitter regarding the "No child left behind" policy that appears to be causing exactly the mayhem it was brought about to prevent.

While I value the ideals that caused this mockery of a practice to be given life, it must've been put together by someone who doesn't understand kids - perhaps doesn't even understand people, or education. Our kids strengths and passions are the future of the human race. Not what we think their future should be, but what they will actually make it.

Over my years, thinking back to my childhood. Having grown up; been married twice; had two kids (so far); and having tried my hand at many things, some more successfully than others; I've observed a thing or two about people that were as true for me in my childhood as they are today. Although, as a kid I lacked the eloquence and insight to express it:

  • We tend to love and are interested/passionate about what we're good at.
  • We tend to be good at things we love and are interested/passionate about.
  • While we may be good at things we don't love or are interested or passionate about, chances are, we'll never truly be happy doing them and we'll never develop the same passion for those things as we would about things we love or are interested in.
  • If we're pushed to do what others think we should be doing, rather than what we want to be doing, we will end up hating whatever it is we're being made to do and end up resenting whoever is making us do it.
  • We like to fit in and be part of our crowd [as opposed to part of the crowd].
  • We want to have our own brand, our own uniqueness if you will and be valued for that.
  • We want to have fun.
  • We tend to enjoy associating with others that have the same, similar or compatible interests as our own.

So why do we force our kids to study in a school system that goes against everything we would stand for ourselves? We force them to socialize with others that may have no compatible interests; We force them to study with and be hindered by others who have no interest in attaining their capabilities in subjects they love and are interested and passionate about; We force them to study subjects they're not interested in, hindering kids that are interested and passionate about those subjects.

Studying alongside kids who don't care puts them in a prime position for bullying and being bullied. I base this on my own observation. When we are forced to do something against our will, it makes us uncomfortable. It's instinct. Kids don't have the benefit of eloquence to help discuss their feelings, so they respond in the only way they know how, deflection, avoidance, disruption, retaliation. They can't lash out at the teachers because they know they'll be reprimanded, but the other kids are fair game. When we're doing something we love, we're at peace, with ourselves and with those around us. It's the same with kids. Just think of them as mini-adults. They have the same feelings, the same thoughts. They are no different than adults but without the experience or eloquence to communicate what they're feeling and thinking efficiently. So why do we put them in this antiquated environment that does more to hinder their learning than help it?

Growing up in the UK, some of our classes were streamed - that is all the kids in the class were of a similar ability in that subject. A number of courses were like this: French, English, Literature, Maths, Chemistry and Physics. These classes made up for all the other shit I had to sit through. Not to say I didn't like the other subjects per se, but the curriculum and thus the material was uninteresting to me. For instance while I'm fascinated by topics that stretch from Ancient Greece, Egypt and Rome to the Vikings; from historic myths and legends to the birth and evolution of religion - the corn laws in the middle aged England taught by someone forced by the curriculum to read it the night before wasn't nearly so fascinating - I got a D in History. To this day the only thing I can tell you about middle age farming was that they invented crop rotation. Why should a kid who is fascinated by History get such a poor grade in that subject? I've learned hundreds times more from the Discovery channel from truly inspiring presenters!

In the streamed classes I got top grades, well...French I buggered up a few of my tenses in the oral exam, so I dropped half a grade from A- to B+ and Science which idiotically was broken into 3 disciplines but only two grades which meant that my F in biology (a subject I detested) dragged down my grades in Chemistry and Physics (which I loved!).

Why then should I study these subjects that I have no interest in? They say it's because they may be useful later in life. I have no need to understand how to disect a frog... "What if you want to be a vet? If you want to be a vet, you need to know this stuff?" 1). It's gross 2). The fact that I find it gross probably means I'm probably not going to be a very good vet. Why put the cart in front of the horse?! I'm more likely to be interested in doing jobs that cater to what I love than finding a job I think I'm going to love only to have to study subjects I'm not interested in to get there... and then finding out I don't love it after all. So now:

  • I've wasted a ton of time studying subjects I had no interested in to get a job I don't like.
  • The time I spent studying those subjects took away from another subject I really enjoyed that would probably have helped me get a job I really enjoy too!
  • I distracted and held back those who were really interested in the subject.

So who did that help? Nobody!

I know mechanics whom I would trust my car with no questions asked. They dropped out of school and have no formal education to speak of, yet they know their way around an engine as well as any professional pit crew on the Formula 1 circuit. I know world class artists that hated school and it hasn't affected their lives in any way either. I'm barely any good at either of these disciplines - I wanted to love art, but I'm just not good at it. I get all my graphic design done by a graphic designer I've been friends with for years and beyond filling my washer fluid and checking the oil level the only thing I know about the engine of my car is that a). my car has one and b). last time I opened the hood to fill my washer fluid, it was still there. Has this affected my life any? No. In fact, lots of people without a formal education in their field have gone on to be wildly successful - see my previous blog post.

I've been admonished for my perspective before - "Your life will be so much more fulfilling if you learned this stuff", "It would be so much cheaper if you did it yourself"...

  1. Would my life really be more fulfilling if I could change my own oil?
  2. Would it really be any cheaper?

One: I don't care to figure out the ins and outs of my car's engine - I vaguely know how it works from diagrams I've seen from time to time and know that if at some point in the future I absolutely had to, I could figure it out. Beyond that it doesn't yield enough interest to take time away from something I love to spend time figuring it out.

Two: It would take time away from doing something I really love in order to figure it out, which is abhorent to me. Why should I stop doing something I love to do something I have no interest in?

Thirdly: It wouldn't be any cheaper because I get paid more for doing what I love than I pay my mechanic for doing (hopefully) what he loves. And even if it were to cost the same, I give you this: By doing it myself, I not only remove an opportunity for my mechanic to do what he loves, but I'm losing the time to do what I love.

I have exactly the same view about life as I have about school - why waste my time doing something that at best I have no interest in, and at worst I hate when I can just pay someone else to do it while I go and get paid to do something I love?

Of course I believe that every kid needs to be taught a few things in order to make the pursuit of whatever life they choose attainable:

  • Social abilities - as a geek, I know that social graces are hard. They're worth the effort and will help you feel more comfortable and perhaps even have fun around other people.
  • Communication skills - goes with social abilities. Being able to express one's self eloquently both verbally and in writing is useful every day.
  • The "three Rs" - reading, writing and... how to use a calculator.
  • Manners - not necessarily table manners per se, although they would be nice, but common courtesy - like indicating before changing lanes, letting people merge, not cutting people off, holding the door for people, saying please and thank you, not talking over other people while they're talking.
  • Social etiquette - how to talk to and/or treat people if you want them to respect you and take you seriously, being polite.
  • How to learn, how to find information and how to use that information effectively - everyone needs to be able to further their own education as they are able.
  • How to look after your money - so you don't end up on the street or without food on the table.
  • Critical thinking - There's far too many people that are inclined just to believe whatever they're told without ever thinking for themselves about whether the information can be trusted.

People naturally want to learn what they find interesting or have fun doing. So I think the key is to find a way to provide an environment where they can learn everything they can about what they love and not force them to learn a whole bunch of shit that will never have any use in their life...

People who do what they love are attractive to companies too. You can't buy the kind of loyalty that paying someone to do what they would be doing anyway brings. Doing what I love is not a choice, it's not a lifestyle, it's not a job - it's who I am. You have no need to worry if I'm going to show up every day or if I'm going to give it my best. Why? Because if you're going to pay me to do the same thing I'd be doing anyway, I'd be stupid not to take your money and run laughing all the way to the bank.

I'll leave you with a story from my childhood...

My mum bought our first computer when I was 8. She was a single mum of two rambunctious kids. She bought this shiny black Sinclair ZX Spectrum with grey rubber keys and a flash of colour across it's shoulder. I begged my mum for games for it, but she was already working her fingers to the bone to keep the roof over our heads, the bills paid and food on the table. She could barely afford this computer, let alone games for it. She'd bought it to learn to program, along with a BBC Micro 30 hour BASIC course to help find a way out of the financial hardship we were suffering.

For all the begging no games came. Christmas that year didn't yield the games I'd so desperately longed for - instead came a book about programming them. I spent hours leafing through that book, writing games I had no way to save, playing them and then when I got bored with the game resetting the power so I could write the next one. I've been programming ever since and I'm still as hooked on it and fascinated by it today as I was back then at 8 years old...23 years ago. To this day, I don't think my mum ever picked up that 30 hour BASIC book.

It might surprise you to know that I failed I.T. at school. A subject I'm passionate about and should've excelled at. But to cater to a class of people that largely not only didn't care about computers, but would rather have been on the playing field than stuck in a classroom prevented me from getting an education in something I dearly love! My final end of year report said: "Ben would do well to avoid a career in I.T. he doesn't appear to have an aptitude for technology". For anyone that knows me and knows my affinity for gadgets this is a truly laughable statement.

As an adult it's easy to look back and think there was much I could've done to change things, get the positive recognition and help I needed. As a kid though, my toolbox was missing insight and eloquence. It's easy for the system to say I failed but the fact is, a kid in this position isn't the failure - it's the system and the teacher that are the failure. I didn't fail, I was just a kid. a kid who wanted to learn.

This experience didn't kill my love of computers or asuccessful career in I.T. though. A bit of paper and an end of year report are no match for interest, creativity and passion.

"Nobody can put a grade on your passion." - Ben Alabaster

May 13, 2010

Setting up and configuring Mercurial in a Windows/IIS/Active Directory environment - Part 4/4

Part 4: Customizing the theme/skin of your Mercurial web interface.

This blog post is part of a four part series for getting Mercurial up and running in a Windows environment and hosting it on IIS 5.1 (i.e. Windows Server 2003).

  1. Part 1 Getting Mercurial set up in IIS and hosting a repository at
  2. Part 2 Getting IIS to hide hgwebdir.cgi in the URL for your Mercurial repositories.
  3. Part 3 Locking down security using Active Directory so that only authorized users can view, clone, pull and/or push to a repository.
  4. Part 4 Customizing the theme/skin of the web interface of your Mercurial repositories.

Continuing from my previous posts, I will refer to the directory containing my Mercurial Web UI as MercurialWeb and the UI itself as http://MercurialWeb/Repos/. On my test server my MercurialWeb directory is D:\Mercurial\hgWeb

I will start by ripping off one of the other existing themes that comes with Mercurial - monoblue. I don't personally like any of the existing themes very much, but everyone's taste is different. If you choose to modify a different theme as a base, just change monoblue to whatever theme you picked.

The themes are all stored in the templates directory of your \templates folder.

Make a copy of monoblue and rename the copy to something new and catchy. I'll call mine Alabaster, because I can't think of anything more inspiring than me :D The theme name is not displayed anywhere on your site, so it's really irrelevant what you call it unless you're going to distribute it or display it as part of the theme on your web UI. Okay, now we've got a template we can butcher...

Next step, go to the \static directory in your templates folder and make a copy of the monoblue.css renaming it to style-.css. Mine's called style-Alabaster.css.

Last step before we get to modification - open hgweb.config in your directory. If you have a [web] section add or modify the style property to point to your theme:

style = Alabaster

Okay, that's all the configuration done... now for modification of the style sheet and templates to change the look and feel of the site.

First thing I want to change is to display a logo of my own choosing instead of the Mercurial one and hook it to the repository root instead of the Mercurial website. We need to do this in a couple of places because the template isn't completely DRY. But we can come back and address that another day...

The first place is in \templates\Alabaster\index.tmpl


<div id="powered-by">
 <a href="" title="Mercurial"><img src="{staticurl}hglogo.png" width=75 height=90 border=0 alt="mercurial"></a></p>


<div id="powered-by">
 <a href="http://MercurialWeb/" title="Alabaster"><img src="{staticurl}AlabasterLogo.png" width=50 height=80 border=0 alt="mercurial"></a></p>

We also need to do this in \templates\Alabaster\footer.tmpl. The section is identical, you can just copy and paste it from index.tmpl over the same div in footer.tmpl.

To add our own favicon modify header.tmpl and change:

<link rel="icon" href="{staticurl}hgicon.png" type="image/png" />

to point to our own favicon:

<link rel="icon" href="{staticurl}AlabasterIcon.png" type="image/png" />

Add our two logos are in the \templates\static directory.

Now that we've got those changes sorted, it's no more complicated to modify our theme than modifying the style-Alabaster.css file. The first change I made was that I don't like all the lower case text everywhere. I was brought up to capitalize the first letter of a sentence and by god I want them capitalized... but some of the strings are generated on the fly so without the motivation to modify a bunch of hgweb base code, I'm going to add a couple of pseudo elements to my theme file which will do the job far more easily for me: li:first-letter{
 text-transform: capitalize;
 text-transform: capitalize;

There, now my theme looks more... proper. Headings and links now start with capital letters... as they should.

Now it's just a case of buggering around with the CSS and coming up with something I like which is more about taste than technicality so I will leave the rest to you...

I will blog again about this process in more recent versions of IIS once I find the time to upgrade my server ;)

Setting up and configuring Mercurial in a Windows/IIS/Active Directory environment - Part 3/4

Part 3: Locking down security using Active Directory

This blog post is part of a four part series for getting Mercurial up and running in a Windows environment and hosting it on IIS 5.1 (i.e. Windows Server 2003).

  1. Part 1 Getting Mercurial set up in IIS and hosting a repository at
  2. Part 2 Getting IIS to hide hgwebdir.cgi in the URL for your Mercurial repositories.
  3. Part 3 Locking down security using Active Directory so that only authorized users can view, clone, pull and/or push to a repository.
  4. Part 4 Customizing the theme/skin of the web interface of your Mercurial repositories.

Demonstration environment setup:

For a while now I've had Mercurial set up and running nicely on IIS, and I've got ISAPI Rewriter running so that my URLs don't include the ugly hgwebdir.cgi in every URL. The current project of the day is authentication and repo security but if you're not set up yet and still need to get going, refer back to the previous posts...

I found a bunch of articles on how to do this in Apache using configuration modules but hadn't found anything about using a AD/IIS setup.

My first step is to decide on my repository structure which needs to be flexible enough that I can have multiple 'clients' (or teams if this is hosted on the company LAN). I figure the following convention should be flexible enough - at least for this blog post.


  • D:\Mercurial\HgWeb - this contains my HgWeb setup which is detailed here
  • D:\Repositories\Client1\Project1
  • D:\Repositories\Client2\Project1
  • D:\Repositories\Client2\Project2
  • D:\Repositories\Client3\Project1
  • D:\Repositories\Client3\Project2
  • D:\Repositories\Client3\Project3

On a corporate LAN you could equally replace Clientn with a team name or just that part of the structure altogether and just have your project folders directly under the repository folder... whatever your structure is doesn't matter, it just needs to work for your organizational patterns.

Before you start with the following security steps, you should be aware that this is written from a least secure to most ideal sequence. This blog post is to help you understand the security mechanisms to use and you shouldn't follow this sequence in an environment that requires high security! You have been warned.

Lockdown - Step 0 [Allow everyone to clone/pull/push]

Let's start out simple - open the hgweb.config file in D:\Mercurial\HgWeb directory and add the configuration to allow all users to push to the repository. This goes in the [web] section of the configuration like so:

allow_push = *

So [using conventions determined by my previous blog posts], everyone can look at or clone a repository by going to where n can be replaced with a corresponding client or project. Also, everyone can push to the repository - security is wide open. That's not really what we want. But it's a starting point.

Lockdown - Step 1 [Allow only domain users to clone/pull/push]

I don't want the general public having access to my repositories, I want to only give access to authorized parties. Client1 should only be able to access their own projects, likewise with clients 2 and 3.

To do this, we need to edit the authentication in IIS so that only domain users can view resources in this website.

  1. Open Internet Information Services Manager from Administrative Tools.
  2. Right click the website and select properties.
  3. Click the directory security tab.
  4. In the Authentication and access control section, click the Edit button.
  5. Uncheck Enable anonymous access option.
  6. Check the Basic authentication (password is sent in clear text) option.
  7. Enter your default domain - this will be included with any username as it is used for authentication i.e. if your credentials are MYDOMAIN\User1 then your default domain should be MYDOMAIN so that your user doesn't need to enter MYDOMAIN\user1 as his credentials, but can just enter user1.
  8. Enter the realm in the case of my repositories would be - this is the fully qualified domain name for your repository on the web.

CAVEAT: Mercurial requires basic authentication to be used, which means that unless you want your password transmitted in clear text over the internet - you'd best be using SSL.

You can obtain an SSL certificate from a number of well documented places, so I won't go into that any further here. Just to say that you need to make the following security choice:

  • Require Windows Authentication - Mercurial won't be able to authenticate.
  • Use Basic Authentication and no SSL certificate - Mercurial will be able to authenticate, but your credentials are transmitted in a readily readable format over the open internet for anyone with the know-how to extract and exploit.
  • Use Basic Authentication and an SSL certificate - Mercurial will be able to authenticate over SSL so your credentials, and indeed all communication between the client and server will be encrypted.
  • Install SSH and access your repositories via this method instead of through IIS. But I want everything in one place, so IIS wins from a simplicity standpoint.

So now only users who have an account in Active Directory can access the repositories, but nobody else can. Great...but that's not enough.

Lockdown - Step 2 [Allow only specific domain security groups access to a repository]

I don't want everyone with an active directory account being able to access all (or in some cases any) repositories. For instance, I don't want User2 accessing my projects, I only want people from my team accessing my projects.

Create a security group to manage the domain users that can access a repository:

  1. Open Active Directory Users and Computers from Administrative Tools
  2. Create a security group for Client1 - for the purpose of this blog post, I'll call it Client1Group
  3. Add users that have read or write privileges for Client1's projects

Once we are done with this stage of lockdown, members of this security group will be able to read and write to all of Client1's repositories but nobody else will be able to access it.

Assign access privileges to the security group:

  1. Open Windows explorer and navigate to the repository you want to lock down. I will lock down my Client1 folder which contains all of Client1's repositories.
  2. Open the folder properties by right clicking the folder and clicking properties.
  3. Click the security tab.
  4. Click Advanced button and uncheck Allow inheritable permissions from the parent to propogate to this object and all child objects. Include these with entries explicitly defined here. option.
  5. Click OK.
  6. Select Copy to copy the inherited permissions up from the parent directory for now - this way we're starting with the folder as it was in its initial state.
  7. Click OK again.
  8. You will now be back to the original properties window.
  9. Remove the Users group.
  10. Add our Client1Group security group and assign them Read & Execute permissions [List Folder Contents and Read permissions will be implied by these also].
  11. Click OK.

Now those users you assigned to the Client1Group security group will have access to be able to view Client1's repository and indeed, it won't even be displayed to another user if they log in.

Lockdown - Step 3 [Allow only specific group members to push to a repository]

This is done in the hgrc file found in the .hg/hgrc folder of each repository. If one doesn't exist, create it the file doesn't have an extension, it's a plaintext file called just hgrc. If a file exists, you can edit it with notepad or whatever text editor you use. Find the [web] section in the file, if one doesn't exist, add it and add/modify the push rule:

allow_push = <user1>[,<user2>]...[,<usern>]

Specify each of the usernames of the group that should be able to push to the repository in comma delimited form.

Now everyone contained in the Client1Group security group will be able to view and clone the repository, but only those users you specified will be able to push back up to it. Nobody else will be able to see or access the repository either through the file system or via

Job done!

Next - customizing the look and feel of the Mercurial web interface...

Setting up and configuring Mercurial in a Windows/IIS/Active Directory environment - Part 2/4

Part 2: Masking hgwebdir.cgi in our URL

This blog post is part of a four part series for getting Mercurial up and running in a Windows environment and hosting it on IIS 5.1 (i.e. Windows Server 2003).

  1. Part 1 Getting Mercurial set up in IIS and hosting a repository at
  2. Part 2 Getting IIS to hide hgwebdir.cgi in the URL for your Mercurial repositories.
  3. Part 3 Locking down security using Active Directory so that only authorized users can view, clone, pull and/or push to a repository.
  4. Part 4 Customizing the theme/skin of the web interface of your Mercurial repositories.

In part 1 we got Mercurial up and running in IIS and created a repository that we can pull from and push to.

The next step is to get rid of that god awful hgwebdir.cgi in the URL so we can have a nice URL - perhaps like: instead of

  1. Download and install Helicon's ISAPI Rewrite 3 - Note: if you need ISAPI Rewrite to work only on specific sites on your server, you need the $99 version. If it can be applied to all sites hosted on your server you can get the free lite version.
  2. Open the ISAPI Rewrite manager.
  3. Click the website (if you purchased the $99 version) or the IIS Web Sites node if you got ISAPI Rewrite Lite.
  4. On the right side of the window you will see the config file listed as <InstallDir>\Helicon\ISAPI_Rewrite3\httpd.conf. Click the edit button.
  5. Add the following rule:
    • RewriteRule /[<ReposFolder>/](.*) /hgwebdir.cgi/$1 [I,O]
    Replacing <ReposFolder> with a nice display name to show instead of hgwebdir.cgi - on my system is use Repos
  6. Set the baseurl property in your hgweb.config file to the nice display name you set in the previous step.
    baseurl = /Repos/

The reason we replace hgwebdir.cgi with a nice name instead of just hiding it altogether is that we only want the rule to fire when we're calling repositories, not when we're calling other resources on the server. If for instance we were to use:

RewriteRule /(.*) /hgwebdir.cgi/$1 [I,O]

This would fire for every page we requested regardless of whether or not we were looking for a repository or not. The idea is that you only want the rule executed in a minimal set of circumstances.

Now we can access our repository using and the cgi will be invoked correctly because the rule rewrote the address from to

Next - Configuring repository security access using Active Directory.

Setting up and configuring Mercurial in a Windows/IIS/Active Directory environment - Part 1/4

Part 1: Setting up and configuring Mercurial for IIS

This blog post is part of a four part series for getting Mercurial up and running in a Windows environment and hosting it on IIS 5.1 (i.e. Windows Server 2003).

  1. Part 1 Getting Mercurial set up in IIS and hosting a repository at
  2. Part 2 Getting IIS to hide hgwebdir.cgi in the URL for your Mercurial repositories.
  3. Part 3 Locking down security using Active Directory so that only authorized users can view, clone, pull and/or push to a repository.
  4. Part 4 Customizing the theme/skin of the web interface of your Mercurial repositories.

If you haven't checked out which should get you up and running, you should. I want to gloss over most of the steps very quickly, but I also want to flesh out a few bits that I feel were unclear or could do with some further detail.

  1. Download and install Python - I've only tested with Python 2.6
  2. Download and install Mercurial.
  3. Download and install TortoiseHg - I'm told that some of the bindings for Active Directory don't work with the version of hg.exe that comes with Mercurial. If you're not going to use Active Directory, don't worry about this step.
  4. Modify your path in Environmental variables. Remove the path to the Mercurial bin and replace it with the path for TortoiseHg. Again, if you're not going to be using Active Directory for authentication, this step is not needed.
  5. Create a directory that's going to host your Mercurial/IIS install. I'll refer to this directory as MercurialWeb (I will also refer to its fully qualified domain name as http://MercurialWeb as this will differ for each website).
  6. Unzip the library folder in your TortoiseHg folder to MercurialWeb.
  7. Copy the whole templates folder from the Mercurial install directory to MercurialWeb.
  8. Open Internet Information Services from Administrative tools.
  9. Click Web Service Extensions.
  10. Click the "Add a new Web service extension" link.
  11. Add the extension name Python
  12. Add the required file <PythonInstallDir>\python.exe -u "%s" "%s"
  13. Check the Set extension status to Allowed
  14. Either create a new website or a new virtual directory pointing to MercurialWeb.
  15. Click the Home Directory tab.
  16. Click the Configuration button.
  17. Click Add...
  18. Set the executable to <PythonInstallDir>\python.exe -u "%s" "%s"
  19. Set the extension to .cgi
  20. Limit verbs to GET,HEAD,POST
  21. Make sure Script engine is checked
  22. It doesn't seem to make any difference if Verify that file exists is checked or not.
  23. Click OK
  24. Click OK
  25. Click OK

Now you should be able to access MercurialWeb. That's great, but we don't have any repositories hooked up to it, so it's not very useful right now.

Lets create a repository to be hosted on MercurialWeb. So create a folder somewhere on your hard drive [Caveat: The folder must be on the same partition as your MercurialWeb directory - i.e. if your MercurialWeb folder is hosted on D: then your repo must be somewhere on D: too].

Initialize it as a repository... you can either do this through the TortoiseHg shell extension for explorer by right clicking, selecting TortoiseHg/Create Repository Here or you can do it from the command line:

C:\Documents and Settings\balabaster\>d:

D:\>mkdir MercurialRepos

D:\>cd MercurialRepos

D:\MercurialRepos\>hg init

Next we need to tell MercurialWeb that we want this repository included in our repo list. So open your MercurialWeb directory and find a file called hgweb.config. Don't worry if the file isn't there, just create one, it's just a plain text file.

We can either add collections of repositories - i.e. by adding the common root to the [collections] section, or we can add specific repositores explicitly in the [paths] section. If the relevant section is missing, just add it.

\Mercurial\Repos = /Mercurial/Repos
\SomeOtherFolderContainingABunchOfRepos = /SomeOtherFolderContainingABunchOfRepos
\Path\To\Another\Set\Of\Repos = /Path/To/Another/Set/Of/Repos

Or for static repositories:

Project1 = D:\Projects\Project1
Project2 = D:\Path\To\Project2
Project3 = D:\Another\Path\To\Project3

Save the file and you should now be able to access your repositories using something similar to http://MercurialWeb/hgwebdir.cgi/Project1.

The next step is to hide hgwebdir.cgi...