Show More
@@ -38,22 +38,18 b' class filelog(revlog):' | |||
|
38 | 38 | revs.reverse() |
|
39 | 39 | prev = [] |
|
40 | 40 | annotate = [] |
|
41 | ||
|
41 | 42 | for node in revs: |
|
42 | 43 | curr = self.read(node).splitlines(1) |
|
43 | 44 | linkrev = self.linkrev(node) |
|
44 | 45 | sm = SequenceMatcher(None, prev, curr) |
|
45 |
|
|
|
46 | new = [] | |
|
46 | 47 | for o, m, n, s, t in sm.get_opcodes(): |
|
47 |
if o |
|
|
48 |
annotate[m |
|
|
49 | [ (linkrev, l) for l in curr[s:t]] | |
|
50 | if o == 'insert': | |
|
51 | offset += m-n | |
|
52 | elif o == 'delete': | |
|
53 | del annotate[m+offset:n+offset] | |
|
54 | offset -= m-n | |
|
55 | assert len(annotate) == len(curr) | |
|
56 | prev = curr | |
|
48 | if o == 'equal': | |
|
49 | new += annotate[m:n] | |
|
50 | else: | |
|
51 | new += [(linkrev, l) for l in curr[s:t]] | |
|
52 | annotate, prev = new, curr | |
|
57 | 53 | return annotate |
|
58 | 54 | |
|
59 | 55 | class manifest(revlog): |
General Comments 0
You need to be logged in to leave comments.
Login now