{i} This page is an incomplete stub. Please help improve this page by expanding it, following our wiki style guidelines.

Note:

This page appears to contain material that is no longer relevant. Please help improve this page by updating its content.

Publishing Repositories (all-in-one howto)

Work in progress, any help apreciated!

Right now, we have too many documents describing the same stuff over and over again. We need to merge and clean up the following pages: PublishingRepositories, ServerInstall, HgWebDirStepByStep, mod_wsgi (and possibly SharedSSH)

- Instructions should be distribution/OS agnostic (at least for Unix-like operating systems).
- Examples should be consistent; e.g. use hg.example.net as a domain name, /srv/www/vhosts/hg.example.net for DocumentRoot ...
- Keep it simple, stupid (compare mod_rewrite vs. ScriptAliasMatch setup in PublishingRepositories).
- We should target competent users/admins. So don't describe basic Apache configuration or similar.

Basic page structure should look like this:


Start here

Publishing method

When it comes to publishing repositories, mercurial offers simple solutions for many real-world situations, whether you want to to do something "right now", or when you need more permanent (and scalable) setup.

Built-in web server (hg serve)

Mercurial has a built-in lightweight web server which can be used for browsing a repository with a web browser or for allowing remote machines to pull from you. To use it, simply run:

$ hg serve

And then point your web browser at http://localhost:8000/.

The built-in web server is missing some features found in other web servers, including access control, authentication, SSL, etc. These are especially useful if you want to be able to securely push to a web-based repository. Thus, if you want to make a more permanent server, you should probably use other methods to publish your repositories. Note that hg serve only allows read-only access to your repositories.

On the other side, this is a great way to share your code in informal (peer-to-peer like) environments, and to gain some experience with mercurial network operations.

To see detailed options for using hg's HTTP server just run

$ hg help serve


CategoryWeb

PublishingRepositories2 (last edited 2012-05-15 13:39:25 by PaulBoddie)