How do I find and view a TFS changeset by comment text?
TfsTfvcTfs Problem Overview
With TFS I need to find a changeset by comment, and/or by developer. Maybe I'm just blind today, but I don't see a simple way in the Source Control Explorer to do this task?
Tfs Solutions
Solution 1 - Tfs
If you have TFS Power Tools installed, you can run this in a command prompt:
tfpt searchcs
to get a GUI window with options to search by committer and comment text. I'm using TFS Power Tools (March 2011 version) and TFS 2010.
Solution 2 - Tfs
EASY WAY and no 3rd party apps/add-ons needed:
- Open Source Control Explorer
- "View History" from the root of TFS server
- Scroll to the bottom (it's fast with hitting "End" button continuously)
- Select all records, copy
- Open Excel and paste
Now the Excel will allow you to search through comments (Excel's a native app, don't argue..).
Solution 3 - Tfs
With the Power Tools installed:
tf history $/ -r | ? { $_.comment -like '*findme*' }
Solution 4 - Tfs
There's a Visual Studio add-in that does it now: http://visualstudiogallery.msdn.microsoft.com/3f65dee8-5a44-4771-929b-26531c482fbf.
Solution 5 - Tfs
Alternatively, without having to install power tools, the following command will work if your looking for the search term findme.
Windows: tf history "$/Team Project/Development" /noprompt /recursive | findstr findme
Linux: tf history "$/Team Project/Development" /recursive | grep findme
NB. Please thank this guy if you found this useful.
Solution 6 - Tfs
You can use the command line client: pipe the output of tf history to a file and then use whatever search program you prefer.
Solution 7 - Tfs
I don't know a way to do it by Comment Text, but this will allow searching by developer:
If you open the menu item File->Source Control->Find In Source Control->Changesets... (you must be in Source Control Explorer for this to be available). This will open the Find Changesets dialog. You can then search for change sets by Developer on a given source folder (or project).
This will show you the comments, but you can't search by them. (Though you can sort the list by the comments and find the comment you are looking for that way.)
On a side note, if you want to see the details of the changeset via this dialog you have to click the Details button. Double clicking on a changeset closes the dialog.
Solution 8 - Tfs
Find Changeset By Comment 2013 for Visual Studio 2013 http://developer.azurewebsites.net/2014/08/find-changeset-by-comment-2013-for-visual-studio-2013/
Solution 9 - Tfs
To see the checkins for a team member:
In team explorer, navigate to the Team Project, navigate to Team Members, right click the team member for who you want to see the changesets, and select "Show CheckIn History".
Solution 10 - Tfs
I added tfpt searchcs
from the TFS Power Tools as external tool in VisualStudio:
- Command:
C:\Program Files (x86)\Microsoft Team Foundation Server 2015 Power Tools\TFPT.EXE
(or wherever you installed your TFS Power Tools) - Arguments:
searchcs /collection:http://tfsserver:8080/tfs $(SolutionDir)
(the solution path is converted to the server path) - Initial Directory:
c:\path\to\your\vs\IDE
(unless thetf.exe
is in your path (what is not the case by default) this ensures you can view the changeset details from the search dialog, for it runstf.exe
)
Solution 11 - Tfs
I was able to do this in the TFS web portal code section.
Navigate to TFS in your browser, go to code, click on changesets, then advanced search. You can filter by user and date range. You can not search by comment, but if you have a general date range in mind then you can filter it down then use the browsers search (ctrl + f).