Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I would like to set better user access to my mercurial repos trough the cgi web interface. This is my current hgweb.config :

[web]
contact = first.lastname
description = HG Repos
allow_push=user1,user2,user3
allow_read=user1,user2,user3
[paths]
repo01 = /home/mercurial/repo01
repo02 = /home/mercurial/repo02
repo03 = /home/mercurial/repo03
repo04 = /home/mercurial/repo04

How to setup the following ? :

  • user1 has only access (push/read) to repo01 and repo02
  • user2 has only access (read only) to repo01 and repo02
  • user3 has only access (read) to repo01 and repo02, (push/read) repo03

I've checked multiple mercurial config tutorials but nothing helped me so far.

share|improve this question

1 Answer 1

up vote 6 down vote accepted

You don't want to have the [web] section in the hgweb.config file. Instead you want to an individual [web] config in each repository, using the files

/home/mercurial/repo01/.hg/hgrc
/home/mercurial/repo02/.hg/hgrc
etc...

Myself I've found the publishing repositories wiki page to be a good tutorial.

share|improve this answer
    
Perfect, thanks ! –  Kami Mar 7 '10 at 23:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.