使 TFS 分支只读 [英] Making a TFS Branch Read-Only

查看:30
本文介绍了使 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.

在分支的属性"|安全"选项卡中,它显示了 6 个用户组,每个组具有 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?

推荐答案

右键单击 Source Control Explorer 中的分支,然后选择 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天全站免登陆