将TFS分支设为只读 [英] Making a TFS Branch Read-Only

查看:130
本文介绍了将TFS分支设为只读的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在尝试遵循 TFS分支指南中的分支策略,并且已经达到了

We are trying to follow the branching strategy from the TFS Branching Guide and have reached the point where we have made a branch representing a release, which should now be made read-only.

在分支的属性 |安全性选项卡中,它显示六个用户组,每个用户组具有10个权限除了阅读。我是否必须仔细检查60个复选框中的拒绝,还是有更好的方法将该分支设置为只读?

In the Properties|Security tab for the branch, it presents six user groups each with 10 permissions other than Read. Do I have to go through and click Deny on 60 check boxes, or is there a better way to make this branch read-only?

推荐答案

在源代码管理资源管理器中右键单击分支,然后选择 Lock ... 选项

Right-click the branch in the Source Control Explorer, and select the Lock... option

编辑:
人们发现这一点时似乎会错过很多,所以我将使其更加明显。

This seems to get missed a lot when people are finding this so I'll make it more obvious.

对于锁定该项的人,锁定显示为待更改。只要锁定生效,它就会显示为挂起的更改。对该未完成的更改进行提交后,该锁将被释放。当锁定生效时,锁定分支实际上是只读的,因为(为简化起见)锁定者是唯一可以提交的用户。提交的行为是释放分支上任何锁的原因。

Locks appear as a "pending change" for the person who locked the item. As long as the lock is in effect, it will appear as a pending change. When a commit is made of that pending change, the lock is released. While the lock is in effect, the locked branch is effectively read-only, since (to simplify) the locker is the only user who can make commits. The act of committing is what releases any locks on the branch.

h / t @AakashM在注释中指出了这一点

h/t @AakashM for pointing that out in the comments

这篇关于将TFS分支设为只读的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆