Visual differences of changesets via command-line

August 24, 2009

Scenario : as a developer you want to manually view all the differences between the two last changesets without having to spend your time reviewing file after file in the UI differences window.

Go the command prompt and use the tf diff[erence] command:

tf diff source /version:C22~C23 /recursive /format:unified > C:\Temp\diff.txt

  • source is the name of the folder I want to recursively [/recursive] look up all differences
  • /version:C22~C23 means that I want to find only the differences between changeset 22 and changeset 23
  • /format:unified sets the output type to the Unified format derived from the UNIX based diff –u output format
  • > C:\Temp\diff.txt sends the output to the diff.txt textfile

When finished open the diff.txt file in an editor that supports a difference scheme. In the example below I used Notepad2 to load the output file in the diff scheme.

The information written into the textfile is only the specific region in each textfile that’s different from the previous changeset. It’s a nice way to visually review only the portions of a set of files that were changed. It will save you a lot of time if you otherwise would want to review file by file via the GUI.

Hypervisor not running?!

August 12, 2009

I’m running a dual boot (Win7 / Win2008) on my laptop and after I installed Windows 7 RTM this week-end, the boot configuration was messed up and I had to execute a repair to get Windows Server 2008 back in my boot menu. But apparently these boot configuration changes caused also Hyper-V to stop working : “virtual machine could not be started because the hypervisor is not running”.

To add the hypervisor auto launch back into the BCD store you’ll need to run the following command in administrator mode

bcdedit /set hypervisorlaunchtype auto