【发布时间】:2014-09-30 22:35:29
【问题描述】:
我想要 TFS 2005 项目中所有用户签出的所有文件的列表。 我现在只能看到 my 已签出的文件 - 在挂起的更改窗口中。我记得在 Source Safe 中有这样一个选项 - TFS 2005 中有一个吗?
【问题讨论】:
标签: tfs
我想要 TFS 2005 项目中所有用户签出的所有文件的列表。 我现在只能看到 my 已签出的文件 - 在挂起的更改窗口中。我记得在 Source Safe 中有这样一个选项 - TFS 2005 中有一个吗?
【问题讨论】:
标签: tfs
我用:
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
October 2008 edition of the TFS Power Tools 包含“团队成员”功能,可让您执行此操作等等。
Brian Harry's blog 上有更多关于此功能的信息。
【讨论】:
我通常为此使用TFS SideKicks。
【讨论】:
Power Tools 选项:“打开 Visual Studio > 单击文件 > 源代码管理 > 在源代码管理中查找 > 状态 选择“显示所有签出”或“显示签出到的文件”(按用户过滤更改) 点击查找"
__
另一种使用 .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
【讨论】: