How can I view the version tree for a file in SVN which shows the merges from branches back to trunk?

南楼画角 提交于 2019-12-06 00:14:46

For svn, a branch is just another directory, with the little difference that it knows some history: It knows where it was copied from. When you merge a branch into the trunk, Subversion will take all changes that where made to the branch since it was created (i.e. copied) and apply all those changes to the trunk. It will remember which changes have already been merged (so it's not totally true that Subversion doesn't store anything about the merges), hence knows not to apply them again.

So, merging in Subversion doesn't mean much more than applying some changes here that were made somewhere else. The idea of the branch graph therefore doesn't work well with Subversion (and the way of handling branches is probably the most often uttered criticism of Subversion).

If you have the choice, you might want to look at Mercurial, which has a usability quite similar to that of Subversion, but is much better at handling branches and merges.

If you're stuck with subversion, I hope I could at least give a little explanation. Also, the SVN Book is a very good introduction to Subversion and is definitely a must-read for new Subversion users.

Actually, SmartSVN is able to show merge arrows in the version tree. So IMHO it depends on the svn client you are using. TortoiseSVN doesn't do it for the moment AFAIK.

I don't think you can, because SVN does not store information about merges. Some other revision control systems do, such as git.

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