一群开发人员如何通过 Mercurial 修复先前发布版本中的多个错误?

发布于 2024-11-02 00:08:04 字数 689 浏览 1 评论 0原文

好的,你们很好的人回答了我的问题问得很好,我很感激。

然而,现在我意识到这不是一个正确的问题,所以我有另一个问题(尽管我确实认为前一个问题对其他人来说是有用的)。

和以前一样,我们在单个存储库中使用 Mercurial。我们有一个主分支和一个开发分支(以及功能分支,但它们与当前的问题没有密切关系)。

我们用版本(5.1.0.102 等)标记主分支。我们在开发中进行开发。

我真正想做的是将先前版本中的许多不同修复程序捆绑在一起,以便创建一个修复程序集合的维护版本。

或者,像以前一样,这就是我真正需要的:

  1. 以一组开发人员可以一起工作的方式更新到我们发布的版本(例如 6.1.1)
  2. 该开发人员组修复了一堆错误。
  3. 将生成的代码状态标记为 (6.1.2)
  4. 构建这个新的 6.1.2 代码库。
  5. 将这些修复迁移到开发分支
  6. 中这样做,以便我可以返回到 6.1.2 并修复那里的错误(如果需要

)或者,我需要基于先前版本创建一个维护版本,其中包含各个开发人员的工作。

我怎样才能做到这一点?

Okay, you fine people answered my question quite nicely and I'm thankful.

However, now I realize that it wasn't quite the right question so I have another (though I do think that the previous question will prove useful to others).

As before, we are using mercurial in a single repository. We have a master branch and a develop branch (as well as feature branches, but they aren't germane to the issue at hand).

We tag the master branch with releases (5.1.0.102, etc). We do our development on develop.

What I really want to do is to have a number of different fixes be bunched together off of a previous release in order to create a maintenance release that is a collection of fixes.

Or, put as before, here is what I really need:

  1. Update to the point where we released (say 6.1.1) in a way that a group of developers can work together
  2. That group of developer fixes a bunch of bugs.
  3. Label that resulting code state as (6.1.2)
  4. Do a build of this new 6.1.2 codebase.
  5. Migrate those fixes into the develop branch
  6. Do this in such a way that I can go back to 6.1.2 and fix bugs there if need be

Or, I need to create a maintenance release based on a previous release with work included from various developers.

How can I do that?

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

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

发布评论

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

评论(3

高速公鹿 2024-11-09 00:08:04

您之前提出的问题的公认答案仍然有效,并且您在问题中概述它的方式是......嗯......正确的方法。

所以基本上我不明白你在问什么或为什么问。

这是你应该做的。

  1. 一名开发人员通过更新回上一个版本的焦点(即 6.1.1 版本的变更集)开始这项工作,
  2. 然后他进行一些与错误修复相关的更改、提交并推送回中央存储库。请注意,这将创建另一个头。这很好(如果不是,请参见下文)
  3. 他的 Tiger 团队中的其他开发人员拉动并更新到这个新头,并将他们的贡献添加到错误修复中,根据需要提交和推送/拉动
  4. 在某些时候,您有一个新版本,如 6.1.2,因此您为最终变更集创建一个标签,
  5. 然后更新到前一个头(开始整个工作之前的头)并合并到 6.1.2 头,这会带来所有这些错误修复返回到未来版本的主分支

它看起来像这样:

旧版本中的bugfix

R5 这里将是合并提交,如果你忽略 6.1.2 中的所有错误修复,R4 将是当前的头部。

然后,如果您想返回修复更多内容以获取 6.1.3 版本,它将如下所示(您遵循与上面完全相同的计划):

more bugfixes

这里 R9 将是项目下一个主要版本的当前负责人,而 R10 将是将 6.1.3 中的错误修复带回未来的合并提交版本。

The accepted answer to the question you previously asked still holds, and the way you outline it in the question is ... well... the right way to do it.

So basically I don't understand what or why you're asking.

Here's what you should do.

  1. One of the developers starts the job by updating back to the focal point of the last release (ie. the changeset of your 6.1.1 release)
  2. He then makes some changes relevant to the bugfixes, commits, and pushes back to the central repository. Note that this will create another head. This is fine (see below if it isn't)
  3. The other developers on his Tiger Team pull, and update to this new head, and add their contributions to the bugfixes, committing and pushing/pulling as needed
  4. At some point, you have a new version, like 6.1.2, so you create a tag for the final changeset
  5. You then update to the previous head (the one you had before you started this whole job) and merge in the 6.1.2 head, this brings all those bugfixes back into the main branch for future versions

It would look like this:

bugfix in older version

R5 here would be the merge commit, and R4 would be the current head if you disregard all the bugfixes that went into 6.1.2.

Then, if you want to come back to fix some more to get out a 6.1.3 version, it would look like this (you follow the exact same plan as above):

more bugfixes

Here R9 would be the current head of the next major version of your project, and R10 would be the merge commit that brought the bugfixes that went into 6.1.3 back into that future version.

飘逸的'云 2024-11-09 00:08:04

你的步骤几乎是对的。我的建议是这样的:

  1. 使用主干作为开发分支
  2. 当您需要发布时,您创建一个新分支
  3. 所有错误修复都在新分支上完成 1-2 天,然后才稳定
  4. 您进行启动
  5. 您合并具有 devel trunk 的版本

  6. 如果发现严重错误,请转到步骤 1。

Your steps are almost right. My suggestion is this:

  1. Use the main trunk as a development branch
  2. When you need to release you create a new branch
  3. All the bug fixing is done on the new branch for 1-2 days before is stable
  4. You make the launch
  5. You merge the release with the devel trunk

  6. If critical bugs found go to step 1.

喵星人汪星人 2024-11-09 00:08:04

Git 方面有一个工作流程,称为 Git Flow。该工具本质上自动化了许多涉及的乏味工作(从生产稳定分支创建一个分支,提交,将分支合并到当前新工作所在的位置)。

有一个 Mercurial 扩展可以为您提供 Hg 的确切工作流程:Hg Flow。我已经使用过它(尽管不是用于大型应用程序)并且我真的很喜欢它 - 它像 Git Flow 一样自动执行所涉及的步骤,并将 Git 社区的智慧带到了 Hg-land。

There's a Workflow for this on the Git side, called Git Flow. This tool essentially automates a lot of the tedium involved (create a branch off your production-stable branch, commit commit, merge branch to where your new current work is).

There is a Mercurial extension that gives you that exact workflow for Hg: Hg Flow. I've used it (although not for a big app) and I really like it - it automates the steps involed just like Git Flow does, and brings the wisdom from the Git community over to Hg-land.

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