Skip to content

Instantly share code, notes, and snippets.

@andyhuey
Last active December 16, 2015 17:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andyhuey/5471084 to your computer and use it in GitHub Desktop.
Save andyhuey/5471084 to your computer and use it in GitHub Desktop.
TFS diff
param (
[string]$cs1 = $( Read-Host "Enter changeset 1 (as c9999)" ),
[string]$cs2 = $( Read-Host "Enter changeset 2 (as c9999)" )
)
[string]$tf = "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe"
[string]$npp = "C:\Program Files (x86)\Notepad++\notepad++.exe"
[string]$tempFile = "$env:temp\tfDiff.diff"
pushd
cd c:\ax2012tfs
& $tf diff cus /v:$cs1~$cs2 /r /f:unified > $tempFile
if ($LastExitCode -eq 0)
{
& $npp $tempFile
}
else
{
Write-Host "Press any key to continue ..."
$x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
}
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment