⬆️ ⬇️

hGate - the gateway to Mercurial repository management

Short version

What is offered : web interface for managing repositories and mercurial users - hGate .

To whom it is useful : for those who use the Mercurial + HgWebDir bundle and create repositories or users more often than once every couple of months.

Where to download and how to install : bitbucket.org/shedar/hgate

If you are wondering why this was done, a detailed list of opportunities and what will happen next - we continue.



Prehistory

Recently, Mercurial has firmly entered the part of my life that is related to programming. All work projects by default are sent to the version control system, personal, test and experimental - also if they live more than a few days or have practical value. To access the repositories, HgWebDir was configured in conjunction with nginx.

Everything would be fine if it were not for one “but” - HgWebDir allows you to view a list of repositories and changes, but it is not intended to manage repositories and users. To create a new repository, to configure permissions, create a user, or change the password, you had to log in to the server and perform the appropriate actions.



Looking for a turnkey solution

Experience suggested that if the problem does not exist the first day, then someone tried to solve it. The impression of the most complete of those found was produced by the phpHgAdmin script. But the joy did not last long. Installing it on two different servers, got the same result. Main problems:

- Groups and repositories mixed in a strange way;

- Groups did not open;

- The settings of the repositories created not by him were edited with problems;

- The decisive problem is that the project is not developing, the author is getting in touch, but nothing more.

')

Own decision

Having estimated the pros and cons of the phpHgAdmin improvements and the creation of their own solution, it was decided to create their own. Fortunately, there were two more people who were willing to participate, who were interested in the idea. Unfortunately, one of them almost immediately sucked work. Many thanks to Andrew ( gavaec ) for taking on most of the work on the project.



Technical features

Language: python;

Framework: django;

OS: Linux

Website: bitbucket.org/shedar/hgate



Functionality

- creation of repositories

- user management (create, delete, change password)

- create, delete, change groups of repositories

- editing the main parameters of the hgwebdir settings file

- setting permissions of repositories

- editing the basic parameters of repositories

- viewing user access rights - shows the matrix of rights to different repositories



What it looks like

The main:





Editing repository settings:





User management:





Known flaws

- Authorization is not supported, access restriction should be made by means of a web server

- not all settings file settings can be edited

- collections of repositories should be specified through the paths section, as recommended in the manual, the collections section is currently not supported.



Development plan

What is planned in the near future, in addition to combing and improving the reliability of the existing code:

- Monitoring the correctness of all hGate settings to facilitate installation and troubleshooting

- More complete support for config parameters

- Support for multiple profiles. When several independent instances of mercurial spin on one server, I want them all to be managed via hGate

- Own authorization

- Full support for groups with high nesting (type / home / hg / demo / **)

- Localization



If you have any suggestions and suggestions - write. Bugtracker is open for errors and problems.

Source: https://habr.com/ru/post/114804/



All Articles