有没有一种快速的方法来检查锁定 TFS 中的未决更改?
Is there a fast way to do check in lock on pending changes in TFS?
我知道我们可以转到解决方案资源管理器和 select 文件来检查锁定,但这很慢。是否有任何扩展或选项可以只对所有有未决更改的文件进行签入锁定?
如果你说的是check-in锁。例如:
开发人员 A 已在 FabrikamTFVC 项目中签出 $/FabrikamTFVC/Main/Source/FabrikamFiber.CallCenter/FabrikamFiber.Web/Web.config
,锁类型为 check-in。因此,虽然其他用户可以签出 Web.config
文件,但在开发人员 A 解除此锁定之前,没有人可以签入 Web.config:
在下图中,Web.config
使用 check-in 锁 签出。这由 Pending Change 列中的锁表示:
您可以下载 TFS Power Tools,您可以在下面看到 按状态查找
在源代码管理资源管理器中查找。然后按照以下步骤 -
- From the Source Control Explorer find the folder containing the
locked file(s).
- Right-click and select Find then Find by Status...
- The "Find in Source Control" window appears
- Click the Find button
- A "Find in Source Control" tab should appear showing the file(s)
that are checked out
- Right click the file you want to unlock
- Select Undo... from the context menu
- A confirmation dialog appears. Click the Yes button.
- The file should disappear from the "Find in Source Control" window.
或者您可以尝试使用 Lock command 来解除其他用户对项目的锁定。例如:c:\projects>tf lock /lock:none src/
更新:
您还可以创建自己的自定义入住政策以满足您的要求。 Check-in 策略 每次 文件签入 TFS 源代码管理时强制执行约束。用户必须满足策略限制,才能签入文件。
如何参考这篇博客:Creating TFS Custom Check-in Policy
我知道我们可以转到解决方案资源管理器和 select 文件来检查锁定,但这很慢。是否有任何扩展或选项可以只对所有有未决更改的文件进行签入锁定?
如果你说的是check-in锁。例如:
开发人员 A 已在 FabrikamTFVC 项目中签出 $/FabrikamTFVC/Main/Source/FabrikamFiber.CallCenter/FabrikamFiber.Web/Web.config
,锁类型为 check-in。因此,虽然其他用户可以签出 Web.config
文件,但在开发人员 A 解除此锁定之前,没有人可以签入 Web.config:
在下图中,Web.config
使用 check-in 锁 签出。这由 Pending Change 列中的锁表示:
您可以下载 TFS Power Tools,您可以在下面看到 按状态查找 在源代码管理资源管理器中查找。然后按照以下步骤 -
- From the Source Control Explorer find the folder containing the locked file(s).
- Right-click and select Find then Find by Status...
- The "Find in Source Control" window appears
- Click the Find button
- A "Find in Source Control" tab should appear showing the file(s) that are checked out
- Right click the file you want to unlock
- Select Undo... from the context menu
- A confirmation dialog appears. Click the Yes button.
- The file should disappear from the "Find in Source Control" window.
或者您可以尝试使用 Lock command 来解除其他用户对项目的锁定。例如:c:\projects>tf lock /lock:none src/
更新:
您还可以创建自己的自定义入住政策以满足您的要求。 Check-in 策略 每次 文件签入 TFS 源代码管理时强制执行约束。用户必须满足策略限制,才能签入文件。
如何参考这篇博客:Creating TFS Custom Check-in Policy