diff mercurial/patch.py @ 18824:f0d55e1b4855

diff: fix binary file removals in git mode. With the previous version, a binary file removal diff generated with
author Johan Bjork <jbjoerk@gmail.com>
date Mon, 04 Mar 2013 22:34:11 +0000
parents 242d2f4ec01c
children 6b827d84d286
line wrap: on
line diff
--- a/mercurial/patch.py	Sun Mar 24 16:56:25 2013 -0700
+++ b/mercurial/patch.py	Mon Mar 04 22:34:11 2013 +0000
@@ -1756,6 +1756,8 @@
                     else:
                         header.append('deleted file mode %s\n' %
                                       gitmode[man1.flags(f)])
+                        if util.binary(to):
+                            dodiff = 'binary'
                 elif not to or util.binary(to):
                     # regular diffs cannot represent empty file deletion
                     losedatafn(f)