Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
18823:b2a36e9b9ccc | 18824:f0d55e1b4855 |
---|---|
1754 and copy[copyto[f]] == f)): | 1754 and copy[copyto[f]] == f)): |
1755 dodiff = False | 1755 dodiff = False |
1756 else: | 1756 else: |
1757 header.append('deleted file mode %s\n' % | 1757 header.append('deleted file mode %s\n' % |
1758 gitmode[man1.flags(f)]) | 1758 gitmode[man1.flags(f)]) |
1759 if util.binary(to): | |
1760 dodiff = 'binary' | |
1759 elif not to or util.binary(to): | 1761 elif not to or util.binary(to): |
1760 # regular diffs cannot represent empty file deletion | 1762 # regular diffs cannot represent empty file deletion |
1761 losedatafn(f) | 1763 losedatafn(f) |
1762 else: | 1764 else: |
1763 oflag = man1.flags(f) | 1765 oflag = man1.flags(f) |