Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TFS: List changesets that have not been merged

Tags:

changeset

Environment

TFS 2010. Three branches: Main, Development and Release.

Question

I would like to easily retrieve a list of changesets that have not been fully merged into all three branches.

For Example

Lets says I have a changeset, 100, that was a bugfix and checked in directly into Release. I can use the Tracking feature to visualize that it exists only in Release.

But that requires me to know to look at that changeset. I'm looking for a generic list that would show me any changeset that exists in one branch, but not in all three.

What I know

I know I can compare Release to Main to see the differences. Is that my only option?

I try to associate changesets with work items, so I could query a list of non-closed work items and then as a 'rule', I could verify that a changeset has been fully merged before closing it. And perform code compare to verify.

like image 486
quip Avatar asked Feb 14 '11 18:02

quip


People also ask

How to Track changeset in tfs?

Click the File menu, point to Source Control, and then click View History. In the History window, right-click the changeset that you want to view, and click Track Changeset.

How do I get a new changeset number in TFS?

If you don't know the number, to find a changeset, In Source Control Explorer, on the menu bar, File => Source Control => Find => Find Changesets. The Find Changesets dialog box will appear. (Optional) Next to the Containing File box, choose Browse.

How to Find changeset in Azure devops?

Find a changeset by IDIn Source Control Explorer, press Ctrl + G. The Go to Changeset dialog box appears. Type the number of the changeset and choose OK. If you don't know the number, choose Find.


2 Answers

From the Developer Command Prompt, you can also use the tf.exe merge command.

tf merge /candidate /recursive Release Main

will show you all the changesets that were made to Release but haven't been merged into Main.

like image 66
Scott Avatar answered Oct 01 '22 05:10

Scott


You can get a simple list of changesets through the IDE by choosing the "Selected Changes" option when merging things onto a build.

Another option is to use the API. VersionControlServer has a property named GetMergeCandidates which returns an array of MergeCandidate which has the changeset and if it has been partially merged already as properties.

like image 27
Sean Lynch Avatar answered Oct 01 '22 05:10

Sean Lynch