部署版本的源代码控制问题
我们讨论了如何部署到 UAT 已关闭的生产修订版,而没有 UAT 未关闭状态的修订版。
我们正在使用 SVN,并且发现我们无法在没有事先对同一文件进行修订的情况下进行修订。
让我通过这个例子来解释一下: 我们对同一文件进行了 3 个修订:
r1:UAT 已关闭(准备部署) r2:UAT未关闭(未准备好) r3:UAT 已关闭(准备部署)
现在我只想部署 UAT 已关闭的更改(例如 r1 和 r3)。 在 SVN 中这是不可能的,因为 r3 也包含 r2 更改。
您如何使其工作?也许分支?或者只是拿r1并等到r2 UAT关闭?
谢谢
we have this discussion about how to deploy to production revisions that are UAT closed without revisions with UAT not-closed status.
We are using SVN and we figured out that we are not able to just take revisions without prior-revisions on the same file made.
Let me explain it on this example:
we have 3 revisions made on same file:
r1: UAT closed (ready to deploy)
r2: UAT not-closed (not ready)
r3: UAT closed (ready to deploy)
now I want to deploy only my changes for which the UAT is closed (e.g. r1 and r3).
In SVN this is not possible because r3 contains also r2 changes..
How do you made this to work? Maybe branching? Or just take r1 and wait until r2 is UAT closed?
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
根据您所说的,我建议对每个 UAT 问题进行分支,然后在 UAT 关闭时将它们合并回主干。
这样您就可以:
分支 1、2 和 3 同时开始,但 R1 和 R3 在 R2 之前 UAT 关闭,并且决定继续使用您所拥有的内容。
因此,您可以将 R1 和 R3 合并到 Main 中,但将 R2 保留在原处。
如果您要采用此过程,我还建议:
然后您可以将功能分支合并到暂存分支,并在合并到实时分支之前在那里执行额外的集成测试。这可以帮助解决当两个功能分支合并在一起时可能出现的任何冲突问题。
跨多个开发人员和多个版本进行分支时要记住的另一件事是找到某种方法来跟踪哪个分支上有哪些更改以及哪个分支已合并到哪里。但这完全取决于您的工作环境和实践。
Based on what you're saying, I'd suggest branching for each UAT issue, then merging them back to the Trunk when the UAT is closed.
That way you'd have:
Branches 1, 2 and 3 are all commenced at the same time, but R1 and R3 are UAT Closed before R2 is, and a decision is made to go live with what you have.
So you can merge R1 and R3 into Main, but leave R2 where it is.
If you were to go with this process though, I'd also suggest:
You can then merge your feature branches into the staging branch, and perform extra integration testing there before merging into live. This can help resolve any conflict happy issue that may pop up when two feature branches are merged together.
Another thing to bear in mind with branching across multiple developers and multiple releases is to find some way to track what changes are on which branch, and what branch has been merged to where. This will be entirely dictated by your working environment and practices though.
我几乎总是建议为每个版本创建分支。何时完成通常由各个站点决定,但通常是在发布版本进行 UAT 测试之前。这允许您删除尚未准备好用于最终版本的更改。
因此,创建一个发布分支,您可以将所有 UAT 更改放在那里。您可以从 R1 分支,然后合并 R3 中的更改,或者从 R3 分支并使用 svn merge 撤销 R2 的更改(请参阅 撤消 Subversion 在线手册中的更改)。
现在,您可以添加和删除针对该版本的更改,而不会干扰当前项目。如果 R2 确实在以后获得批准发布,则可以将其合并回发布分支。
我不建议您为每个 UAT 事件创建单独的分支。你最终得到的是大量的分支和大量的合并。您最终会单独测试每个更改并批准它们,然后发现它们相互干扰。
I almost always recommend branching for each release. When this is done is usually up to the individual site, but it is usually before the release goes out for UAT testing. This allows you to remove changes that are not ready for the final release.
So, create a release branch and you can put all of your UAT changes there. You could branch from R1, and then merge in the changes in R3, or branch from R3 and backout the change R2 using
svn merge
(See Undoing Changes in the Subversion on line manual).Now, you can add and subtract changes that are for the release without interfering with the current project. If R2 does happen to get approved for the release at a later date, it can be merged back into the release branch.
I would not recommend that you create a separate branch for each UAT incident. What you end up with is lots of branches and lots of merging. You end up testing each change individually and approving them, then later find out that they interfere with each other.