--- a/mercurial/simplemerge.py Tue Jul 29 11:55:01 2014 -0700
+++ b/mercurial/simplemerge.py Tue Aug 05 14:56:25 2014 -0700
@@ -82,8 +82,7 @@
start_marker='<<<<<<<',
mid_marker='=======',
end_marker='>>>>>>>',
- base_marker=None,
- reprocess=False):
+ base_marker=None):
"""Return merge in cvs-like form.
"""
self.conflicts = False
@@ -93,8 +92,6 @@
newline = '\r\n'
elif self.a[0].endswith('\r'):
newline = '\r'
- if base_marker and reprocess:
- raise CantReprocessAndShowBase
if name_a:
start_marker = start_marker + ' ' + name_a
if name_b:
@@ -102,8 +99,6 @@
if name_base and base_marker:
base_marker = base_marker + ' ' + name_base
merge_regions = self.merge_regions()
- if reprocess is True:
- merge_regions = self.reprocess_merge_regions(merge_regions)
for t in merge_regions:
what = t[0]
if what == 'unchanged':
@@ -278,37 +273,6 @@
ia = aend
ib = bend
- def reprocess_merge_regions(self, merge_regions):
- """Where there are conflict regions, remove the agreed lines.
-
- Lines where both A and B have made the same changes are
- eliminated.
- """
- for region in merge_regions:
- if region[0] != "conflict":
- yield region
- continue
- type, iz, zmatch, ia, amatch, ib, bmatch = region
- a_region = self.a[ia:amatch]
- b_region = self.b[ib:bmatch]
- matches = mdiff.get_matching_blocks(''.join(a_region),
- ''.join(b_region))
- next_a = ia
- next_b = ib
- for region_ia, region_ib, region_len in matches[:-1]:
- region_ia += ia
- region_ib += ib
- reg = self.mismatch_region(next_a, region_ia, next_b,
- region_ib)
- if reg is not None:
- yield reg
- yield 'same', region_ia, region_len + region_ia
- next_a = region_ia + region_len
- next_b = region_ib + region_len
- reg = self.mismatch_region(next_a, amatch, next_b, bmatch)
- if reg is not None:
- yield reg
-
def mismatch_region(next_a, region_ia, next_b, region_ib):
if next_a < region_ia or next_b < region_ib:
return 'conflict', None, None, next_a, region_ia, next_b, region_ib
@@ -437,11 +401,8 @@
else:
out = sys.stdout
- reprocess = not opts.get('no_minimal')
-
m3 = Merge3Text(basetext, localtext, othertext)
- for line in m3.merge_lines(name_a=name_a, name_b=name_b,
- reprocess=reprocess):
+ for line in m3.merge_lines(name_a=name_a, name_b=name_b):
out.write(line)
if not opts.get('print'):