Mercurial:表明分支已通过测试?
如果我们要迁移到 DVCS(最有可能是 Mercurial),我正在努力在我的公司建立工作流程。我想做的一件事是拥有一个用于 QA 的存储库。这个想法是,每个开发人员在一个分支上工作,当他们完成后,该分支就会被推送到 QA。从那里,测试团队可以进行测试并报告任何错误。一旦分支经过全面测试并可接受,它将被推送到临时存储库,在推送到中央存储库之前,将合并回主线。
如果每个人都以某种方式传达他们的工作状态,那么这可以很容易地实现,但我知道这并不总是如您所希望的那样发生。我担心的是 QA 存储库中的分支在等待,但没有人知道它是否正在等待测试、当前正在测试、等待修复、等待推送到暂存区域等。所以我正在寻找的是想法如何将状态添加到分支?最好的办法是我们可以使用钩子来通知人们状态的变化。
任何想法将不胜感激。
I am working on establishing a workflow at my company if we were to migrate to DVCS (most likely Mercurial). One of the things I would like to do is to have a repository for QA. The idea being that each developer works on a branch and when they are done the branch is pushed to QA. From there the test team can do their testing and report back any bugs. Once the branch is fully tested and acceptable it will be pushed to a staging repository where the merge back to the mainline will happen before pushing to the central repository.
This can work quite easily if everyone just communicates the status of their work in some way, but I know this doesn't always happen as you would want it to. What I am worried about is branches in the QA repo waiting around but nobody knows if it is waiting to be tested, currently being tested, waiting for fixes, waiting to be pushed to the staging area etc. So what I am looking for are ideas of how a status can be added to a branch? What would also be good would be to do it in a way that we could use hooks to also notify people of changes in the status.
Any ideas would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
不幸的是,我认为您需要一个不同的系统来跟踪工作流程的这一部分。
存储库由不应随意更改的内容组成,但当前的问答状态必然会与存储库的内容正交地更改。
让我重新表述一下。您在 Q&A 存储库中有 10 个变更集,可以进行测试。尽管这 10 个变更集保持不变,但每个测试人员关注的具体内容、每个测试的状态等都会发生变化。
我肯定会尝试使用错误跟踪系统,您可以通过某种方式集成存储库历史记录,即使只是通过将系统中的问题链接到其变更集。
我注意到您关于购买 Kiln 未获得支持的评论,但您应该能够集成其他系统,这些系统将为您提供类似的功能。
我非常抵制尝试让 Mercurial 为它不支持的东西提供服务,尝试使用标签会惨败,而书签会给你带来问题,正如你已经注意到的那样。
因此,再次尝试找到一个单独的系统来跟踪问答状态。
Unfortunately I think you need a different system to keep track of this part of your workflow.
A repository consists of things that aren't supposed to change all willy nilly, yet the current Q&A status will by necessity change orthogonal to the contents of the repository.
Let me rephrase that. You have 10 changesets in the Q&A repository, ready to be tested. Exactly what each tester focuses on, the status of each test, etc. will change, even though those 10 changesets stay the same.
I would definitely try to use a bugtracking system where you can integrate the repository history in some way, even if it is just by linking an issue in the system to its changeset.
I notice your comment about not getting support for buying Kiln, but there are other systems you should be able to integrate that would give you something similar.
I would very much resist trying to press Mercurial into service of something it wasn't built to support, trying to use tags for this would fail miserably, and bookmarks would give you problems, as you've already noted.
So again, try to find a separate system for keeping track of Q&A status.
一种简单的方法可能是在存储库的根文件夹中保留一个元数据文件,名为
.teststatus
或类似名称,如下所示:此处使用标签或书签感觉像是一种滥用。您不能跨分支使用相同的标记(例如,
passed
必须是stable-passed
),并且标记通常不会移动。另一方面,书签旨在移动,但仍然存在分支命名空间问题。One simple method might be to keep a metadata file in your repo's root folder, named
.teststatus
or somesuch, that looks like:Using tags or bookmarks would feel like a sort of abuse, here. You couldn't use the same tag across branches (e.g.
passed
would have to bestable-passed
), and tags are generally not moving. Bookmarks, on the other hand, are intended to move, but you still have the branch-namespacing issues.Joel Spolsky 是该网站的创始人之一,他制作了一个名为 FogBugz 的程序,该程序与 Mercurial 集成,并且可以轻松跟踪每个人的状态。
Joel Spolsky, one of the founders of this site, produces a program called FogBugz that is integrated with Mercurial and makes it easy to keep track of everyone's status.
我不完全确定您的工作流程是如何工作的,但这里有一些想法:
hg Branches
将显示哪些分支仍处于待处理状态。您可能可以使用 传入挂钩自动通知新变更集添加到 QA 存储库。
I'm not completely sure how your workflow works, but here are a few ideas:
hg branches
will show you which branches are still pending.You could probably use an incoming hook for the automatic notification of new changesets being added to the QA repo.
如果开发人员还没有准备好进行 QA,为什么要将其推送到 QA 存储库?我认为将变更集推送到 QA 指定存储库的行为应该是该功能已准备好进行测试的信号。
功能通过克隆进行分支 是我最喜欢的方法。
Why would a developer push something to a QA repository if it wasn't ready to be QA'd? I think the act of pushing changesets to a QA designated repository should be the signal that the feature is ready to be tested.
Feature branches by cloning is my favorite approach.