svn重新设定基准并丢失历史记录 [英] svn rebasing and history lost
问题描述
我们目前有2个分支机构:
We currently have 2 branches:
/repo/branch/current_version
/repo/branch/next_version
current_version 是当前所有开发人员均可使用的分支.
current_version is a branch where all developers currently works.
我们开始下一个版本,并在current_version的某个位置创建了 next_version 分支,而current_version的工作仍在继续.在next_version中,我们进行一些开发,在接下来的几个月中,该分支将成为我们的主要分支,所有开发都将在此完成.
We starting a next version and created next_version branch from some point in current_version, while work on current_version is still continuing. In next_version we do some development and in next months the branch will become our main one, where all development will be done.
由于current_branch已有进展,因此我们定期(每2周一次)考虑为next_version建立基础.为了使两个分支保持同步,因此,当所有开发人员最终都放弃current_branch并移至next_release时,next_release将包含所有经过集成和测试的current_branch功能.
Since there's development on current_branch, we thought periodically (say once per 2 weeks) to rebase next_version. This in order to keep both branch in sync, so when all developers will eventually drop current_branch and move to next_release, next_release will contain all current_branch's feature integrated and tested.
问题正在根基上.实际上,重新定基是将current_branch的最新提交合并到next_version.因此,如果我要在next_release中检查提交文件的历史记录,那么我看到的只是合并提交,而不是current_version的历史记录(提交/作者/注释).
The problem is rebasing. Actually rebasing is merging latest commits of current_branch to next_version. So if I'll examine history of commited files in next_release, all I'll see is the merge commits and not the history (commits/authors/annotation) of current_version.
我想念什么吗?
推荐答案
不,您什么都没错过.使用SVN进行版本控制时,这是一个大问题.
No, you haven't missed anything. This is a big problem with using SVN for version control.
我在上一份工作中一遍又一遍地碰到它.每当有人向current_branch提交某些内容(以遵守您的术语)时,都必须手动复制提交消息,以便可以在合并提交消息中使用它.这很快就变成了巨大的痛苦.
I ran into it over and over again at my last job. Every time somebody committed something to current_branch (to stick with your terminology), the commit message would have to be copied manually so it could be used in the merge commit message. This quickly became a huge pain.
这就是为什么新版本控制软件具有更好的合并功能(想到了Git,Mercurial和Bazaar)的原因.
That's why new version control software has come out with better merging capabilities (Git, Mercurial, and Bazaar come to mind).
编辑:显然,SVN已解决此问题. SVN 1.5及更高版本包含合并敏感日志和注释.将标记--use-merge-history(-g)与svn merge和svn blame一起使用,以查看来自合并分支的提交消息.
Apparently SVN has fixed this issue. SVN 1.5 and up incorporate merge-sensitive logs and annotations. Use the flag --use-merge-history (-g) with svn merge and svn blame to see the commit messages from the merged branch.
这篇关于svn重新设定基准并丢失历史记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!