Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find changeset id parent of a branch in tfs

Tags:

branch

tfs

With TFS, could someone tell me how to find the id of the changeset of the last commit common to 2 branches (or the trunk and a branch)?

It's easy to find the id of the first changeset of a branch (with 'tf history') but I could not find the parent of this commit :( Tfs seems to not keep (or display) this information!

Note : Take the previous commit id (ex : 119 if the first changeset id of the branch is 120) is not a solution because changeset id are incremented by all the commits on any branches on any projects in the tfs server (so the previous commit could be taken by another project, another branch of the same project)

I'm interested by a solution with the command line using tf command AND with the GUI...

like image 665
Philippe Avatar asked Feb 19 '23 21:02

Philippe


1 Answers

I wrote a blog post exactly about that: http://netexp.blogspot.com/2012/11/tfs-who-is-father-of-my-branch.html

In brief:

  1. It can be done via Visual Studio GUI (Track Changeset functionality). You need to track the first changeset in your child branch and then find max changeset in the parent branch (see a screenshot in the blogpost for details).
  2. It can be done via TFS Client API.
  3. You can use a simple command line app I developed.
like image 108
johnnyjob Avatar answered Feb 26 '23 12:02

johnnyjob