diff -r 78f7f0d490ee -r 284a20269a97 mercurial/debugcommands.py --- a/mercurial/debugcommands.py Thu Jul 15 23:02:17 2021 +0200 +++ b/mercurial/debugcommands.py Fri Jul 16 14:08:26 2021 +0200 @@ -942,7 +942,12 @@ ), (b'', b'dates', True, _(b'display the saved mtime')), (b'', b'datesort', None, _(b'sort by saved mtime')), - (b'', b'dirs', False, _(b'display directories')), + ( + b'', + b'all', + False, + _(b'display dirstate-v2 tree nodes that would not exist in v1'), + ), ], _(b'[OPTION]...'), ) @@ -961,9 +966,10 @@ ) # sort by mtime, then by filename else: keyfunc = None # sort by filename - entries = list(pycompat.iteritems(repo.dirstate)) - if opts['dirs']: - entries.extend(repo.dirstate.directories()) + if opts['all']: + entries = list(repo.dirstate._map.debug_iter()) + else: + entries = list(pycompat.iteritems(repo.dirstate)) entries.sort(key=keyfunc) for file_, ent in entries: if ent.v1_mtime() == -1: