Mercurial > public > mercurial-scm > hg
diff mercurial/debugcommands.py @ 48556:ce8c82a5cd65
simplemerge: convert `merge_lines()` away from generator
We always consume all the lines and put them in a list anyway. By
making the function not a generator, we can later make it return an
additional value (to indicate if there were conflicts).
Differential Revision: https://phab.mercurial-scm.org/D11973
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 07 Jan 2022 18:42:31 -0800 |
parents | 04688c51f81f |
children | c6649c53073f |
line wrap: on
line diff
--- a/mercurial/debugcommands.py Tue Dec 14 13:12:56 2021 -0800 +++ b/mercurial/debugcommands.py Fri Jan 07 18:42:31 2022 -0800 @@ -272,7 +272,7 @@ x[fn].data() for x in (pa, p1, p2) ] m3 = simplemerge.Merge3Text(base, local, other) - ml = [l.strip() for l in m3.merge_lines()] + ml = [l.strip() for l in m3.merge_lines()[0]] ml.append(b"") elif at > 0: ml = p1[fn].data().split(b"\n")