Reputation:
How to capture an svn copy followed by an edit in diff to reapply it as patch in another machine?
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
Upvotes: 0
Views: 379
Reputation: 208425
svn diff --notice-ancestry
By default svn diff
does not look at the ancestry of a file, so when you just type svn diff
it is looking at the repository for a file name b.txt
in the same directory. Use the --notice-ancestry
option to get b.txt
to diff against a.txt
in the repository. Note that to actually perform the patch on the other machine you will first need to perform the same svn copy
command, since b.txt
won't exist.
Upvotes: 2