简体   繁体   中英

How can I check who has a specific file checked out in TFS?

How can I check who has a specific file checked out in TFS?

In Visual Studio 2008, a file in the project is marked as checked out.

If you are meaning through Visual Studio 2008 and not in a programmatic way then a simple method to do so is:

Get to Source Control Explorer (Pull up Team Explorer and Click on Source Control). Then navigate to the file you have are checking on and there is a column for which user has that particular file checked out.

Inside Visual Studio, the Solution Explorer interface is fairly limited -- it has to support a standardized feature set in order to interface with all SCC providers.

The Source Control Explorer (view -> other windows -> source control explorer) is native to TFS and much more powerful. Here you can browse the server-side view directly. The details pane on the right has a column where you can see checkout information.

However, if several people have the file checked out, it won't be able to show everything. A complete dump of the checkout records is available from rightclick -> Properties -> Status. Or you can run the command line *tf status $/path/to/item /user:**

Visual Studio also has this bad habit. It seems that file is checked out by somebody else in Solution Explorer, but actually it isn't. Refresh doesn't work. Source Control Explorer shows this correctly.

Updated answer for Visual Studio 2015

Unfortunately, while you can see the purple person icon ( 不要与紫色食人魔混淆 ) in the Solution Explorer (indicating someone else has it checked out), you can't see who has it checked out there, and have to go over to the Source Control Explorer and look at the User column:

带有“用户”列的源代码管理资源管理器

But this still will not show you everyone who has it checked out (instead, users after the first are replaced by [more] as seen above). For this you need to open up Developer Command Prompt for VS2015 (which is just cmd.exe with a preloaded batch file, the shortcut is usually in C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Visual Studio 2015\\Visual Studio Tools ) and type in:

tf status .\proj.csproj /user:*

replacing ".\\proj.csproj" with a relative or absolute (starting with TFS's $) path to the item that is checked out.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM