The Ramblings of Two Microsoft .NET Developers, TFS, and Visual Studio ALM Guys --- "Yes, we are both named Ed."

Undo Changeset in Team Foundation Server Version Control - TFS Power Toys



Update:  If you are wanting to learn how to undo or rollback a changeset using TFS 2010, visit my new blog post about this topic here:  http://www.edsquared.com/2010/02/02/Rollback+Or+Undo+A+Changeset+In+TFS+2010+Version+Control.aspx

 

So...  I really needed to undo a changeset that was previously made by another user and started looking around for it.  I knew you could do it but just hadn't ever had a need for it.  I figure I start right-clicking different places in Source Control Explorer but that didn't lead me to anything :(

Until I remembered there were cool new features in the Team Foundation Server Power Toys.  Once of which was an undo changeset command.  Take a look at them because I know you will find several features handy.  One of my favorites in there as well is Annotate.  (Thanks to Dave McKinstry for previewing that one to us!)  It's basically a solution to point-the-finger game for changes...  It will show a bar on the side next to every line that shows who the last person was that edited it, date/time, and the changeset number.  You can even double-click on the changeset number and the actual details of the changeset will pop-up.  Very handy!

 

Other features in the power toys package: (taken from the documentation)

 

Unshelve Command

Use the unshelve command to unshelve and merge the changes in the workspace.

Rollback Command

Use the rollback command to roll back changes that have already been committed to Team Foundation Server.

Online Command

Use the online command to create pending edits on writable files that do not have pending edits.

GetCS Command

Use the GetCS (Get Changeset) command to get the changes in a particular changeset.

UU Command

Use the UU (Undo Unchanged) command to undo unchanged files, including adds, edits, and deletes.

Annotate Command

Use the annotate command to download all versions of the specified files and show information about when and who changed each line in the file.

Review Command

Use the review command to optimize the code review process to avoid checking in or shelving.

History Command

Use the history command to display the revision history for one or more files and folders. The /followbranches option returns the history of the file branch’s ancestors.

Workitem Command

Use the workitem command to create, update, or view work items.

Query Command

Use the query command to run a work item query and display the results. If you do not provide a specific query, all the active work items assigned to you are displayed.

TreeDiff Command

Use the treediff command to display a visual representation of the differences between files in two server folders, in a server folder and a local folder, or in two local folders.

 

Ed B.



VS 2005 Team Edition for Database Professionals



Community Technology Preview (CTP) 6 is now available for download here. Recently at TulsaTechFest 2006 we attended a session where Dave McKinstry ( Team System MVP ) of Notion Solutions showed an overview of what DataDude is and the benefits it exposes to the software development life cycle. We really think this is an awesome addition to the already great product offering from Microsoft. VSTS is really beginning to bring all silos of development shops under one tool for better communication and manageability.

Ed K.

Posted in VSTS


Tulsa Tech Fest 2006 - Recap



Schedule was great, excitement was high and the Speakers were awesome, TulsaTechFest 2006 was a roaring success and a load of fun! There was a great turnout… I think the final number was around 625 people attending the event. It was great being able to meet and talk to all the big .Net names out there that we all look up too. Some sessions suffered a little due to low attendance. Overall, the TechFest was a success and an enjoyable afternoon in Oklahoma. We are very much looking forward to Tulsa Tech Fest 2007.

Ed and I were also invited to speak on .Net Rocks! We love that show and jump at the opportunity to talk to two of our idols (Carl Franklin and Richard Campbell). Here are some pictures of Ed and I during the .NET Rocks! interview.

Go here to visit Tulsa Tech Fest website.

Go here to see more pictures from Tulsa Tech Fest 2007.

Go here to visit .NET Rocks! Radio Show website.

 

Ed K. & Ed B.

Posted in


IEventService: Filter Expressions, Event Types



When playing around with this Interface you will notice that it is very easy to subscribe and unsubscribe to events via the TFS Object Model.
The method signature for Subscribing to an event is:

 

int SubscribeEvent (
        string userID,
        string eventType,
        string filterExpression,
        DeliveryPreference preferences
)
 

As you can note there is several string values that are needed to pass in. I found no documentation on what eventTypes
or Filter expressions were available.  Hopefully the following information will help you as you develop with the
Object Model.

UserID: simple enough. 
eventType: Out of the Box
  • AclChangedEvent
  • BranchMovedEvent
  • BuildCompletionEvent
  • BuildStatusChangeEvent
  • CheckinEvent
  • CommonStructureChangedEvent
  • DataChangedEvent
  • IdentityCreatedEvent
  • IdentityDeletedEvent
  • MembershipChangedEvent
  • NodeCreatedEvent
  • NodePropertiesChangedEvent
  • NodeRenamedEvent
  • NodesDeletedEvent
  • ProjectCreatedEvent
  • ProjectDeletedEvent
  • WorkItemChangedEvent

To view event types on a certain TFS server you can consume http://ServerName:8080/Services/v1.0/Registration.asmx to enumerate through the list
or, you can use the IRegistration interface and loop through each RegistrationEntry for each EventType.

Filter Expression:

  • PortfolioProject
  • System.AreaPath
  • System.AssignedTo
  • System.AuthorizedAs
  • System.ChangedBy
  • System.ChangedDate
  • System.Id
  • System.IterationPath
  • System.OpenedBy
  • System.Reason
  • System.State
  • System.Title
  • System.WorkItemType

Example expression:

Condition String = "PortfolioProject" = 'Project Name' AND ("CoreFields/StringFi
elds/Field[ReferenceName='System.AssignedTo']/OldValue" = 'Ed Kisinger' OR "Core
Fields/StringFields/Field[ReferenceName='System.AssignedTo']/NewValue" = 'Ed Kis
inger') AND "CoreFields/StringFields/Field[ReferenceName='System.AuthorizedAs']/
NewValue" <> 'Ed Kisinger'

 
Ed K.
Posted in TFS | VSX


Code Name "Orcas" CTP is now available for download



"Visual Studio Code Name "Orcas" delivers on Microsoft’s vision of smart client applications by enabling developers to rapidly create connected applications that deliver the highest quality rich user experiences. This new version enables any size organization to rapidly create more secure, manageable & reliable applications that take advantage of Windows Vista and the 2007 Office System. By building these new types of applications, organizations will find it easier than ever before to capture and analyze information so that they can make effective business decisions." (Microsoft 2006)

Microsoft 2006, Download Center Details 

Ed K.

Posted in


DFW BizTalk Special Interest Group (SIG)



Tim Rayburn of TimRayburn.net is trying to drum up some interest from the DFW area for a BizTalk Special Interest Group (SIG). This is a great idea seeing the need for BizTalk is becoming more relevant for business and there is little talent out there to guide and nurture solid BizTalk solutions for companies. If you are interested please visit his blog and shoot him an email.... Tell him "The Ed's" sent ya. Ed B and I will of course become members of this SIG since we love BizTalk :)

Ed K. & Ed B.

Posted in


Tulsa TechFest



It’s about time we plug Tulsa TechFest. Only 18 more days until the event, so if you have not made plans to be there, then you'd better and  go register now!  Tulsa TechFest is simply put a “Code Camp Gone Wild!”  It is put on by several users groups from several different states.  It’s gonna be awesome!

Sogeti will be there in full force as speakers, including us, “The Ed’s”.  Listed below are the Sogetians that will be speaking and their topics.

Tim Rayburn: NUnit Extensibility                               
http://www.tulsatechfest.com/Default.aspx?tabid=156

Tim Rayburn: Zero Cost .Net                                       
http://www.tulsatechfest.com/Default.aspx?tabid=156

Ed Blankenship & Ed Kisinger: Managing Projects with Team System
http://www.tulsatechfest.com/Default.aspx?tabid=131

Ed Kisinger & Ed Blankenship: Team Foundation Server Object Model
http://www.tulsatechfest.com/Default.aspx?tabid=131

 

We hope to see you there, it will be a blast!

Ed K. & Ed B.

 

Posted in

Upgrade to dasBlog 1.9



Wow... it took a little while but I finally got finished updating our site with dasBlog 1.9, the newest version after about a year of development.  We have to give it the team for their outstanding work!  Many Kudos!

What took so long was upgrading the solution to .NET 2.0 since the application comes as a 1.1 app.  For some help to upgrade the solution to the .NET Framework 2.0 see this helpful post:  http://www.dasBlog.us/viewtopic.php?t=244

Let me know if anyone needs any help with this...

Ed B.

Posted in


TFS Authentication



Say you built an application that connects to TFS and you want a dialog box to appear if a user is not authorized to connect to TFS. To do this is quite simple.  There are two methods you might have seen when you are playing with the TeamFoundationServer object, Authenticate() and EnsureAuthenticated(). The difference between the two is Authenticate will always call the server and EnsureAuthenticated will only be called if the user has not already authenticated to the server. You should use the EnsureAuthenticated method as a performance point since you only want the call to go to the server if the user has not authenticated. Notice we are using the TeamFoundationServer constructor instead of the Factory; you can use the factory if you wish. The deciding point that you need to decide is if you want to reference the same object on subsequence calls and without the need to re-authenticate. Remember the factory method will return a cache instance of the object.

 

TeamFoundationServer tfs = new TeamFoundationServer(TFSServerName,new UICredentialsProvider());

tfs.EnsureAuthenticated();

 

If the user presses cancel on the dialog box then a UnauthorizedException will be thrown ,so handle it gracefully.

 

Ed K.

Posted in TFS | VSX


Connect to TFS via Client Object Model



Here is a simple example of how to connect to a Team Foundation Server and display some of its properties.

To start we need to fire up VS 2005 and create a new console application.

Now that we have a new project we need to add a reference to Microsoft.TeamFoundation.Client.

Now we can access the TeamFoundationServer object. To create an instance of the object we will use the TeamFoundationServerFactory, we are using the factory so that we create a cache version of the object for subsequence calls.

 TeamFoundationServer tfs = TeamFoundationServerFactory.GetServer("FriendlyNameOfYourTFSServerOrURL");

Now lets display some data:

Console.WriteLine("The Authenticated User is: {0}", tfs.AuthenticatedUserDisplayName);
Console.WriteLine("TeamFoundationServer Name: {0}", tfs.Name);
Console.WriteLine("TeamFoundationServer Object GUID: {0}", tfs.InstanceId);
Console.ReadLine();

Here is the OutPut:

Thats it! Very simple and fun.

 

Ed K.

Posted in TFS | VSX