Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

hg access control to central repository

Tags:

mercurial

We come from a subversion background where we have a QA manager who gives commit rights to the central repository once he has verified that all QC activities have been done.

Me and a couple of colleagues are starting to use mercurial, and we want to have a shared repository that would contain our QC-ed changes. Each of the developers hg clones the repository and pushes his changes back to the shared repository. I've read the HG init tutorial and skimmed through the red bean book, but could not find how to control who is allowed to push changes to the shared repository.

How would our existing model of QA-manager controlled commits translate to a mercurial 'central' repository?

like image 862
andreas buykx Avatar asked Apr 05 '10 07:04

andreas buykx


1 Answers

HenriW's comment asking how you are serving up the repositories is exactly the right question. How you set up authentication depends entirely on how you're serving your repo (HTTP via Apache, HTTP via hg-serve,, ssh, etc.). The transport mechanism provides the authentication and then mercurial uses that with the commands from Mr. Cat's link (useless in and of themselves) to handle access control.

Since you didn't mention how you're serving the repo, it was probably someting easy to set up (you'd have remembered to mention the hassle fo an apache or ssh setup :). So I'll ugess those two:

If you're using hg serve then you don't have authentication setup. You need to use apache, lighttp, or nginx in front of hgweb or hgwebdir to provide authentication. Until you do the allow_* and deny_* options are strictly everyone or no one.

If you're using ssh then you're already getting your authentication fromm ssh (and probably your OS), so you can use the allow_* and deny_* directives (and file system access controls if you'd like).

like image 135
Ry4an Brase Avatar answered Nov 14 '22 23:11

Ry4an Brase