Skip to main content

Toolbar items

Back to site
Manage

Administration menu

Anonymous

User account actions

  • Log in
  • Create new account
  • Reset your password

User account menu

  • Log in
Home
Hadronrider
How to set up a bare metal home server, run CI/CD using Gitlab, Jenkins and pipelines, make e-toys, automate your home and much more

Main navigation

  • Home
    • HadronRider WWW App
    • Webmail
    • Gitlab
    • Jenkins
    • Mercurial
    • Redmine
    • YouTube channel

Mercurial

Breadcrumb

  • Home
By valerio | 11:02 AM BST, Sun September 29, 2024

NOTE: Mercurial is not recommended for new projects

I recently moved to Gitlab, which is much more state-of-the-art and just as easy to setup.

The only downside to Gitlab is it's not as "speedy" as Mercurial. HGWeb pages load in about a 10th of the time, but they also have a 10th of the features.

Setup

Installation is as easy as:

sudo apt install mercurial 

and 

 

NGINX configuration

You need 3 entries, 2 in the first "server" block:

location /hg {
	uwsgi_pass unix:/run/uwsgi/app/hgweb/socket;
	include uwsgi_params;
	uwsgi_param SERVER_ADDR $server_addr;
	uwsgi_param REMOTE_USER $remote_user;
	uwsgi_modifier1 30;
	uwsgi_param SCRIPT_NAME /hg;
	rewrite /hg/(.*) /$1 break;
	auth_basic "Mercurial Repository";
	auth_basic_user_file /var/www/.htpasswd;
	client_max_body_size 100M;
}
location /hg/static {
	rewrite /hg/static/(.*) /$1 break;
	root /var/www/hg/templates/ruthenium/static;
	expires 30d;
}

and one at the top level (e.g. under the first server block):

upstream hg {
    server unix:/run/uwsgi/app/hgweb/socket;
}

 

GUI client: TortoiseHG

This is a very nice GUI client for Mercurial. You can get it here: https://tortoisehg.bitbucket.io/ installation and usage are very straightforward.

 

  • Log in or register to post comments

Comments

Powered by Drupal

Copyright © 2024 Company Name - All rights reserved

Developed & Designed by Valerio Canova