Show More
@@ -1044,8 +1044,8 b' class basefilectx(object):' | |||||
1044 | if ready: |
|
1044 | if ready: | |
1045 | visit.pop() |
|
1045 | visit.pop() | |
1046 | curr = decorate(f.data(), f) |
|
1046 | curr = decorate(f.data(), f) | |
|
1047 | curr = _annotatepair([hist[p] for p in pl], curr, diffopts) | |||
1047 | for p in pl: |
|
1048 | for p in pl: | |
1048 | curr = _annotatepair(hist[p], curr, diffopts) |
|
|||
1049 | if needed[p] == 1: |
|
1049 | if needed[p] == 1: | |
1050 | del hist[p] |
|
1050 | del hist[p] | |
1051 | del needed[p] |
|
1051 | del needed[p] | |
@@ -1073,13 +1073,17 b' class basefilectx(object):' | |||||
1073 | c = visit.pop(max(visit)) |
|
1073 | c = visit.pop(max(visit)) | |
1074 | yield c |
|
1074 | yield c | |
1075 |
|
1075 | |||
1076 | def _annotatepair(parent, child, diffopts): |
|
1076 | def _annotatepair(parents, child, diffopts): | |
1077 | blocks = mdiff.allblocks(parent[1], child[1], opts=diffopts) |
|
1077 | pblocks = [(parent, mdiff.allblocks(parent[1], child[1], opts=diffopts)) | |
1078 | for (a1, a2, b1, b2), t in blocks: |
|
1078 | for parent in parents] | |
1079 | # Changed blocks ('!') or blocks made only of blank lines ('~') |
|
1079 | # Mercurial currently prefers p2 over p1 for annotate. | |
1080 | # belong to the child. |
|
1080 | # TODO: change this? | |
1081 | if t == '=': |
|
1081 | for parent, blocks in pblocks: | |
1082 | child[0][b1:b2] = parent[0][a1:a2] |
|
1082 | for (a1, a2, b1, b2), t in blocks: | |
|
1083 | # Changed blocks ('!') or blocks made only of blank lines ('~') | |||
|
1084 | # belong to the child. | |||
|
1085 | if t == '=': | |||
|
1086 | child[0][b1:b2] = parent[0][a1:a2] | |||
1083 | return child |
|
1087 | return child | |
1084 |
|
1088 | |||
1085 | class filectx(basefilectx): |
|
1089 | class filectx(basefilectx): |
General Comments 0
You need to be logged in to leave comments.
Login now