equal
deleted
inserted
replaced
410 i = 0 |
410 i = 0 |
411 while i < l: |
411 while i < l: |
412 yield text[i:i+csize] |
412 yield text[i:i+csize] |
413 i += csize |
413 i += csize |
414 |
414 |
415 if to == tn: |
415 tohash = gitindex(to) |
|
416 tnhash = gitindex(tn) |
|
417 if tohash == tnhash: |
416 return |
418 return |
417 # TODO: deltas |
419 # TODO: deltas |
418 l = len(tn) |
|
419 fp.write('index %s..%s\nGIT binary patch\nliteral %s\n' % |
420 fp.write('index %s..%s\nGIT binary patch\nliteral %s\n' % |
420 (gitindex(to), gitindex(tn), len(tn))) |
421 (tohash, tnhash, len(tn))) |
421 |
422 |
422 tn = ''.join([fmtline(l) for l in chunk(zlib.compress(tn))]) |
423 tn = ''.join([fmtline(l) for l in chunk(zlib.compress(tn))]) |
423 fp.write(tn) |
424 fp.write(tn) |
424 fp.write('\n') |
425 fp.write('\n') |
425 |
426 |