How can I see all items checked out by other users in TFS?

后端 未结 4 900
慢半拍i
慢半拍i 2020-12-29 03:59

I want a list of all the checked out files, by all users, in a project in TFS 2005. All I can see now are my checked out files - in the pending changes window. I re

相关标签:
4条回答
  • 2020-12-29 04:28

    The October 2008 edition of the TFS Power Tools includes "Team Members" functionality that allows you to do this, and more.

    There is more information on this feature on Brian Harry's blog.

    0 讨论(0)
  • 2020-12-29 04:30

    Power Tools option: "Open Visual Studio > Click File > Source Control > Find In Source Control > Status Select "Display all checked out" or "Display files checked out to" (to filter changes by user) Hit Find"

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

    __

    Another way using .net (complete 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

    0 讨论(0)
  • 2020-12-29 04:41

    I use:

    tf status itemspec /user:* /recursive 
    

    in the VS Command Prompt. itemspec is the TFS path to the item you want to search for checkouts. No extra installations needed ;)

    0 讨论(0)
  • 2020-12-29 04:45

    I usually use TFS SideKicks for this.

    0 讨论(0)
提交回复
热议问题