Take the 2-minute tour ×

We are using TFS2010 for source control, the source repository has 3 main branches; MAIN, REL and DEV

Consider this scenario: Several developers are working in the REL branch (fixing shipping issues). As they work their changes are checked into the REL branch tested and subsiquently merged back into the MAIN branch.

When developers perform their merge (using the source code explorer in VS2010) if they pick the "selected changesets" option the dialog performs some sort of query and presents them with a list of candidate changesets that exist in the source (REL) branch that have not yet been merged into the target (MAIN) branch.

Given that there may be a delay between the DEV commit and the subsiquent merge we are finding people "forgetting" some changesets.

What I would like to do is create a work item query or Excel report that can reproduce the dialogs query results so we can add this to the projects SharePoint portal.

Specifically: given the current user, and a source and target branch name can I use WIQL or a Excel document to retrieve a list of changesets not currently merged into the target branch.

Can anyone tell if this is possible? and better still tell me how to do it!

The question TFS: List changesets that have not been merged asks a similar question but the aswer alludes to a "write your own code" solution, I would like to pull this off with the "out of the bag" tools; Excel or WIQL.

share|improve this question
(I removed [wiquery] tag, as this has nothing to do with wiquery. I don't know what WIQ is, but should we create a new tag for it? Or tag this with existing [wiql] tag?) –  Jonik Nov 19 '11 at 11:12
Actually it should have read WIQL (Work item query language) not WIQ. I have edited the post, and proposed the WIQL tag. –  Pete Stensønes Nov 19 '11 at 18:51
I am assuming that not terrible ettiquet, adding a tag you just proposed, especially as I orignally tagged with a tag thet didnt exist. –  Pete Stensønes Nov 19 '11 at 18:54
add comment

2 Answers

up vote 1 down vote accepted

Take a look @ this answer

How can I check which branches a TFS 2008 changeset has been merged into?

They outline the tf merge command to list the changesets that need to be merged.

When I had to do something like this I ran a command similar to the one in the answer above and fed it into a text file, with a little bit of tweaking, you could probably turn it into a .csv then open it in excel and filter it by user etc.

share|improve this answer
add comment

To my knowledge, WIQL is all about retrieving exclusively Work Items - so this aspect is a dead end.

share|improve this answer
add comment

Your Answer


