如何捕获svn副本,然后在diff中编辑以在另一台机器中将其重新应用为补丁?
svn copy a.txt b.txt
vim b.txt <== some edits
svn diff <== this doesn't capture the copy -
but treats it as edit only causing problem with patch -p0
答案 0 :(得分:2)
svn diff --notice-ancestry
默认情况下,svn diff
不会查看文件的祖先,因此当您只键入svn diff
时,它会在同一目录中查找存储库中的文件名b.txt
。使用--notice-ancestry
选项让b.txt
与存储库中的a.txt
进行区分。请注意,要在另一台计算机上实际执行修补程序,首先需要执行相同的svn copy
命令,因为b.txt
将不存在。