Mercurial > hg
comparison mercurial/patch.py @ 4096:49237d6ae97d
merge with crew-stable
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Fri, 16 Feb 2007 05:27:37 -0200 |
parents | 67982d3ee76c 4ced663bebf0 |
children | 226df1808f16 |
comparison
equal
deleted
inserted
replaced
4085:719488a98ebe | 4096:49237d6ae97d |
---|---|
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: | |
416 return | |
415 # TODO: deltas | 417 # TODO: deltas |
416 l = len(tn) | 418 l = len(tn) |
417 fp.write('index %s..%s\nGIT binary patch\nliteral %s\n' % | 419 fp.write('index %s..%s\nGIT binary patch\nliteral %s\n' % |
418 (gitindex(to), gitindex(tn), len(tn))) | 420 (gitindex(to), gitindex(tn), len(tn))) |
419 | 421 |
558 header.append('%s from %s\n' % (op, a)) | 560 header.append('%s from %s\n' % (op, a)) |
559 header.append('%s to %s\n' % (op, f)) | 561 header.append('%s to %s\n' % (op, f)) |
560 to = getfilectx(a, ctx1).data() | 562 to = getfilectx(a, ctx1).data() |
561 else: | 563 else: |
562 header.append('new file mode %s\n' % mode) | 564 header.append('new file mode %s\n' % mode) |
563 if util.binary(tn): | 565 if util.binary(tn): |
564 dodiff = 'binary' | 566 dodiff = 'binary' |
565 elif f in removed: | 567 elif f in removed: |
566 if f in srcs: | 568 if f in srcs: |
567 dodiff = False | 569 dodiff = False |
568 else: | 570 else: |
569 mode = gitmode(man1.execf(f)) | 571 mode = gitmode(man1.execf(f)) |