--- a/mercurial/patch.py Thu Feb 15 10:15:08 2007 -0200
+++ b/mercurial/patch.py Fri Feb 16 05:27:37 2007 -0200
@@ -412,6 +412,8 @@
yield text[i:i+csize]
i += csize
+ if to == tn:
+ return
# TODO: deltas
l = len(tn)
fp.write('index %s..%s\nGIT binary patch\nliteral %s\n' %
@@ -560,8 +562,8 @@
to = getfilectx(a, ctx1).data()
else:
header.append('new file mode %s\n' % mode)
- if util.binary(tn):
- dodiff = 'binary'
+ if util.binary(tn):
+ dodiff = 'binary'
elif f in removed:
if f in srcs:
dodiff = False