changeset 48515:bd27dad294b7

simplemerge: remove now-unused `localorother` argument from `merge_lines()` Differential Revision: https://phab.mercurial-scm.org/D11902
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 07 Dec 2021 22:45:31 -0800
parents fb691fa90807
children 59524cb1cd73
files mercurial/simplemerge.py
diffstat 1 files changed, 15 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/simplemerge.py	Tue Dec 07 22:33:18 2021 -0800
+++ b/mercurial/simplemerge.py	Tue Dec 07 22:45:31 2021 -0800
@@ -96,7 +96,6 @@
         mid_marker=b'=======',
         end_marker=b'>>>>>>>',
         base_marker=None,
-        localorother=None,
         minimize=False,
     ):
         """Return merge in cvs-like form."""
@@ -128,28 +127,21 @@
                 for i in range(t[1], t[2]):
                     yield self.b[i]
             elif what == b'conflict':
-                if localorother == b'local':
-                    for i in range(t[3], t[4]):
-                        yield self.a[i]
-                elif localorother == b'other':
-                    for i in range(t[5], t[6]):
-                        yield self.b[i]
-                else:
-                    self.conflicts = True
-                    if start_marker is not None:
-                        yield start_marker + newline
-                    for i in range(t[3], t[4]):
-                        yield self.a[i]
-                    if base_marker is not None:
-                        yield base_marker + newline
-                        for i in range(t[1], t[2]):
-                            yield self.base[i]
-                    if mid_marker is not None:
-                        yield mid_marker + newline
-                    for i in range(t[5], t[6]):
-                        yield self.b[i]
-                    if end_marker is not None:
-                        yield end_marker + newline
+                self.conflicts = True
+                if start_marker is not None:
+                    yield start_marker + newline
+                for i in range(t[3], t[4]):
+                    yield self.a[i]
+                if base_marker is not None:
+                    yield base_marker + newline
+                    for i in range(t[1], t[2]):
+                        yield self.base[i]
+                if mid_marker is not None:
+                    yield mid_marker + newline
+                for i in range(t[5], t[6]):
+                    yield self.b[i]
+                if end_marker is not None:
+                    yield end_marker + newline
             else:
                 raise ValueError(what)