Show TFS branch name in Visual Studio Window Title

If you’ve been working with Visual Studio, TFS and have multiple branches in your project, you probably felt lost at times.

Visual Studio doesn’t hint us about the active branch we’re working on unless we explicitly check the local folders. So, it can quickly become a pain to use Visual Studio when working with different branches, especially you need them open simultaneously (often doing a merge), because there’s no way to tell which branch is active on which instance.

This simple, yet effective feature has actually been suggested to and rejected by the VS team.

As a workaround, I used an extension called Customize Visual Studio Window Title, and tweaked its options to show branch names, it’s quite effective.

This extension allows you to include a variety of information in the Visual Studio window title.

Combining parentPath, which represents the physical path to the solution you’re working on, with the depth options, allowed me to strip out the branch folder name. Here’s how it looks:

vs-window-title-blurred
The active TFS branch names are visible on the Visual Studio window titles.
vs-taskbar-titles-blurred
The branch names also become visible on the Taskbar titles.

Configuring this extension separately for each solution is possible, however, it requires you to have an accompanying configuration xml file next to your .sln file.

I’m currently using the following options globally:

  • Closest parent folder depth: 3
  • Farthest parent folder depth: 3
  • Pattern: (⎇ [parentPath]) [solutionName] – [ideName]
vs-rename-title-settings
My current settings to achieve the titles seen above. The folder depth may vary for your appliance.
Advertisements

Creating nice JSON strings on PHP

Hello everyone!

I spent some valuable time last night, trying to create a reliable algorithm to merge two arrays, so i can use PHP’s json_encode() for a simple logging class i’m writing, Loggy.

This morning, i found out that was unnecessary, turns out PHP’s array_combine() method could’ve got it all covered.

Continue reading “Creating nice JSON strings on PHP”

A Simple CGI Phonebook Application

w00t! Hello all,

This is my first blogging experience, ever. So this post will also mean “hello, blogging world!“.

This will be about a homework given by our Perl lecturer Asst. Prof. Dr. S. Yildirim. He asked us to create a CGI Phonebook script that reads Name, Address and Phone info from a file, And make an interactive script to search or navigate in the phonebook.

In the beginning, i thought i’d read all the info into three different hashes, then i’d navigate/search or do whatever i want in them. While i was implementing, something weird has occured. My hashes had anonymous hashes as keys, instead of the integer “ID” value i read from the text file earlier. In order to catch up with the deadline, i gave up with that hashes stuff, and i decided to just read the file again when i’m searching or listing or whatever i’m doing.

Feel free to take a look at the source.

That’s all for now. See you.