【问题标题】:How can I see all items checked out by other users in TFS?如何在 TFS 中查看其他用户签出的所有项目?
【发布时间】:2014-09-30 22:35:29
【问题描述】:

我想要 TFS 2005 项目中所有用户签出的所有文件的列表。 我现在只能看到 my 已签出的文件 - 在挂起的更改窗口中。我记得在 Source Safe 中有这样一个选项 - TFS 2005 中有一个吗?

【问题讨论】:

    标签: tfs


    【解决方案1】:

    我用:

    tf status itemspec /user:* /recursive 
    

    在 VS 命令提示符中。 itemspec 是要搜索结帐的项目的 TFS 路径。无需额外安装 ;)

    【讨论】:

    • 顺便说一句,如果有很多结帐,将其输出到文本文件会很有用。 tf status itemspec /user:* /recursive > C:\Checkouts.txt
    • 我最终从这个命令开始,我的最终命令如下所示。我的目标是创建一个统一的输出,然后我可以以编程方式使用它。 tf status /user:* /recursive /format:detailed >C:\CheckoutsDetailed.txt
    • tf status itemspec /user:* /recursive -> 如果未提供工作区或该工作区位于另一台计算机上,则在使用 /user 选项时不会显示来自本地工作区的更改。没有待处理的更改。 我需要添加 ./ tf status ./ itemspec /user:* /recursive -> 15498 更改
    • tf status /user:* /recursive
    • 我还必须包含收藏:tf status /user:* /recursive /collection:https://tfs.MyServer.com/MyCollection
    【解决方案2】:

    October 2008 edition of the TFS Power Tools 包含“团队成员”功能,可让您执行此操作等等。

    Brian Harry's blog 上有更多关于此功能的信息。

    【讨论】:

    • 发帖者似乎使用的是 TFS 2005
    • 啊!好吧,肯定是他们升级的时候了?! :-)
    • 我们将 Team Explorer 升级到了 2008! (并留在团队服务器 2005)
    【解决方案3】:

    我通常为此使用TFS SideKicks

    【讨论】:

      【解决方案4】:

      Power Tools 选项:“打开 Visual Studio > 单击文件 > 源代码管理 > 在源代码管理中查找 > 状态 选择“显示所有签出”或“显示签出到的文件”(按用户过滤更改) 点击查找"

      http://geekswithblogs.net/MikeParks/archive/2009/09/16/tfs---view-all-pending-changes-for-all-users.aspx

      __

      另一种使用 .net 的方式(完整 source

      using(var tfsPc=new TfsTeamProjectCollection(tfsUri))
      
          {
              var vcs=tfsPc.GetService<Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer>();
      
              var srcRoot=vcs.GetItem(srcpath);
      
      
              var pendings=vcs.QueryPendingSets(new[]{srcRoot.ServerItem}, RecursionType.Full,null,null).AsEnumerable();
              if(onlyLocks)
                  pendings=pendings.Where(pq=>pq.PendingChanges.Any(pc=>pc.IsLock));
              if(minDate.HasValue)
                  pendings=pendings.Where(pq => pq.PendingChanges.Any( pc => pc.CreationDate > minDate.Value));
              var pendingQuery=pendings
                  .OrderByDescending(p=>p.PendingChanges.Max(d=>d.CreationDate));
              pendingQuery.Dump("pending");   
      
      
          }
      

      similar to above, but join the ActiveDirectory to get a user's name

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2014-10-11
        • 2015-11-13
        • 1970-01-01
        • 2013-07-13
        • 2010-11-29
        • 1970-01-01
        • 2021-10-27
        • 2012-07-14
        相关资源
        最近更新 更多