Mercurial > public > mercurial-scm > hg-stable
diff mercurial/debugcommands.py @ 48045:357307feaf61
debugstate: Always call dirstatemap.debug_iter()
? passing it a new `all` argument for the `--all` CLI option,
instead of conditionally calling `.debug_iter()` or `.items()`
This prepares for the next commit.
Differential Revision: https://phab.mercurial-scm.org/D11462
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Mon, 20 Sep 2021 19:59:09 +0200 |
parents | 0fb328bb2459 |
children | cedfe2606adf |
line wrap: on
line diff
--- 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: