diff -r 9b3913baba0c -r 1c9bb7e00f71 mercurial/patch.py --- a/mercurial/patch.py Tue Sep 28 00:41:07 2010 +0200 +++ b/mercurial/patch.py Tue Sep 28 00:41:08 2010 +0200 @@ -1569,6 +1569,9 @@ header.append('new file mode %s\n' % mode) elif ctx2.flags(f): losedatafn(f) + # In theory, if tn was copied or renamed we should check + # if the source is binary too but the copy record already + # forces git mode. if util.binary(tn): if opts.git: dodiff = 'binary'