Friday, June 06, 2008

Insane vs. Sane

Today the only difference between a sane and an insane man is a blue light...

 

of the Bluetooth headset in his ear.

Both are speaking loudly in the street without anyone beside them.


if it is lightening - he is normal.
if it is turned off - he is insane.

What a world.

Tuesday, May 13, 2008

Microsoft .NET Framework 2.0 Service Pack 2 (Beta, and now RTM too)

Microsoft does it again...

Last time Microsoft released .NET Framework 3.5 they have included .NET 2.0 SP1 inside it, and it took them very long time to release a document telling what have been changed in this SP1.

Today Microsoft .NET Framework 3.5 Service pack 1 Beta has been released.
and Microsoft even tells what inside this SP1 (see the download page overview section)

it is written there (on the Brief Description) that it includes .NET Framework 2.0 service pack 2 too.

BUT...

They haven't released a stand alone .NET 2.0 SP 2...
And worst - They haven't told what have been changed in this .NET 2.0 SP 2.

This information is critical - as most of current running applications are built on .NET 2.0 (with or without SP1)

So we (the developers) need to know if there are any "red bits" on this SP2 or not.
We need to know what have been changed - so we would be able to decide which type of testing we need to do before applying this SP2.

So if someone have this info - Please release it.

Thanks in Advance...

p.s. all stand for .NET Framework 3.0 service pack 2 too...

 

UPDATE:

You can find .NET Frameworks 2.0 SP2 and 3.0 SP2 bootstrapper packages (RTM, I hope) by following the link (from MSDN). I haven't tested it.

If you prefer a very funny movie instead... (from the company I work for - proper disclosure)

Monday, May 12, 2008

Control two computers with one mouse (Synergy)

Are you working with a a desktop and a laptop on the same desk?
If so, you probably mix up the mouse all the time...

No more!

Try this wonderful utility: Synergy

It lets you work with just one mouse and control both computers!

See video review on CNET: http://reviews.cnet.com/4660-10165_7-6663696.html

I just love it.

Thursday, May 01, 2008

2 New versions for TFS Follow Branch History Add-in for VS

As you might know, at the end of year 2006, I have created an open source project called TFSBranchHistory on CodePlex.

The goal of this project was to fulfill the missing feature of full branch history of items in TFS explorer GUI.

Yesterday we have uploaded 2 new releases for this project:

0.9 Beta: (click to download)

This release contains improvements written by mlabelle:

1) ability to recursively iterate over the whole history across all branches
2) ability to open an item directly into Visual Studio instead of notepad
3) ability to sort the listview columns with an additionnal key on changeset ids
4) using a persistable and dockable toolwindow instead of a popup form
5) preventing the ability to view/compare deleted items (that crash the addin otherwize)
6) using a custom icon in a satellite assembly (instead of the smiley face)
7) using lowercase for changes, removing the domain name from the user
8) using a standard font for the controls to make it look more like the builtin history

It also contains Eyal's Feature:

1) label history has been added to the history form

New_GUI

0.91 Beta for VS2008: (click to download)

As you can undaerstand from its name, this release is working with Visual Studio 2008 (instead of Visual Studio 2005 of 0.9 Beta)

There is a minor issue regarding the tool window picture, as Microsoft changed the way you add it in VS2008 and I haven't yet the time to solve it.

 

As I wrote on the TFSBranchHistory project home page, the lifetime of this project isn't going to be so long, as I hope most of its features are going to be delivered out of the box on Rosario.

Anyway, I would be glad if you download it and use it.

As always, If you have ideas for more features, or you want to report a bug, please feel free to do it (either leave here a comment, or open an Issue on the Project's CodePlex site.

Wednesday, April 23, 2008

Araxis Merge integration with TFS - Team System - Visual studio

I'm not a big fan of the built in Merge tool that comes with Microsoft's Team Explorer for Visual Studio.

 Microsoft's Team Explorer built in Merge tool for Visual Studio

I really prefer Araxis Merge interface much much more.
So I have search for a way to integrate it into Team Explorer.

I easily found James Manning's blog about diff/merge configuration in Team Foundation which explains very clearly how to use the "Configure User Tools" under Tools -> Options -> Source Control -> Visual Studio Team Foundation Server".

James tells you exactly what parameters you need to put in the Command's arguments:

/wait /swap /a3 /3 /title1:%6 /title2:%7 /title3:%8 %1 %2 %3 %4

Configure Tool Window

And it really works:

Araxis' 3-Way Merge

BUT...

James's settings work only for Araxis Merge Professional Edition (that supports 3-way merge and compare)

So if you only have Araxis Merge Standard Edition licence (that support only 2-way merge and compare), you need a little bit different setting:

/wait /2 /title1:%6 /title2:%7 %1 %2 %4

and actually I also prefer changing the titles from Microsoft's defaults (Yours, Theirs) to "Source" and "Destination", so my final arguments are:

/wait /2 /title1:Source /title2:Destination %1 %2 %4

and it works! (using 2-way merge)

Araxis' 2-Way Merge

You just need to take into account that the 2-way isn't perfect as your first instinct would probably be to edit the Destination side, but you'll get a warning about "this file is read only". this is because Microsoft never intended that you will edit this file itself. They have created a fourth file (%4) which is the result of the merge.

You can workaround this by telling Araxis Merge to allow editing of the read only file.
This can be done on the specific file level:

Read Only alert 

Or globally by: View Menu -> Options -> Text Comparisons -> Editing -> Allow editing in read only files:

Araxis Options window

Anyway, even if you edit the "Source" file instead of the "Destination" file, Araxis will pass the saved file (if you click ctrl+s or the "save" button - Araxis save the current doc - meaning the doc where your cursor is in) to TFS.

It is a little dangerous as you might be on the wrong doc when saving.

You also have the option to just close the Araxis window without saving, which will pop up a window for you to decide which file you want to save as the merged file:

Save Merged File window

Conclusion:

If you can effort Araxis Merge Professional Edition - go for it.
If not - you can still integrate the Standard edition fairly well.

P.S.

There is one advantage in using the 2-way compare: when you have done lots of changes in one side - instead of copy all of them to the middle and then integrate the other side - you can right away integrate the less changed side into the other.

Just to let you know - You can use 2-Way merge on the Pro edition too.
Use the arguments I have supplied and it will work (because of the /2 flag)

another P.S.

You can find more Integration settings with other Source Control, Configuration Management and Other Applications in Araxis' Web Site

Monday, April 21, 2008

Found In Build - Team Build List - Make it Shorter

You have CI (Continuous Integration) Build running on each check in (or once a day) and the "Found In Build" drop down list in the Bug Work Item keeps growing each day...

You don't need all those builds there - you need only the build which QA actually deploy to their environment.

You can maintain this list manually by editing the Global List which TFS holds for each team project as described by Benjamin Day in Managing TFS Team Build History: Delete Completed Builds From "All Build Types" & Bug Work Item Drop-downs, but this is tedious work to do manually.

You can edit it with the "TFS Power Tools" new menu: 
Tools --> Process Editor --> Global List --> Open Global List from Server

Menu path to Global List editing 
Then select the build you want, right click it and select delete:

image

But it is still manual work.

You can actually use Jason Prickett's Blog to tell TFS which builds should get in the list from the start by adding conditions to the event subscription of the "Build Completion Event". but still you will be able only to filter the non successful builds - not all the builds except the deployed ones.

Actually the main issue here is Microsoft's decision to insert builds into the list on the "Build Completion Event".

 

So now to my (little chutzpa) solution:

  1. Delete the original TFS "Build Completion Event" subscription (as suggested by Jason) - BUT - don't recreate it with a filter.
  2. Write your own web service and implement TFS event handler web method for the "Build Status Change" Event (BuildStatusChangeEvent) (which should have been called "Build Quality Change Event" as it triggers only on quality changed)

    In this handler check if the Quality has been changed from NULL to something.
    If it's true - just call the Notify method on TFS WorkItemTracking Integration web service with the xml it waits for.

    You will need of course to build this xml and bring the missing information from the BuildStore service, but those are easy steps.

    Don't forget to set the HttpRequest's UseDefaultCredentials to true (or pass other valid credential) or you will get unauthorized exception from TFS.
  3. Subscribe your web method to the BuildStatusChangeEvent.

That's all!

Now all you need to do is to instruct your integration team to change the build quality of each build they take to deploy on QA environment from "Unexamined" (or null on TFS 2008) to "Ready For Initial Test".

The BuildStatusChangeEvent will be called, it will call Microsoft's original implementation of adding the build to the Global List, and this is exactly what I want.

See the code at the attached c# file:

Monday, March 24, 2008

My TFS 2008 installation experience

Saturday night - 20:00 - At my home

Connecting to work VPN.

Uninstalling TFS Proxy, TFS Build, TS Web Access, TFS Application layer, TFS DB layer.
Also uninstalling custom web services:

  • CI (continuous Integration) - good riddance... (TFS 2008 has a built in CI)
  • Build Failure Smart Email Notification Service - (will be reinstalled later)
  • Check In notification Service

22:00

last backup before starting.
actually not a standard backup...
I have detach all TFS Databases, and copied the db file and the log file to another computer.

Sunday begins - 00:00

Starting the Installation!
.NET 3.5 already installed so no waste of time here.

00:30

The installer still running...
The installer's CPU is zero.
Checking CPU on the DB - it is working pretty hard. so I let it continue working...

00:45

Still working on the DB side.
Checking the Activity Monitor to see what happens - It works on the Source Control DB.
A short Google search find some blog which says it can take more then an hour if you have a large repository. I do have a large (not huge) repository so I wait.

01:05

A new window pop up with a Progress Bar telling me it updates the source control DB.
Probably Microsoft guessed I have thoughts about canceling the installation...

01:30

The Progress Bar window disappeared. The Source Control DB has been updated.

02:00

The Installer still running...
checking again the activity monitor - Now it works on the TfsBuild DB.

03:30

still on the TfsBuild.
This is the point to tell that before the upgrade I have deleted almost all the build history. so I thought it would take a short time...

Googled again to find there was a bug in Beta 2 regarding this step.
Someone suggested to cancel installation - then delete all data in TfsBuild DB. then retry the installation.

It would be hard to delete all the data as there are relation constraint between the tables...

04:00

Killing the DB Process which has been running for more then 2 hours in the Activity Monitor. it tries to rollback everything.

Deleting the TfsBuild DB.

The Installer pop up a message about failure to upgrade Build DB.
Options: Retry / Cancel.

Bringing it again from backup (attaching it).

Choosing Retry.

06:00

Still on the same process in the Activity Monitor which was started at 04:00...

07:30

My little daughter wakes up.
Preparing breakfast, dressing her up, bringing her to the kindergarten.
(Yes, on Sunday. I'm in Israel. we work on Sundays... which means people will be at work in about one hour and TFS is still in the middle...)

08:00

Heading to work.

08:25 - At work. (yes, I live pretty close to work)

This Process is still running.

deciding to take drastic step:
Installing a clean TFS Database layer on my own computer (not the server).
Backing up the TfsBuild DB from my machine.
Deleting the TfsBuild DB from the server again (pop up again...).
Restoring my Clean TfsBuild DB to the Server.

08:50

Choosing Retry.

09:10

Installation completed successfully !!!!!!!!!!!!


People start to come asking if they can start working. Yes they can.

What has been lost (except from sleeping)? - empty Build history.
The Build descriptions are kept anyway in the source control on TFS 2005 - so they have been restored once I have open team explorer and got latest version for them.

Couldn't be easier, could it?