mercurial/patch.py
branchstable
changeset 12575 9b3913baba0c
parent 12574 77600d697d0e
child 12576 1c9bb7e00f71
--- a/mercurial/patch.py	Mon Sep 27 22:47:10 2010 +0200
+++ b/mercurial/patch.py	Tue Sep 28 00:41:07 2010 +0200
@@ -1588,7 +1588,7 @@
                     else:
                         header.append('deleted file mode %s\n' %
                                       gitmode[man1.flags(f)])
-                elif not to:
+                elif not to or util.binary(to):
                     # regular diffs cannot represent empty file deletion
                     losedatafn(f)
             else: