设置简单的SVN项目布局:
svnadmin create proj-repo
svn co file://$PWD/proj-repo proj
cd proj
mkdir branches trunk tags features
svn add *
svn ci -m 'Basic SVN project setup.'
启动项目:
cd trunk
svn add README
svn ci -m 'Add README'
实施特点:
svn cp . ^/features/linux-port
cd ../../
svn co file://$PWD/proj-repo/features/linux-port proj-linux-port
cd proj-linux-port
svn ci -m "Implement feature 1."
svn ci -m "Implement feature 2."
svn ci -m 'Add last feature.'
在主开发部门工作:
svn switch ^/trunk
svn ci -m "Fix."
为新功能做好准备:
svn merge --reintegrate ^/features/linux-port
svn ci -m 'Integrate features.'
但现在:
svn log .
------------------------------------------------------------------------
r9 | user | 2013-07-30 18:38:01 +0300 (Tue, 30 Jul 2013) | 1 line
Integrate features.
------------------------------------------------------------------------
r8 | user | 2013-07-30 18:36:53 +0300 (Tue, 30 Jul 2013) | 1 line
Fix.
以及:
svn diff -r9
Index: README
===================================================================
--- README (revision 8)
+++ README (revision 9)
@@ -1,2 +1,5 @@
hello fix
+feature 1
+
+feature 2
+
+final feature
Property changes on: .
___________________________________________________________________
Added: svn:mergeinfo
Merged /features/linux-port:r2-8
因此,对于/features/linux-port:r2-8
的每个单独特性,我都会丢失后续的提交。是否有可能在不切换到HG/Git/Bzr/化石的情况下保存它们?
更新我们通常编写很好的提交消息,解释编码决策,并将链接放置到BTS。SVN删除这些信息,我们非常难过。
所以我们需要使用老式的Changelog
发布于 2013-07-30 16:15:23
哦,我只是仔细看了看:
svn help log
-g [--use-merge-history] : use/display additional information from merge
因此,完整的历史可用通常的SVN工具。
要查看实际差异,请使用hat路径语法:
svn diff -c 4 ^/
此外,我还在官方文件中找到了相应的部分:
http://svnbook.red-bean.com/en/1.7/svn.branchmerge.advanced.html
The svn blame command also takes the --use-merge-history (-g) option.
If this option is neglected, somebody looking at a line-by-line annotation
of file may get the mistaken impression that you were responsible for the lines
that fixed a certain error
https://stackoverflow.com/questions/17952025
复制相似问题