Team Foundation Server 2010 - 分支还是不分支?

发布于 2024-12-05 17:53:08 字数 473 浏览 1 评论 0原文

我目前有许多团队项目都由 TFS 愉快地管理。

我有一个项目,一个 Windows 应用程序,当前正在使用,在将代码库移植到 TFS 之前,我们手动使用脚本来复制/合并文件来维护生产构建和新的开发构建。

例如 App1 v1.x - 生产和 App1 v2.0 正在开发中。

在 TFS 之前,我们手动将开发版本中的错误修复“合并”到生产版本中 - 因此 v1.x 中适用的错误修复也在 v2 中修复。

在这种特殊情况下,v2 是完全不同的,重构了 ui 等。我的问题是将这种情况移植到 TFS 的最佳方法是什么。

在我看来,我有两个选择:

  1. 创建一个新的团队项目并继续手动“合并”适用的 代码文件。

  2. 从当前项目 v1 创建一个品牌,并在 VS 中逐段替换/覆盖该项目,以便源代码管理可以将更改管理回主团队项目。 V2 也有一些额外的类库 - 如果这有区别的话。

I've currently got a number of Team Projects all happily managed by TFS.

I have one project, a windows app, that is currently in use and before I ported the code base to TFS, we manually used to maintain both the production build and a new development build using scripts to copy/merge the files.

e.g. App1 v1.x - production and
App1 v2.0 in development.

Before TFS we manually "merged" to bug fixes from the development build into the production build - so where applicable bug fixes from v1.x were also fixed in v2.

In this particular case v2 is quite different, re-factored ui, etc. The question I have is what is the best way of porting this scenario to TFS.

As I see it I have two options:

  1. Create a new Team Project and continue manually "merging" applicable
    code files.

  2. Create a brand from the current project v1 and replace / overwrite the project piece by piece in VS so that the source control can manage the changes back to the Main team project.
    V2 has a few additional class libs too - if that makes a difference.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

极致的悲 2024-12-12 17:53:08

通常,这是我们用来进行分支和合并的策略:

  • 项目启动。所有团队成员都在单个 CURRENT 分支中开发 1.0 版本。
  • 项目接近里程碑或发布。创建一个分支,用于稳定 PROD 1.0 分支中的生产代码。现在,一半的团队在分支上稳定产品,一半的团队继续在当前分支上做新的(有风险的)事情。
  • PROD 1.0 分支已准备好并在生产中交付。该分支保持完整,为交付的版本提供维护和支持。对 PROD 1.0 分支进行修复并合并到 CURRENT 分支中。
  • 项目接近另一个里程碑或版本。创建一个新分支,用于稳定 PROD 2.0 分支中的生产代码。使用与前面描述的相同的机制。

使用这种每个版本一个分支的策略,每个发布和维护的版本总是有一个分支,其中可以轻松地在版本和主流当前开发线之间向前和向后传播修复。

考虑到这一点,我们使用 TFS 团队项目来发布某个产品的多个版本。这限制了创建和维护项目空间的开销。

Typically, this is the strategy we use to do branching and merging:

  • The project starts. All team members are working on version 1.0 in the single CURRENT branch.
  • Project approaches a milestone or release. Make a branch that will be used to stabilized the code for production in PROD 1.0 branch. Now half of the team stabilizes the product on the branch and half of the team continues doing new (riskful) stuff on the CURRENT branch.
  • PROD 1.0 branch is ready and delivered in production. The branch stays intact to provide maintenance and support on the delivered version. Fixes are made on the PROD 1.0 branch and merged into the CURRENT branch.
  • Project approaches another milestone or release. Make a new branch that will be used to stabilized the code for production in PROD 2.0 branch. The same mechanism is used as described before.

Using this branch-per-release strategy, you always have a branch per shipped and to be maintained version in which fixes can easily be propagated forward and backward between versions and the mainstream CURRENT development line.

With this respect, we use a TFS team project for multiple releases of a certain product. This limits the overhead creating and maintaining the project spaces.

‘画卷フ 2024-12-12 17:53:08

简而言之...去分支!

看来您的版本之间的代码非常相似,您只需简单地分支新版本就可以了。

一般来说,如果您具有以下一个或多个条件,则更改为新的团队项目是有意义的:

  • 全新的需求范围和/或不同的工作项类型、
  • 完全不同的技术,换句话说,您已经从根本上改变了设计和设计。合并损失大于收益
  • 需要存储文档和数据。另一个 SharePoint 站点中的其他令牌
  • 不同的开发方法 - 流程模板
  • 双方工作的不同团队,可能希望限制用户查看 v1 或 v2
  • 计划在完全不同的发布周期中发布这两种产品
  • 需要完全独立的报告

阅读您的帖子 我不认识到创建新团队项目后需要继续 - 当然我可能是错的。

如果您决定使用分支变体,您可以从令人印象深刻的 Visual Studio TFS 分支指南 2010 中受益匪浅,关于如何塑造代码库的结构。

In short...To branch!

It seems your code between versions is that much similar that you should be fine by simply branching your new release.

In general, changing to a new Team Project makes sense if you have one or more of the following:

  • a totally new bread of requirements and/or different Work Item types
  • completely different technology, in other words you have radically changed the design & merging is more loss than gain
  • need to store docs & other tokens in another SharePoint site
  • different development methodology - process template
  • different teams of people working on both sides, possibly want to restrict users from viewing v1 or v2
  • plan to release both products in completely different release cycles
  • need for totally separated reports

Reading your post I don't recognize the need to go after creating a new Team Project - of course I might be wrong.

In case you decide to go with the branch variant you could be greatly benefited from the impressive Visual Studio TFS Branching Guide 2010, on how to shape the structure of your codebase.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文