diff -r 0934fef871f3 -r ed46895aa38c mercurial/patch.py --- a/mercurial/patch.py Sat Feb 17 09:54:58 2007 -0200 +++ b/mercurial/patch.py Sat Feb 17 09:54:59 2007 -0200 @@ -412,12 +412,13 @@ yield text[i:i+csize] i += csize - if to == tn: + tohash = gitindex(to) + tnhash = gitindex(tn) + if tohash == tnhash: return # TODO: deltas - l = len(tn) fp.write('index %s..%s\nGIT binary patch\nliteral %s\n' % - (gitindex(to), gitindex(tn), len(tn))) + (tohash, tnhash, len(tn))) tn = ''.join([fmtline(l) for l in chunk(zlib.compress(tn))]) fp.write(tn)