Mercurial > public > mercurial-scm > hg
comparison mercurial/help.py @ 48923:428177ad70b0
help: remove pycompat.iteritems()
Differential Revision: https://phab.mercurial-scm.org/D12328
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 21 Feb 2022 11:10:08 -0700 |
parents | f254fc73d956 |
children | 7bd5f862b249 |
comparison
equal
deleted
inserted
replaced
48922:fe056166b40d | 48923:428177ad70b0 |
---|---|
295 cmdname = cmdutil.parsealiases(cmd)[0] | 295 cmdname = cmdutil.parsealiases(cmd)[0] |
296 if filtercmd(ui, cmdname, func, kw, docs): | 296 if filtercmd(ui, cmdname, func, kw, docs): |
297 continue | 297 continue |
298 results[b'commands'].append((cmdname, summary)) | 298 results[b'commands'].append((cmdname, summary)) |
299 for name, docs in itertools.chain( | 299 for name, docs in itertools.chain( |
300 pycompat.iteritems(extensions.enabled(False)), | 300 extensions.enabled(False).items(), |
301 pycompat.iteritems(extensions.disabled()), | 301 extensions.disabled().items(), |
302 ): | 302 ): |
303 if not docs: | 303 if not docs: |
304 continue | 304 continue |
305 name = name.rpartition(b'.')[-1] | 305 name = name.rpartition(b'.')[-1] |
306 if lowercontains(name) or lowercontains(docs): | 306 if lowercontains(name) or lowercontains(docs): |
309 try: | 309 try: |
310 mod = extensions.load(ui, name, b'') | 310 mod = extensions.load(ui, name, b'') |
311 except ImportError: | 311 except ImportError: |
312 # debug message would be printed in extensions.load() | 312 # debug message would be printed in extensions.load() |
313 continue | 313 continue |
314 for cmd, entry in pycompat.iteritems(getattr(mod, 'cmdtable', {})): | 314 for cmd, entry in getattr(mod, 'cmdtable', {}).items(): |
315 if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])): | 315 if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])): |
316 cmdname = cmdutil.parsealiases(cmd)[0] | 316 cmdname = cmdutil.parsealiases(cmd)[0] |
317 func = entry[0] | 317 func = entry[0] |
318 cmddoc = pycompat.getdoc(func) | 318 cmddoc = pycompat.getdoc(func) |
319 if cmddoc: | 319 if cmddoc: |