如何选择要合并附加到工作项的变更集?
我有一组已完成的工作项目,我准备将它们的更改移至我们的生产分支。 是否可以找到附加到它们的变更集并有选择地将它们与目标分支合并?
I have a set of work items that are completed and I am ready to move their changes to our production branch. Is it possible to find the changesets that are attached to them and selectively merge them with the target branch?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
简短的回答是不容易。
目前,工作项和代码升级之间没有真正的联系。 您可以在签入时(或实际上在任何时间)将变更集与工作项关联起来,但仅此而已。
基本上,您必须使用 Visual Studio 中提供的 UI 手动执行此操作(即查找工作项、获取变更集 ID,然后通过选择适当的变更集范围进行(可能是多次)合并。如果这是常规方式那么你可以在.NET中编写一个使用Microsoft TFS API 与工作项跟踪组件对话以获取所需的变更集,然后以编程方式进行合并或启动命令行客户端 (tf) 为合并提供适当的 UI。
抱歉,这不是一个更有帮助的答案。我知道 Microsoft 的团队已经多次听到过这种情况然而,我还没有听说有任何计划在当前或下一版本的 TFS 中更好地支持“开箱即用”。也就是说,TFS2010 中的分支广告合并内容有很多改进,因此这是可能的。那里有/将会有一些东西可能会帮助你。 为此,您可能值得在 http://connect.microsoft.com/VisualStudio 上记录一些反馈功能(如果它对您很重要)。
祝你好运,
马丁。
Not easily is the short answer.
Currently there is no real link between work items and code promotion. You can associate a changeset with a work item on check-in (or indeed at any time), but that is about as far as things go.
Basically you would have to do this by hand using the provided UI in Visual Studio (i.e. look up the work items, get the changeset ID's and then do (possibly several) merges by selecting the appropriate changeset ranges. If this is a regular way of working then you could write a program in .NET that used the Microsoft TFS API to talk to the work item tracking component to get the changesets required and then either did the merges programatically or kicked off the command line client (tf) to bring up appropriate UI for the merges.
Sorry it's not a more helpful answer. I know that the team at Microsoft have heard this scenario a few times now however I've not heard of any plans to have it better supported "out the box" in the current or the next release of TFS. That said, there are a lot of improvements to the branching ad merging stuff in TFS2010 so it is possible that something is/will be in there that might help you. It may be worth you logging some feedback on http://connect.microsoft.com/VisualStudio for this feature if it is important to you.
Good luck,
Martin.