Where did all the intermediate revisions go when I merged two branches?

拜拜、爱过 提交于 2019-12-25 04:43:15

问题


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.

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).

Is the revision history for branch X now lost? Or is it still accessible somehow? And if so then how?


回答1:


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.

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)


来源:https://stackoverflow.com/questions/36773473/where-did-all-the-intermediate-revisions-go-when-i-merged-two-branches

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!