Show More
@@ -160,7 +160,7 b' class Merge3Text(object):' | |||
|
160 | 160 | 'b', lines |
|
161 | 161 | Lines taken from b |
|
162 | 162 | |
|
163 | 'conflict', base_lines, a_lines, b_lines | |
|
163 | 'conflict', (base_lines, a_lines, b_lines) | |
|
164 | 164 | Lines from base were changed to either a or b and conflict. |
|
165 | 165 | """ |
|
166 | 166 | for t in self.merge_regions(): |
@@ -174,9 +174,11 b' class Merge3Text(object):' | |||
|
174 | 174 | elif what == b'conflict': |
|
175 | 175 | yield ( |
|
176 | 176 | what, |
|
177 |
|
|
|
178 |
self.a[t[ |
|
|
179 |
self. |
|
|
177 | ( | |
|
178 | self.base[t[1] : t[2]], | |
|
179 | self.a[t[3] : t[4]], | |
|
180 | self.b[t[5] : t[6]], | |
|
181 | ), | |
|
180 | 182 | ) |
|
181 | 183 | else: |
|
182 | 184 | raise ValueError(what) |
@@ -417,9 +419,9 b' def _picklabels(defaults, overrides):' | |||
|
417 | 419 | def _mergediff(m3, name_a, name_b, name_base): |
|
418 | 420 | lines = [] |
|
419 | 421 | conflicts = False |
|
420 | for group in m3.merge_groups(): | |
|
421 |
if |
|
|
422 |
base_lines, a_lines, b_lines = group |
|
|
422 | for what, group_lines in m3.merge_groups(): | |
|
423 | if what == b'conflict': | |
|
424 | base_lines, a_lines, b_lines = group_lines | |
|
423 | 425 | base_text = b''.join(base_lines) |
|
424 | 426 | b_blocks = list( |
|
425 | 427 | mdiff.allblocks( |
@@ -472,18 +474,18 b' def _mergediff(m3, name_a, name_b, name_' | |||
|
472 | 474 | lines.append(b">>>>>>>\n") |
|
473 | 475 | conflicts = True |
|
474 | 476 | else: |
|
475 |
lines.extend(group |
|
|
477 | lines.extend(group_lines) | |
|
476 | 478 | return lines, conflicts |
|
477 | 479 | |
|
478 | 480 | |
|
479 | 481 | def _resolve(m3, sides): |
|
480 | 482 | lines = [] |
|
481 | for group in m3.merge_groups(): | |
|
482 |
if |
|
|
483 | for what, group_lines in m3.merge_groups(): | |
|
484 | if what == b'conflict': | |
|
483 | 485 | for side in sides: |
|
484 |
lines.extend(group[side |
|
|
486 | lines.extend(group_lines[side]) | |
|
485 | 487 | else: |
|
486 |
lines.extend(group |
|
|
488 | lines.extend(group_lines) | |
|
487 | 489 | return lines |
|
488 | 490 | |
|
489 | 491 |
General Comments 0
You need to be logged in to leave comments.
Login now