Mercurial > public > mercurial-scm > hg
comparison mercurial/debugcommands.py @ 48023: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 |
comparison
equal
deleted
inserted
replaced
48022:f2a9db29cb2d | 48023:357307feaf61 |
---|---|
966 x[1].v1_mtime(), | 966 x[1].v1_mtime(), |
967 x[0], | 967 x[0], |
968 ) # sort by mtime, then by filename | 968 ) # sort by mtime, then by filename |
969 else: | 969 else: |
970 keyfunc = None # sort by filename | 970 keyfunc = None # sort by filename |
971 if opts['all']: | 971 entries = list(repo.dirstate._map.debug_iter(all=opts['all'])) |
972 entries = list(repo.dirstate._map.debug_iter()) | |
973 else: | |
974 entries = list(pycompat.iteritems(repo.dirstate)) | |
975 entries.sort(key=keyfunc) | 972 entries.sort(key=keyfunc) |
976 for file_, ent in entries: | 973 for file_, ent in entries: |
977 if ent.v1_mtime() == -1: | 974 if ent.v1_mtime() == -1: |
978 timestr = b'unset ' | 975 timestr = b'unset ' |
979 elif nodates: | 976 elif nodates: |