TFS 2010:如何使用标签的应用程序的两个版本之间产生的changelog(即工作项列表。)? [英] TFS 2010: How to produce a changelog (ie. list of work items) between two releases of the application using labels?

查看:366
本文介绍了TFS 2010:如何使用标签的应用程序的两个版本之间产生的changelog(即工作项列表。)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种方法来自动生成我的应用程序的两个版本之间的更新日志(实际上是一个工作项列表)。我有我的应用程序,V1和V2两个版本,每个版本是由我建立我的应用程序的设置之前手动创建于2010年TFS(LABEL1和LABEL2)标签标识。
我有一个分支系统,这意味着我有一个树干被大多数漏洞都是固定的,和修补程序的应用大多采用合并从主干分支(但只也有在树枝上的一些修补程序不关注主干)。我的应用程序的两个版本(v1和v2)从分支版本。

I'm looking for a way to automatically produce a changelog (actually a list of workitems) between two releases of my application. I have two versions of my application, v1 and v2, each is identified by a label in TFS 2010 (LABEL1 and LABEL2) that I manually created before building the setups of my app. I have a branching system, which means I have a trunk were most of bugs are fixed, and a branch where patches are applied mostly using merges from the trunk (but there are also some fixes on the branch only that do not concern the trunk). The two versions of my application (v1 and v2) are versions from the branch.

我想TFS 2010年才能够返回被修复的bug列表(即同类型的工作项列表=错误被这两个标签之间关闭和验证)。

I would like TFS 2010 to be able to return the list of bugs that were fixed (ie. the list of work items with type = Bug that are closed and verified) between these two labels.

这个我试过使用TFS 2010的Web用户界面来实现, 。或使用Visual Studio,但我没有找到任何办法

I tried to achieve this using the web UI of TFS 2010, or using Visual Studio, but I didn't find any way.

然后我尝试使用以下命令行询问tf.exe的历史:

Then I tried to ask tf.exe for a history using the following command line:

tf history /server:http://server_url/collection_name "$/project_path" /version:LLABEL1~LLABEL2 /recursive /noprompt /format:brief

,其中LABEL1是已与应用程序的第一版的源代码相关联的标签,和LABEL2已与应用程序的第2版的源代码相关联的标签。
它实际上无法在两个方面:
- 命令行只返回变更集列表,而不是一个相关的封闭式工作项目
名单 - 变更集列表中仅包含我申请的变更在树枝本身,而不是说我还应用和树干,然后合并变更集的分支。设置或不是/ slotmode参数不会改变任何东西。

where LABEL1 is the label that has been associated with the source code of the v1 of the application, and LABEL2 the label that has been associated with the source code of the v2 of the application. It actually fails in two ways: - the command line only returns a list of changesets, not a list of associated closed work items - the list of changesets only contains the changesets that I applied on the branch itself, not the changesets that I also applied and the trunk and then merged to the branch. Setting or not the "/slotmode" parameter doesn't change anything.

有我试着写一段C#代码来检索工作项列表(不在名单的修改集):

There I tried to write a piece of C# code to retrieve the list of workitems (not the list of changesets):

var tfs = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(new Uri("http://server_url/collection_name"));

VersionControlServer controlServer = tfs.GetService<VersionControlServer>();
VersionControlServer vcs = tfs.GetService<VersionControlServer>();

VersionSpec sFrom = VersionSpec.ParseSingleSpec("LLABEL1", null);
VersionSpec sTo = VersionSpec.ParseSingleSpec("LLABEL2", null);

var changesets = vcs.QueryHistory(
    "$/project_path",
    sTo,
    0,
    RecursionType.Full,
    null,
    sFrom,
    sTo,
    int.MaxValue,
    true,
    false); // Slotmode to false

Dictionary<int, WorkItem> dico = new Dictionary<int, WorkItem>();
foreach (Changeset set in changesets)
{
    foreach (WorkItem zz in set.WorkItems)
    {
        if (!dico.ContainsKey(zz.Id))
        {
            dico.Add(zz.Id, zz);
        }
    }
}

foreach (KeyValuePair<int, WorkItem> pair in dico.OrderBy(z => z.Key))
{
    Console.WriteLine(string.Format("ID: {0}, Title: {1}", pair.Key, pair.Value.Title));
}

这实际工作,让我的两个标签之间的工作项的列表,它是其实我想要的东西。但是,只有工作项关联都致力于自身都考虑到分支的变更:解决了树干上这种类型的错误的工作项目,然后合并到分支不会出现。 。Slotmode不会改变任何东西。

This actually works, I get the list of workitems between my two labels which is actually what I wanted. But only workitems associated to changesets that were committed on the branch itself are taken into account: the workitems of type "Bug" that were solved on the trunk then merged to the branch don't appear. Slotmode doesn't change anything.

然后我终于尝试更换被标签与被定义的变更定义VersionSpecs是VersionSpecs:

Then I finally tried to replace VersionSpecs that were defined by a label with VersionSpecs that are defined by changesets:

VersionSpec sFrom = VersionSpec.ParseSingleSpec("C5083", null);
VersionSpec sTo = VersionSpec.ParseSingleSpec("C5276", null);

和我的代码最后的作品。

And my code finally works.

所以我的问题是:我怎么能拿与标签相同的结果,这是我用来识别一个版本的TFS对象?如果这是不可能的,我应该怎么确定TFS 2010版本?
THX。

So my question is: how could I get the same result with labels, which are the TFS objects I use to identify a version? If it's not possible, how should I identify a version in TFS 2010? Thx.

顺便说一句,我发现计算器上的一些问题,但他们都不给我带标签的答案。例如:
问题例如

Btw I found some questions on stackoverflow, but none of them gave me answers with labels. For instance: Question example

推荐答案

我想的 http://tfschangelog.codeplex.com/ 都不可能帮助你在这里。

I think http://tfschangelog.codeplex.com/ can possibly help you here.

TFS更新日志applicatoin允许用户自动生成TFS发布说明。用户必须提供thier项目,部门和变更范围的信息,然后TFS更新日志应用程序将在一个给定范围内的每个变更以及所有相关的工作项此类变更集提取信息。即,它从开始将变更高达变更结束旅行,将提取有关在XML文件中相关的工作项目沿每个变更数据。

TFS ChangeLog applicatoin allows users to automatically generate release notes from TFS. Users will have to provide information on thier project, branch and changeset range and then TFS ChangeLog application will extract information from each changeset in a given range and all the associated workitems to such changesets. i.e. it will travel from starting changeset upto ending changeset and will extract data about each changeset along with associated workitems in an XML file.

然后,用户可以使用自己的转换逻辑,包括过滤,排序,造型,输出格式等,生成发行说明报告。

Users can then use their own transformation logic including filter, sorting, styling, output formatting, etc. to generate Release Notes Report.

我想在此补充另一件事将与在TFS标签。标签基本上都是分配/变更与相关联。目前,TFS更新日志应用程序不支持标签定义起止点,但它不支持变更可以用来作为一种变通的解决方案。

Another thing I would like to add here will be related to Labels in TFS. Labels are basically assigned / associated with changesets. Currently, TFS ChangeLog application does not support Labels to define starting and ending point but it does support changeset which can be used as a workaround solution.

希望这是有益的。

这篇关于TFS 2010:如何使用标签的应用程序的两个版本之间产生的changelog(即工作项列表。)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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