开发者

How to prevent Mercurial repos from being able to pull from specific repos

开发者 https://www.devze.com 2023-03-15 18:12 出处:网络
We\'ve worked out a repository structure we\'d like to maintain and under that structure will prevent RepoA from being able to pull from RepoB.How can I setup a repo so that it can onl开发者_如何学Goy

We've worked out a repository structure we'd like to maintain and under that structure will prevent RepoA from being able to pull from RepoB. How can I setup a repo so that it can onl开发者_如何学Goy push to a certain repo but not pull from it?


You can technically push/pull from any location and would probably try to avoid mucking with that flexibility unless you're good at writing hooks. And, if anyone has write access to UAT, you cannot prevent any changes from being pushed to UAT as you will need to do that when some new bits need to enter the UAT branch for testing.

What it sounds like you are trying to do is preserve a "stable" while allowing work to continue on an "anonymous" branch (your alpha) that was cloned from UAT. Eventually, you have to merge that back into UAT, so I would really just give a few senior-level developers write access to UAT and trust that they follow the proper procedure when working with the branches.

I suggest reviewing the Guide to Branching and the Managing Releases section of the Hg Book before trying to invent a new way to seemingly protect your branches.

Edit: I did find a similar question for preventing the default push, but allowing pulls. It shows you the basics on implementing a preoutgoing hook, which is not what you want, but similar in nature.

0

精彩评论

暂无评论...
验证码 换一张
取 消