Tuesday, February 8, 2011

Cross-branch merges in TFS, yes it's possible!

I've run across a scenario where I need to do a merge from one branch to another branch that's neither the child nor parent of the source branch.
Trunk------
     \
      \Branch one------
               \
                \Branch two------
This is an odd scenario, and we got here by mistake, but I need to make changes to Branch two, then merge the changes into the Trunk without affecting Branch one. No further development is being performed in Branch one.

This cannot be performed through the Visual Studio TFS graphical interface, but you can launch this type of merge from the command line. See this article about baseless merges.

Here's what to do and what happens. From a VS command prompt...
tf merge /baseless c:\data\proj1 c:\data\proj2 /recursive /version:C123~C125
The first path is the source branch; the second is the destination.
The version "C" stands for changeset, and the changeset numbers follow. You can give a range or make the numbers the same to do a single changeset.

This will do the merge and present you with the graphical merge dialog you're used to seeing. I suggest using the merge tool to merge changes manually so you get only the changes you want. Auto-merge may bring in changes you didn't intend.

This just saved me a lot of time today.

Thursday, February 3, 2011

Google Voice, Incoming Phone Calls, and Chrome's App Mode

If you have a Google Voice account, you've probably noticed that you can make a phone call with your PC right from Gmail. You've also probably noticed that when you accidentally close your browser window, your call is dropped. This has bitten me may times.

Chrome to the rescue! You can launch Chrome in App Mode, so you get a nice browser window with no menus buttons, etc. It just looks like its own application running on your desktop, and Gmail can live in that window. Since you won't be able to browse with that window, you're far less likely to close it accidenally, and therefore not lose your phone call in progress.

You can launch Gmail in Chrome's "app mode" by typing:

  chrome.exe --app=http://www.gmail.com

Now gmail is running in a special browser window, and you can make your calls right from there.

Also, and this is sooo cool...you can receive calls too! From your Google Voice account, http://voice.google.com, click Settings in the upper right corner, and choose Voice settings. Check the box next to Google chat to have your google phone number forwarded to your gmail window. Yep. it's just that easy!