Thursday, February 21, 2008

How does an TFS geek pack?

Since I have been challenge to respond by my Boss, known in the company as a QUITTER to the moving, here is how I see moving and packing from the TFS point of view:

First of all the shipping boxes would be known as a “Changesets” that may contain many different items. As each item is packed it will get a unique version id. As I move item around I would create new boxes to hold a newly moved item. Interestingly I may actually be able to “clone the item”, since the same item will be part of the different boxes. I may require a Packing Review before any of the packing is committed and the box filled. Once the box is full of the continents an automatic shipping process will kick off to verify that all my packing is done according the shipping standards and that my packing does not break other people packing, the shipping company and all other parties that subscribe to Alerts will be notified of the filled boxes. Not only one shall be able to see the contents and status of the box, but also all the requirements that prompted the filling of the box and how many times it has been re-packed due to the changing shipping/moving rules.

Monday, February 4, 2008

FRAG! I have checked in the code in TFS05 I did not mean. What do I do now?

Hypothetically speaking...

Lets assume that one of my "friends" made a big mistake and have checked in the code into TFS, and broke the build, and screw up the code that was frozen & suppose to be ready to go to the production!

So, what can the "friend" do at this point, considering that once the code is checked in into the TFS source control it does become part of the permanent record.

Well the "friend" has found that the easiest thing to do, besides blaming the PM is to do following:

1. Find the Changeset that was preceding the check-in, one can do it by right clicking on the solution/project/file(s) (I think solution or project would be preferred to ensure that all changes will be rolled back) and selecting "Get Specific Version"; from the Type dropdown select "Changeset" and using the Changeset dialog to display all change for the day or person.

2. Once the code for the selected Changeset is loaded, you still have nothing to check-in, so trigger the checking process, select solution/project/file(s) and select "Check Out for Edit".

3. Now one should be able to check-in the back into the source control by selecting "Checkin Pending Changes".

4. Here is where the fun comes, during the check-in process "Conflict" dialog will popup, one should select the file(s) and click on "Resolve" choice and select "Discard Server Changes".

5. Now that all conflicts has been resolved, repeat step 3.

 

Alternatively, one may download Team Foundation PowerToys (TFPT.exe) and use one of the nifty commands: tfpt rollback /changeset:###; if there are any conflicts detected user is presented with a "Merge" dialog.