--- a/mercurial/commands.py Tue Mar 13 22:18:06 2018 +0900
+++ b/mercurial/commands.py Sun Mar 18 12:28:19 2018 +0900
@@ -396,7 +396,7 @@
pieces = []
for f, sep in funcmap:
- l = [f(n) for n, dummy in lines]
+ l = [f(n) for n in lines]
if fm.isplain():
sizes = [encoding.colwidth(x) for x in l]
ml = max(sizes)
@@ -405,7 +405,7 @@
formats.append(['%s' for x in l])
pieces.append(l)
- for f, p, (n, l) in zip(zip(*formats), zip(*pieces), lines):
+ for f, p, n in zip(zip(*formats), zip(*pieces), lines):
fm.startitem()
fm.context(fctx=n.fctx)
fm.write(fields, "".join(f), *p)
@@ -413,9 +413,9 @@
fmt = "* %s"
else:
fmt = ": %s"
- fm.write('line', fmt, l)
-
- if not lines[-1][1].endswith('\n'):
+ fm.write('line', fmt, n.text)
+
+ if not lines[-1].text.endswith('\n'):
fm.plain('\n')
fm.end()