diff -r f2a9db29cb2d -r 357307feaf61 mercurial/debugcommands.py --- a/mercurial/debugcommands.py Fri Sep 17 13:33:45 2021 +0200 +++ b/mercurial/debugcommands.py Mon Sep 20 19:59:09 2021 +0200 @@ -968,10 +968,7 @@ ) # sort by mtime, then by filename else: keyfunc = None # sort by filename - if opts['all']: - entries = list(repo.dirstate._map.debug_iter()) - else: - entries = list(pycompat.iteritems(repo.dirstate)) + entries = list(repo.dirstate._map.debug_iter(all=opts['all'])) entries.sort(key=keyfunc) for file_, ent in entries: if ent.v1_mtime() == -1: