有没有办法找出在 TFS 中创建特定分支的源变更集? [英] Is there a way to find out the source changeset from which a particular branch was created in TFS?

查看:19
本文介绍了有没有办法找出在 TFS 中创建特定分支的源变更集?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的情况如下.我的团队使用 TFS 2012 进行源代码控制.我的队友从另一个分支的特定变更集(不是那一刻的最后一个)创建了一个分支.我需要的是弄清楚分支是从哪个确切的变更集创建的,以及使用了哪个分支.

My case is the following. My team uses TFS 2012 for source control. My teammate has created a branch from a particular changeset (not the last for that moment) of another branch. What I need is to figure out from which exact changeset the branch was created, and which branch was used.

我试图在 VS 的源代码管理资源管理器的查看历史记录"中找到它.如果与 svn 比较,创建分支的修订版中有一个属性,用于存储初始修订版和创建分支的初始位置.在 TFS 中,变更集详细信息看起来不包含此类信息.

I tried to find it in "View History" of Source Control Explorer in VS. If to compare with svn, there is a property in the revision of creating a branch that stores the initial revision and initial location from which the branch was created. In TFS, changeset details look loke they do not contain such information.

推荐答案

是的,有.discens 是对的,您可能会使用 Track Changeset 功能.顺便说一句,SO上已经回答了类似的问题,在这里.答案包含指向 博客文章的链接 包含许多详细信息,包括 API 和自定义命令行工具.

Yes, there is. discens is right, you might use Track Changeset functionality. By the way, a similar question has already been answered on SO, here it is. The answer contains a link to a blogpost which contains many details, including API and a custom command-line tool.

然而,方式并不是那么明显.为了澄清这一点,以下是如何在 Source Control Explorer 中实现结果的简要分步说明:

However, the way is not so obvious. To clarify this, here is a brief step-by-step instruction of how to achieve the result in Source Control Explorer:

  1. Source Control Explorer
  2. 中找到您的子分支
  3. 右键单击它以获取上下文菜单,选择View History.
  4. 在历史查看器中找到分支的第一个变更集,右键单击它以获取上下文菜单,选择Track Changeset.
  5. 您将看到分支的方案及其继承的结构.在此步骤中,您将找到父对象.
  6. 在每个检测到的分支附近都有一个复选框,但您孩子的父分支通常未选中.先检查一下.必须无条件选中子分支,因此要选中的两个复选框是父分支和子分支.
  7. 不要忘记使用 Browse... 按钮在 Path filter 输入字段中找到您的子分支.
  8. 按底部的Visualize 按钮.您将看到带有代表这两个分支的矩形的图片.父分支矩形应包含此分支中已排序的变更集列表.该列表可能很大,但源变更集(最初创建您的孩子的)应该是最后一个.
  9. ???利润!!!!
  1. Locate your child branch in Source Control Explorer
  2. Right-click on it to get context menu, select View History.
  3. Locate the first changeset of the branch in the History viewer, right-click on it to get context menu, select Track Changeset.
  4. You will see the scheme of branches and the structure of their inheritance. On this step, you are finding out the parent.
  5. There is a checkbox near every detected branch, but the parent one of your child is normally unchecked. Check it first. The child branch has to be checked unconditionally, so the two checkboxes to be selected are the parent and the child.
  6. Don't forget to locate your child branch in Path filter input field using Browse... button.
  7. Press Visualize button at the bottom. You will see the picture with rectangles repesenting these two branches. The parent branch rectangle should include sorted list of changesets in this branch. The list can be huge, but the source changeset (from which your child has been originally created) should be the last.
  8. ???? PROFIT!!!!

您可以在 博文.

这篇关于有没有办法找出在 TFS 中创建特定分支的源变更集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆