How do I find and view a TFS changeset by comment text?

TfsTfvc

Tfs 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:

  1. Open Source Control Explorer
  2. "View History" from the root of TFS server
  3. Scroll to the bottom (it's fast with hitting "End" button continuously)
  4. Select all records, copy
  5. 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

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

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 the tf.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 runs tf.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).

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionRalph ShillingtonView Question on Stackoverflow
Solution 1 - TfsKent HuView Answer on Stackoverflow
Solution 2 - TfsAniView Answer on Stackoverflow
Solution 3 - TfsRichard BergView Answer on Stackoverflow
Solution 4 - TfsDavidView Answer on Stackoverflow
Solution 5 - TfsChristoView Answer on Stackoverflow
Solution 6 - TfsstuartdView Answer on Stackoverflow
Solution 7 - TfsVaccanoView Answer on Stackoverflow
Solution 8 - TfsLauri LubiView Answer on Stackoverflow
Solution 9 - TfsPhillip NganView Answer on Stackoverflow
Solution 10 - TfsSpockView Answer on Stackoverflow
Solution 11 - TfsAlignedDevView Answer on Stackoverflow