您如何看待TFS中版本的更改?

时间:2022-09-11 16:48:20

I'm trying to migrate to TFS from VSS and I need to be able to show what files were checked in between two releases. In VSS we would just label the code for a release and view history between labels and generate a report to show the checkins and the comments. Is there a way to get similar results with TFS? Or show the differences between two changesets or labels?

我正在尝试从VSS迁移到TFS,我需要能够显示在两个版本之间检查了哪些文件。在VSS中,我们只需标记发布的代码并查看标签之间的历史记录,并生成报告以显示签入和注释。有没有办法用TFS获得类似的结果?或者显示两个变更集或标签之间的差异?

5 个解决方案

#1


The command line tool tf.exe gives you more options than the GUI (and can either give results in a Dialogue or as standard output --- good for feeding into further processing).

命令行工具tf.exe为您提供了比GUI更多的选项(并且可以在对话中提供结果或作为标准输出 - 有助于进一步处理)。

E.g.

tf hist . -r /version:C10~C1000

will list all the changesets affecting this folder and content recursively between changesets 10 and 1000.

将在变更集10和1000之间递归列出影响此文件夹和内容的所有变更集。

See the documentation on MSDN.

请参阅MSDN上的文档。

If you need maximum flexibility, you can create your own commands using the TFS client assemblies. Unfortunately documentation is somewhat sparse.

如果您需要最大的灵活性,可以使用TFS客户端程序集创建自己的命令。不幸的是,文档有点稀疏。

#2


Right click on your desired folder on TFS (e.g. the root folder), you'll find following two options:

右键单击TFS上所需的文件夹(例如根文件夹),您将找到以下两个选项:

1, Apply Label - this allows you to apply label to a particular version of that folder. 2, Compare - this allows you to compare that folder between versions, and one of the choices is comparing by label.

1,应用标签 - 这允许您将标签应用于该文件夹的特定版本。 2,比较 - 这允许您在版本之间比较该文件夹,其中一个选项是按标签进行比较。

#3


Right click on any node in TFS Source Control and choose 'View History' This will show you all changesets ordered by date descending.

右键单击TFS源代码管理中的任何节点,然后选择“查看历史记录”这将显示按日期降序排序的所有更改集。

Double click on those and you can see the detail about the change set: the comment, associated work items, and files that were changed.

双击这些,您可以看到有关更改集的详细信息:注释,关联的工作项和已更改的文件。

#4


As Jeff said, right-click on the project, any folder or file, and choose "View History" to see all changes. If you know when your labels were applied, it's easy to scroll down this list until you hit a particular date/time.

正如Jeff所说,右键单击项目,任何文件夹或文件,然后选择“查看历史记录”以查看所有更改。如果您知道何时应用了标签,则可以轻松向下滚动此列表,直至达到特定日期/时间。

For an exact list between two labels or changeses, use "tf.exe history" (as Richard says) from a Visual Studio command prompt (in your start menu in the Visual Studio 2005 folder). For more info on this just execute "tf.exe help history".

有关两个标签或更改之间的确切列表,请从Visual Studio命令提示符(在Visual Studio 2005文件夹的开始菜单中)使用“tf.exe历史记录”(如Richard所述)。有关这方面的更多信息,请执行“tf.exe帮助历史记录”。

For day to day changes, if you use TFS build you can see the changes since the last build at the bottom of the build information page (Double click the build name in Team Explorer, then double click the specific build. Scroll to the bottom of this page and open "associated changesets". I've set out CI build to not associate changesets, which means that our daily test build lists all changesets since the previous daily build - a great summary of the changes for our testers to get their teeth into.

对于日常更改,如果使用TFS构建,您可以在构建信息页面底部看到自上次构建以来的更改(在团队资源管理器中双击构建名称,然后双击特定构建。滚动到底部这个页面并打开“关联的变更集”。我已经将CI构建设置为不关联变更集,这意味着我们的日常测试版本列出了自上一次每日构建以来的所有变更集 - 这是我们的测试人员获取他们的牙齿的变化的一个很好的总结成。

#5


I was using the command line tf hist and getting the changesets to compare by finding the highest changeset in a label or branch changeset, but having a manual process and using the command line didn't go over too well here. I used Carl Daniel's code to write a little web application that will bind the changes to a datagrid.

我使用命令行tf hist并通过查找标签或分支变更集中的最高变更集来获取变更集以进行比较,但是使用手动过程并使用命令行并没有在这里过得太好。我使用Carl Daniel的代码编写了一个小的Web应用程序,它将更改绑定到datagrid。

If you're looking for something special the standard interface doesn't give you it's fairly simple to write your own application that links into TFS. I'd definitely suggest it.

如果您正在寻找特殊的东西,标准界面并不能让您编写链接到TFS的应用程序非常简单。我肯定会建议。

#1


The command line tool tf.exe gives you more options than the GUI (and can either give results in a Dialogue or as standard output --- good for feeding into further processing).

命令行工具tf.exe为您提供了比GUI更多的选项(并且可以在对话中提供结果或作为标准输出 - 有助于进一步处理)。

E.g.

tf hist . -r /version:C10~C1000

will list all the changesets affecting this folder and content recursively between changesets 10 and 1000.

将在变更集10和1000之间递归列出影响此文件夹和内容的所有变更集。

See the documentation on MSDN.

请参阅MSDN上的文档。

If you need maximum flexibility, you can create your own commands using the TFS client assemblies. Unfortunately documentation is somewhat sparse.

如果您需要最大的灵活性,可以使用TFS客户端程序集创建自己的命令。不幸的是,文档有点稀疏。

#2


Right click on your desired folder on TFS (e.g. the root folder), you'll find following two options:

右键单击TFS上所需的文件夹(例如根文件夹),您将找到以下两个选项:

1, Apply Label - this allows you to apply label to a particular version of that folder. 2, Compare - this allows you to compare that folder between versions, and one of the choices is comparing by label.

1,应用标签 - 这允许您将标签应用于该文件夹的特定版本。 2,比较 - 这允许您在版本之间比较该文件夹,其中一个选项是按标签进行比较。

#3


Right click on any node in TFS Source Control and choose 'View History' This will show you all changesets ordered by date descending.

右键单击TFS源代码管理中的任何节点,然后选择“查看历史记录”这将显示按日期降序排序的所有更改集。

Double click on those and you can see the detail about the change set: the comment, associated work items, and files that were changed.

双击这些,您可以看到有关更改集的详细信息:注释,关联的工作项和已更改的文件。

#4


As Jeff said, right-click on the project, any folder or file, and choose "View History" to see all changes. If you know when your labels were applied, it's easy to scroll down this list until you hit a particular date/time.

正如Jeff所说,右键单击项目,任何文件夹或文件,然后选择“查看历史记录”以查看所有更改。如果您知道何时应用了标签,则可以轻松向下滚动此列表,直至达到特定日期/时间。

For an exact list between two labels or changeses, use "tf.exe history" (as Richard says) from a Visual Studio command prompt (in your start menu in the Visual Studio 2005 folder). For more info on this just execute "tf.exe help history".

有关两个标签或更改之间的确切列表,请从Visual Studio命令提示符(在Visual Studio 2005文件夹的开始菜单中)使用“tf.exe历史记录”(如Richard所述)。有关这方面的更多信息,请执行“tf.exe帮助历史记录”。

For day to day changes, if you use TFS build you can see the changes since the last build at the bottom of the build information page (Double click the build name in Team Explorer, then double click the specific build. Scroll to the bottom of this page and open "associated changesets". I've set out CI build to not associate changesets, which means that our daily test build lists all changesets since the previous daily build - a great summary of the changes for our testers to get their teeth into.

对于日常更改,如果使用TFS构建,您可以在构建信息页面底部看到自上次构建以来的更改(在团队资源管理器中双击构建名称,然后双击特定构建。滚动到底部这个页面并打开“关联的变更集”。我已经将CI构建设置为不关联变更集,这意味着我们的日常测试版本列出了自上一次每日构建以来的所有变更集 - 这是我们的测试人员获取他们的牙齿的变化的一个很好的总结成。

#5


I was using the command line tf hist and getting the changesets to compare by finding the highest changeset in a label or branch changeset, but having a manual process and using the command line didn't go over too well here. I used Carl Daniel's code to write a little web application that will bind the changes to a datagrid.

我使用命令行tf hist并通过查找标签或分支变更集中的最高变更集来获取变更集以进行比较,但是使用手动过程并使用命令行并没有在这里过得太好。我使用Carl Daniel的代码编写了一个小的Web应用程序,它将更改绑定到datagrid。

If you're looking for something special the standard interface doesn't give you it's fairly simple to write your own application that links into TFS. I'd definitely suggest it.

如果您正在寻找特殊的东西,标准界面并不能让您编写链接到TFS的应用程序非常简单。我肯定会建议。