I was working with a shop recently that
wanted to be able to do very fine-grained deployments (of a web application) into
production. They were pretty far into their Team Foundation Server adoption,
and wanted to be able to deploy the files contained in the changeset(s) that were
tied to a particular work item.
So, for instance, to close a particular bug work item, three changesets might be checked
in (each associated with that work item.) Each of these changesets might comprise
multiple files. When preparing to stage the fix, the client wanted to simply
say “go get work item 1237” and have the right thing happen (i.e. all files retrieved,
preserving folder structure) – even without a workspace defined.
They were happy to let me share the solution with you, so you can download it here.
You’ll have to build it yourself, pointing at the correct TFS assemblies.
It is a command line utility – the command line help is as follows:
GetCSForWI v1.0.0.0 Copyright 2007 Retrieves files associated with changesets or changesets that have been associated with a particular work item. Usage: GetCSForWI.exe [@argfile] <tfsServer> [/changeset:<changesetNumber>] [/workitem:<workitemNumber>] [/path:<localFolder>] [/help|?|h] [/version|v] @argfile Read arguments from a file. tfsServer TFS Server name /changeset <changesetNumber> Changeset number to retrieve /workitem <workitemNumber> Workitem number to retrieve changesets for /path <localFolder> Local folder to copy to (after getting to workspace) /help Show usage. /version Show version.