从主干中排除修订并稍后将其带回的最佳方法是什么?
我们使用 svn 并拥有应该在几天内发布的代码,但我们希望从构建中排除一个修订版本,因为我们没有时间对其进行全面的 QA。从主干中排除该修订版的最佳方法是什么?
我们是否应该创建一个分支,其中包含该修订版本,在主干中恢复该修订版本的更改,然后一旦代码退出,将该分支的修订版本合并回主干?
We use svn and have code that is supposed to go out in a few days, but there is one revision that we want to exclude from our build since we won't have time to fully QA it. What's the best way to exclude that revision from trunk?
Should we create a branch, with that revision in it, revert the changes of that revision in trunk, and then once the code goes out merge the revision from that branch back into trunk?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您如何指示构建内容?是存储库中的整个树,还是您使用 svn:externals 或者什么?
如果您使用 svn:externals,那么您只需将修订号应用于该组件即可。
如果您要检查整个树,那么您可以取消更改,直到发布为止。您不需要将其保存在分支上,它仍然存在于存储库中。
因此
应该撤销进行特定修订的更改。 (然后您需要提交)。
如果修订不仅仅影响该组件,那么您可以将合并限制为仅该组件。
然后,您再进行一次“合并”以重新应用更改:(
请注意修订号之前缺少“-”)。
How are you indicating what goes into the build? Is it the whole tree in the repository, or are you using svn:externals or what?
If you're using svn:externals, then you can just apply a revision number to that component.
If you're checking out the whole tree, then you can back out the change until you've made the release. You don't need to save it on a branch, it's still there in the repository.
So
should back out the changes that made that particular revision. (You'll then need to commit).
If the revision affected more than just that component, then you can restrict the merge to just that component.
Then afterwards you do another 'merge' to reapply the change:
(Notice the lack of '-' before the revision number).
您可以恢复此修订版中的更改并提交,这仍然会保留旧修订版,但以后不容易找到它。
恕我直言,您的建议是继续的最佳方法。
创建一个分支或标签来保留更改,然后在主干上恢复。
稍后,当您准备好集成更改时,您只需合并回分支并重新提交。
You could just revert the changes from this revision and commit, that would still leave the old revision in but it would not be easily found later on.
What you suggest is IMHO the best way to proceed.
Create a branch or a tag to keep the changes and then revert on trunk.
Later when you're ready to integrate the changes you just have to merge back the branch and recommit.