--- a/mercurial/logcmdutil.py Thu Jun 16 15:15:03 2022 +0200
+++ b/mercurial/logcmdutil.py Thu Jun 16 15:28:54 2022 +0200
@@ -5,7 +5,6 @@
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
-from __future__ import absolute_import
import itertools
import os
@@ -228,7 +227,7 @@
)
-class changesetdiffer(object):
+class changesetdiffer:
"""Generate diff of changeset with pre-configured filtering functions"""
def _makefilematcher(self, ctx):
@@ -262,7 +261,7 @@
return b' '.join(labels)
-class changesetprinter(object):
+class changesetprinter:
'''show changeset information when templating not requested.'''
def __init__(self, ui, repo, differ=None, diffopts=None, buffered=False):
@@ -328,7 +327,7 @@
if branch != b'default':
self.ui.write(columns[b'branch'] % branch, label=b'log.branch')
- for nsname, ns in pycompat.iteritems(self.repo.names):
+ for nsname, ns in self.repo.names.items():
# branches has special logic already handled above, so here we just
# skip it
if nsname == b'branches':
@@ -416,7 +415,7 @@
self.ui.write(b"\n\n")
else:
self.ui.write(
- columns[b'summary'] % description.splitlines()[0],
+ columns[b'summary'] % stringutil.firstline(description),
label=b'log.summary',
)
self.ui.write(b"\n")
@@ -705,7 +704,7 @@
@attr.s
-class walkopts(object):
+class walkopts:
"""Options to configure a set of revisions and file matcher factory
to scan revision/file history
"""
@@ -990,7 +989,7 @@
opts[b'_patslog'] = list(wopts.pats)
expr = []
- for op, val in sorted(pycompat.iteritems(opts)):
+ for op, val in sorted(opts.items()):
if not val:
continue
revop, listop = _opt2logrevset[op]