More power: New power toy release (tfpt) includes VSS-style project difference!

Buck Hodges

[UPDATE 8/9/07]  I fixed the broken link to the power tools page.

Brian Harry announced the latest release of the Team Foundation Power Toys in the post, New TFS Power Toys Available!.  In his post he gives a quick description of each of the new commands and the major enhancements.

One of the most important aspects of this release is that tfpt is no longer buried in a 300 MB download.  Here’s the new slim and trim 1 MB download: http://go.microsoft.com/?linkid=5422499.  That’s a 300-fold improvement!  Don’t expect that kind of improvement in the next release.  😉

After you install the power toys, you will find tfpt.exe in C:Program FilesMicrosoft Team Foundation Server Power Toys.

While Brian gives you an overview of everything, I wanted to point out a few things in particular.

Work Item Tracking commands

Included in this release is a pair of tfpt commands for work item tracking: query and workitem.  These were actually done back in the early spring (Jason Prickett wrote them back when he worked on WIT), but they didn’t make it into the binary that went into the VS SDK and that binary never got updated after February.  Thankfully, that’s all in the past now.

So what’s so cool about a command line for work item tracking?  Well, it gives you a great way to be able to create or modify work items from scripts.  Or maybe just bulk assign all of your work items to someone else.  The commands allow you to run stored queries, run arbitrary WIQL queries, create new work items, update existing work items, output work items in XML, upload and download attachments, and more.

Here are the examples from the help for the workitem command.  Unfortunately, the help produced by the command may be a little confusing because it looks like it takes an option called /fieldvalues and an option called /fields.  The correct option is /fields.

Creating a new Bug work item with a title of ‘New’ and assigned to Jason
tfpt workitem /new project1Bug /fields:”Title=New;Assigned To=Jason”

Updating work item 123 with field values from a file
tfpt workitem /update 123 /fields:@myFieldValues.txt

Updating all work items assigned to me to be assigned to Jason (uses Query)
tfpt query /format:id “project1publicMy Work Items” | tfpt workitem /update @ /fields:”Assigned To=Jason”

Whenever you specify “@” with the /update option of the workitem command, it treats what it reads from standard input as arguments.  So, that last example produces a list of work item IDs from the query command that are then updated to be assigned to Jason.

If you run these commands from a directory that’s mapped to a workspace, you don’t need to specify the server.  Otherwise, you can use /s:http://yourserver:8080 to specify the server.

Online

The online command gets a new option, /diff, that was added by Michal Malecki, a developer on the version control team.  It checks the MD5 hash code for writable files and pends an edit only on files that are different.

Also, the /nuke option has been renamed to /purge.  The functionality is unchanged.

History

The history command is in the old release as well, but I don’t think I’ve ever mentioned why it is significant.  The power toy version is a copy of the regular tf.exe history command, but it has a /followbranches option added by Bill Tutt, a developer on the version control team.  The /followbranches option causes the history command to include the history of any branch ancestors of the file being queried.  Here’s an example.

D:codeCommandLineBuild>tfpt history /followbranches main.cs
Changeset Change               User          Date       Comment
——— ——————– ————- ———- ———————–
102025    branch               somedev       7/29/2006  Branching to create nex

$/Code/v2/CommandLineBuild/Main.cs;C102025 was branched from $/Code/v1/CommandLineBuild/Main.cs;C101367:

Changeset Change               User          Date       Comment
——— ——————– ————- ———- ———————–
101367    edit                 somedev       7/27/2006  fixed a bug
11367     add                  somedev       5/25/2005  Adding the initial supp

This command only looks at branches, not baseless merges (the code uses QueryBranches() and QueryHistory() in a loop).

TreeDiff (VSS-style project difference)

Here’s what so many of you have been waiting for.  A huge number of users have given us feedback that they want a VSS-style project difference GUI.  Sure, there are code samples, but now you can have the real thing!  This was written by one of our summer interns, Taylor, and he did a great job (some of you may recall that tfpt.exe and the first set of commands were written by Philip, one of our summer interns last year).  Brian’s post has this screenshot.

Brian’s post also includes information on the new bind command and updates to the annotate command.

tags: , ,

0 comments

Leave a comment

Feedback usabilla icon