views:

165

answers:

1

I would like to convert my Subversion repository to Mercurial. I have a pretty big web project divided into many different folders. In Subversion I was able to set per directory permissions for a repository. For example, I could say that a new developer could only read and write a subset of all the project's directories, using Subversion's path-based authorization. I could "hide" certain directories containing sensitive parts of the code from the developer, so that he wouldn't be able to see their contents, nor commit any changes to them.

Is it possible to have a similar setup in a single Mercurial repository?

+5  A: 

you might try the ACL plugin which is provided with mercurial

chub
The plugin only allows me to deny writing to certain directories. Is it also possible to deny reading the contents of these directories?
pako
I don't think it is possible to forbid reading of only a certain part of a repository, as you have a local copy of the *whole* repo. Otherwise it would break the integrity of the repository (such as patch checksum). Another solution you can try is to divide your code in differents repository with their own read permissions. And eventually use plugin such as [http://mercurial.selenic.com/wiki/ForestExtension forest] or [http://mercurial.selenic.com/wiki/subrepos subrepo] to handle them.
chub
ForestExtension is completely out dated. Definitely subrepos if you need to go that way.
Ry4an