Time for a little bit of a teaser post…
We’ve been working on the next Power Tools release for Team Foundation Server 2008 for a while now. I think I mentioned before that we really wanted to make this next release a "major" Power Tools release and I’m happy to report that I think we have accomplished it. I think you are going to be incredibly happy with work we’ve got coming out. We are just wrapping up development this week. It will then take a few weeks of verification and "shipping" process. I’m hoping to get the update out in late October as the "Team Foundation Server Power Tools – October ’08 Release". One bit of expectation setting I want to do is that because this release contains such a substantial surface area of functionality, I kind of think of it as a "beta" or "pre-release" of the capabilities. What I mean is that it really isn’t done. It’s far enough along to be very useful but there’s plenty of more things to do. What I have in mind is basically having the Decemberish Power Tools release essentially be "Part 2" of this work. Between now and then we will finish up some things we already know we need to do and will be looking hard for feedback from you for things you want.
Enough with the preamble and on to the meat…
There are 3 major new components to the October Power Tools release and the usual incremental improvements.
- Team Members – We’ve added a new node to the Team Explorer called "Team Members". It appears under each Team Project and is used to identify who are the people who work on the project. It serves as a "pivot point" for information about and operations on people and teams.
- Windows Shell Extension – We’ve built a Windows shell extension that allows you to do the core version control operations directly inside the Windows Explorer without using the Team Explorer.
- PowerShell Support – We’ve started working on a PowerShell pipeline and commandlets for TFS. Our initial set support basic version control operations but over time we plan to add work item tracking, administration, build and more.
Note: This post is not intended to be a "how-to" post. I will post separate posts on each feature that go into more detail on how to make all of this work.
Team Members
The Team Members node in Team Explorer allows you to identify the people who are participants in a project and organize them into sub teams if necessary. It relies on the TFS group management system and its integration with Windows/Active Directory. It enables performing a variety of TFS operations where "people" are input to those operations. Also it takes advantage of the team organizational structure to organize information that is particularly relevant to specific teams.
Once you have defined what TFS group represents your team, you will see new information in the Team Explorer. You can see here the new "Team Members" entry and a breakdown of the TFS Team into subteams. You will also notice that there is a presence indicator next to each person in the Team Explorer. That’s due to the fact that we have built fairly substantial IM/Collaboration integration.
When you select a user or a group additional information is displayed about them in the VS Properties window.
Things you can do with People
When you right click on a user, you start to see the kinds of things you can now do with this new Team Members Power Tool.
The top section is all of your communication functions. You can start and IM conversation with one or more people, do computer to computer audio, video, send and email or call on the telephone (assuming you computer is configured for it). If you IM provider supports it (In this case, Office Communicator does), you can tag people for notification when their presence status changes.
The next section enables you to version control operations using people as a pivot. My favorite scenario is that I want to do a code review for someone so I right click on them, choose Show Shelvesets… and easily see their shelvesets available for review…
I also like that I can easily see what someone is currently working on by selecting "Show Pending Changes"
And see what they’ve recently checked in with "Show Checkin History"
The following section is a configurable list of work item queries. Each query has in it somewhere, an "@me" query parameter. When you right click on a user and choose a work item query, @me is replaced with the user’s name and the work item query is executed. So, for example if I wanted to show all of Craig’s work items, I’d get… Of course, since the queries are configurable, you can make them anything you like.
The final section is for organizing your sub teams. You can cut/copy/paste/delete people in groups. You can, of course also do this the traditional way with the Team Project Settings -> Group Membership dialog but this provides a more convenient way to do it. The Team Members node also supports drag & drop to rearrange your sub teams.
Things you can do with Teams
When you right click on a team, you get a slightly different menu…
The first section is actions people want to perform on the team. The only one we support right now is "Create Workspace". Create Workspace is there to solve the following problem. Someone new joins your team and wants to start working on the source code. They need to get it all on their machine but they are not sure what all source they need or how it needs to by laid out. As part of a team definition, you can define a workspace template for your team. Creating a workspace will use that template to create a workspace and give an experience like this…
This first tab in the wizard allows you to specify a name for the workspace and a "root" path on your hard drive where you want to put the source code. You can also type a description for your workspace and request that all the source code be automatically retrieved when you click "Finish" (or not).
You can hit "Next" to preview what the created workspace will look like.
You can also parameterize your workspace template with a branch so that you can use the same workspace template for multiple branches and the workspace creation dialog will include another entry field for the branch to create the workspace for.
The next section on the Team right click menu is a configurable list of urls that are important to your team. They could be links to specs, wikis, or anything else that is important to you.
Following the urls is a section of work item queries much like the work item queries on the "people" menu. The primary difference is that these are not parameterized with an @me macro. They are just whatever queries are relevant for your team and no parameter substitution is performed when they are selected.
Next is the section that allows you to arrange your sub teams (much like on the "people" menu, but there’s more you can do with subteams).
Finally comes the "settings" section. In the menu I included here you see the Team Settings… option which allows you to define team options that are shared by the whole team. If you right click on the "Team Members" node, you will also see a "Personal Settings…" menu option. It allows you to configure options that are specific to your use of the Team Members functionality for a given Team Project.
I won’t post every screen in the settings dialogs because it would be a ton. I’ll just give you a little flavor. For instance, here’s the tab that enables you to configure the list of work item queries for the individuals on the team.
Custom components
The last thing on the Team Member Power Tool capability that I want to talk about is how custom components are installed on TFS clients. TFS is a VERY customizable system. Part of our customization story is custom components that can be installed on your clients and will work together with the server to give a desired experience. The two most common examples of this are Checkin Policies and Work Item Custom Controls. Since the day we introduced those features, customers have asked for a way to distribute custom components like these to clients rather than having to manually install them. Well, I’m happy to say that this new release of the Power Tools does just that!
Due to the fact that downloading custom components and running them on clients can be dangerous, there’s a fair amount of care taken and some configuration necessary to enable it. Custom components for a Team Project are checked in to a new "special" folder called $/<TeamProject>/TeamProjectConfiguration. Let me show you a few screen shots and that will help walk you through how this works.
Checkin Policies should be checked into the CheckinPolicies folder and Work Item Custom Controls should be checked into CustomControls. The TeamDefinitions folder is where information gathered by the "Team Settings…" dialog is placed. You will want to restrict access to these folders appropriately so that people can’t silently distribute random code onto other people’s machines.
Whenever a Team Members node in the Team Explorer is loaded or refreshed, the contents of these folders are downloaded onto each client. The Personal Settings dialog controls what happens then. By default (if you never change your personal settings), that’s it and the custom controls and checkin policies will not actually be installed for use. Here’s what the Personal Settings dialog looks like.
The first setting controls what group to use as "your team" for the selected Team Project.
The second controls whether or not team members are automatically added to you IM contacts list so that you get presence change updates as they come and go.
The next few have to do with the custom components we are talking about. What you see is the default settings with "Install downloaded custom components" disabled. If you check it, the custom components will be installed whenever they are downloaded (See the docs in the Power Tools release for details around what "installation" means). Whey you enable installation, the "Verify strong names before installing components" checkbox is enabled. By default it will only install components that are signed with one of an approved list of strong name keys (Again, see the docs for details of how to configure this). What I imagine (and hope) most people will do is distribute a list of approved keys to their clients, enable installation and sign all of their custom components with their keys.
The final setting in this dialog is how you configure your collaboration provider. It’s a good segue into the last thing I want to talk about on the Team Members Power Tool.
Collaboration Providers
Because there are numerous Instant Messaging systems out there and we can’t possibly build integration with all of them, we have built an extensible system that allows you to build integration into whatever IM system you use. There is small set of public interfaces that you must implement and then you can fully integrate your IM system into Visual Studio Team System. I’m hoping we’ll see some CodePlex projects go up quickly to create these plug-ins. We’re happy to provide all of the information we can. "Out of the box" we install providers for Windows Live Messenger and Microsoft Office Communicator.
I don’t expect the screenshots to stay completely accurate for very long. We’ve still got lots of ideas for improvements but I think what we have now is pretty terrific and we’re looking forward to your feedback.
Windows Shell Extension
We’ve built a Windows Shell Extension that allows you to do version control operations directly from the Windows shell. No need to run VS/Team Explorer to do basic stuff any more. It will even show up in the open/save common file dialogs of your favorite applications – giving you instant application integration.
Windows Explorer will display glyphs that indicate the status of files and includes a right click menu for version control operations. It’s been a fairly common customer request since we shipped TFS 2005 and I’m happy to be providing it. Here’s what a folder looks like on my machine.
The little green triangle in the lower left corner indicates that a file is under version control (note buildc.log doesn’t have one). The little pencil on the lower left (as in ConfigFileManager.cs) indicates the file has a p ending change. The context menu looks like this.
and contains the most common version control operations that you will use. More sophisticated operations (like branching and merging) will still require the use of Team Explorer. Based on feedback you give us, we’ll build in additional popular operations over time. Selecting these operations brings up the dialogs you are used to seeing with TFS (when appropriate). For example, for Check In, you’d see:
Here’s a screen shot of what it looks like inside the open file dialog in notepad. It would look similarly in Microsoft Word or any other application that uses the common file dialogs.
Hopefully this will make TFS accessible to and more convenient for even more people.
PowerShell Support
We’ve started down the path of creating a PowerShell interface for TFS. PowerShell is an awesome (and relatively new) scripting technology that integrates amazingly well with the .NET Framework. Many products are adopting PowerShell as their primary administrative scripting interface. Microsoft Exchange is a great example of a product with extensive PowerShell support. But in addition all of the capabilities that products expose, you also have the full power of the .NET Framework in your hands. Perhaps the most powerful thing about PowerShell though is the conventions they’ve developed around input and output of commandlets that enables you to easily combine them in surprising ways and do things you wouldn’t have imagined possible.
We’ve just barely scratched the surface with our initial TFS PowerShell implementation but we are hoping that it sparks interest and some of you in the community will engage with us to help us evolve it into a great way to script TFS. For now we have implemented a hand full of version control commands and a pipeline and glue to enable scripting. If you type "help *-tfs*" you will get the following list of TFS PowerShell commands.
Get-TfsPendingChange
Add-TfsPendingChange
Remove-TfsPendingChange
New-TfsShelveset
Remove-TfsShelveset
Get-TfsShelveset
Restore-TfsShelveset
Get-TfsWorkspace
Update-TfsWorkspace
Get-TfsChangeset
Set-TfsChangeset
New-TfsChangeset
Get-TfsServer
Get-TfsChildItem
Get-TfsItemHistory
Get-TfsItemProperty
Select-TfsItem
Here are some examples of some cool scripting things you can do with Powershell and TFS:
Delete shelvesets older than 90 days
Get-TfsShelveset | where { $_.CreationDate -le [DateTime]::Now.AddDays(-90) } | Remove-TfsShelveset
Get a list of all files that changed between two versions
Get-TfsItemHistory $/orcas -r -includeitems -version 575800~576111 | select-tfsitem | %{$_.path}
Get-TfsItemHistory $/orcas -r -includeitems -version LBeta1~LBeta2 | select-tfsitem | %{$_.path}
Show a list of files in a given shelveset that I have local changes pended against.
Get-TfsPendingChange -shelveset TfptReview | Get-TfsPendingChange
Show a list of files that are locked in a source tree.
Get-TfsPendingChange $/orcas -r -user * | where {$_.IsLock}
Destroy all files that are already deleted in a directory tree.
Get-TfsChildItem $/path/to/dir -r -deleted | where {$_.deletionid -ne 0} | Remove-TfsItem -force
And finally, for a really cool one to demonstrate how far you can go… A script that will send an email to everyone with shelve sets more than a year old (note you need to replace all occurrences of you and yourcompany.com with the right values :)).
$smtp = new-object Net.Mail.SmtpClient("smtphost.yourcompany.com")
$smtp.UseDefaultCredentials = $true
$oldSS = get-tfsshelveset -owner * | where {$_.creationdate -le [DateTime]::Now.AddMonths(-12)}
foreach ($owner in $oldSS | select ownername -unique)
{
$body = $oldSS | where { $_.ownername -eq $owner.ownername } | ft name, creationdate | out-string;
$alias = $owner.ownername.remove(0, $owner.ownername.indexof(‘\’) + 1) + "@yourcompany.com";
$smtp.send("you@yourcompany.com", $alias, "Notice: you have shelvesets older than a year", $body)
}
Hopefully this is enough to get you interested in looking into this more.
Other Stuff
In addition to the "big" features I’ve just covered and the standard plethora of bug fixes that we always include in every Power Tools release, there are other smaller features worth calling out.
tfpt unshelve /undo – People often use shelvesets to do code reviews. Sometimes they want to unshelve them to be able to review them carefully. The problem they run into is how to remove all traces of them from their workspace when they are done. You can use tf undo but there are issues. How do you remember which changes were from the shelveset and which were already in your w orkspace? How do you get rid of pending adds (because tf undo doesn’t delete the local file when you undo and add for fear it might be deleting something you want to keep). tfpt unshelve /undo to the rescue! You provide it a shelveset name and it will find all pending changes in your workspace that match the changes in the shelveset and undo them (including deleting the local files for pending adds).
TFS Best Practices Analyzer improvements – With every release we improve the level of diagnostics the BPA tool can perform. In this release we’ve added support for diagnosing SSL configuration issues and for diagnosing more problems that lead to Team Project Creation Wizard failures.
Conclusion
Sorry about the length of this post, but I warned you it was going to be a big release :). This is one of the best Power Tools releases we’ve had so far. I hope you are as excited about it as I am. As I said in the beginning, none of the major features here are as complete as we’d like them to be. We’re imagining that our next Power Tools release focuses on the same areas and we are looking for your feedback on where we should take them. Please let us know what you think we should do.
We are only a few short weeks from "releasing" these awesome new capabilities. I’ll let you know as soon as the download is available. I look forward to your feedback.
Brian
0 comments
Be the first to start the discussion.