Mercurial > hg-stable
comparison mercurial/pure/mpatch.py @ 16683:525fdb738975
cleanup: eradicate long lines
author | Brodie Rao <brodie@sf.io> |
---|---|
date | Sat, 12 May 2012 15:54:54 +0200 |
parents | 8f7132fa5e59 |
children | 9a17576103a4 |
comparison
equal
deleted
inserted
replaced
16676:654b9e1966f7 | 16683:525fdb738975 |
---|---|
83 while pos < end: | 83 while pos < end: |
84 m.seek(pos) | 84 m.seek(pos) |
85 p1, p2, l = struct.unpack(">lll", m.read(12)) | 85 p1, p2, l = struct.unpack(">lll", m.read(12)) |
86 pull(new, frags, p1 - last) # what didn't change | 86 pull(new, frags, p1 - last) # what didn't change |
87 pull([], frags, p2 - p1) # what got deleted | 87 pull([], frags, p2 - p1) # what got deleted |
88 new.append((l, pos + 12)) # what got added | 88 new.append((l, pos + 12)) # what got added |
89 pos += l + 12 | 89 pos += l + 12 |
90 last = p2 | 90 last = p2 |
91 frags.extend(reversed(new)) # what was left at the end | 91 frags.extend(reversed(new)) # what was left at the end |
92 | 92 |
93 t = collect(b2, frags) | 93 t = collect(b2, frags) |
94 | 94 |
95 m.seek(t[1]) | 95 m.seek(t[1]) |
96 return m.read(t[0]) | 96 return m.read(t[0]) |