creating an empty file from diff using svn patch

439 Views Asked by At

I'm trying to move a version-controlled directory between two repositories using TortoiseSVN.

Simply copying the directory is not sufficient because I also want to move all svn:ignore properties, so I tried to create a patch: I opened the log (history) selected all revisions of the directory in question and exported a cumulative diff. I applied the patch to the target folder. For safety I compared the created dir with the (exported) original dir using WinMerge and found one empty file missing.

Surprisingly the diff contained this file:

Index: Project/SomeDir/SomeFile.cs
===================================================================
--- Project/SomeDir/SomeFile.cs (nicht existent)
+++ Project/SomeDir/SomeFile.cs (Revision 112)
@@ -0,0 +1 @@
 +    
\ No newline at end of file

I found that GNU patch has a switch for removing empty files after applying a patch:

-E --remove-empty-files

Remove output files that are empty after the patches have been applied. See Creating and Removing.

...and I expect a corresponding switch to be present in my svn client (svn patch). Is there such an option? Which patch tool is invoked? The command line help of svn doesn't answer both questions.

0

There are 0 best solutions below