Thursday, August 21, 2014

Find changeset number by comment

Use VS commandline tool:
Start > Programs > Microsoft Visual Studio 2012 > Developer Tools > Developer Command Prompt for VS2012

How to find broken promises:

For some strange reason, the Visual Studio 2012 plugin Find Changeset By Comment has installation error when I add it on Visual Studio, so I have to use a commandline tool

So that's how I manage to find codes I can't remember the changeset number

That's also how I find the changesets of a code review when the engineer forgot to include the changeset numbers of their code

To automate that task install AutoHotkey, then include this script. #c means Windows+C

InputBox, UserInput, View Changeset List, Please enter a comment,,,,,,,,div.*by.*zero
Run %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\VsDevCmd.bat" & tf history $/ /noprompt /recursive | findstr /i /r /c:"%UserInput%""

So when you press Windows+C this will appear:

The script then runs the TFS commandline tool. The VS plugin can't be installed on my dev machine, but at least I can find changeset anytime even Visual Studio is not open, so I got that goin' for me, which is nice

No comments:

Post a Comment