当我合并两个分支时,所有中间修订版都去哪儿了? [英] Where did all the intermediate revisions go when I merged two branches?
问题描述
我最近将分支X 合并为分支Y .我希望 branch X 的修订历史可以某种方式合并到 branch Y 的修订历史中.相反,我所看到的只是分支Y 的修订历史记录,一次提交合并了分支X 的所有更改.我打算删除分支X 以便整理多余的分支.
I recently merged branch X into branch Y. I expected the revision history from branch X to be merged somehow into the revision history of branch Y. Instead all I see is the revision history for branch Y with one commit merging in all of the changes from branch X. I intend to delete branch X in order to tidy up redundant branches.
要进行合并,我签出了分支Y ,然后对分支X 进行了svn merge
,然后将更改提交回分支Y (如此处所示).
To do the merge I checked out branch Y, then did an svn merge
with branch X, then committed the changes back to branch Y (as suggested here).
分支X 的修订历史记录现在丢失了吗?还是仍然可以通过某种方式访问?如果可以的话,怎么办?
Is the revision history for branch X now lost? Or is it still accessible somehow? And if so then how?
推荐答案
当您合并分支中的一系列历史记录时,将在目标分支上创建一个提交.有关更多信息,请参见svn书中的基本合并.您可以使用
When you merge a range of history from a branch a single commit will be created on the target branch. See basic merging in svn book for more info. You can see the merged commits in the history using the -g
option to svn log.
这是Trac项目的示例日志. r14725是r14724的合并.
Here is an example log from the Trac project. r14725 was a merge of r14724.
$svn log -g -r 14724:14725
------------------------------------------------------------------------
r14725 | jomae | 2016-04-15 09:48:06 -0700 (Fri, 15 Apr 2016) | 2 lines
1.2dev: merge [14724] from 1.0-stable (fix for #12364)
------------------------------------------------------------------------
r14724 | jomae | 2016-04-15 09:43:24 -0700 (Fri, 15 Apr 2016) | 2 lines
Merged via: r14725
1.0.11dev: make labels in batch-modify form focusable to the control (closes #12364)
这篇关于当我合并两个分支时,所有中间修订版都去哪儿了?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!