Find changeset id parent of a branch in tfs

北慕城南 提交于 2019-12-01 05:06:00

问题


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...


回答1:


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.


来源:https://stackoverflow.com/questions/12835798/find-changeset-id-parent-of-a-branch-in-tfs

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!