py3: hggettext
`itervalues()` is only available on Python 2. Since this script
doesn't currently refer to the main Mercurial modules, and as a result
doesn't have easy access to the `pycompat` module, I simply changed it
to use `value()` instead. Although this allocates a list on Python 2,
I'd consider that acceptable for a utility script; Mercurial doesn't
have all _that_ many commands anyway.
Differential Revision: https://phab.mercurial-scm.org/D9259
--- a/i18n/hggettext Thu Oct 29 11:37:22 2020 -0700
+++ b/i18n/hggettext Thu Oct 29 11:11:54 2020 +0100
@@ -123,7 +123,7 @@
if not cmdtable:
# Maybe we are processing mercurial.commands?
cmdtable = getattr(mod, 'table', {})
- functions.extend((c[0], False) for c in cmdtable.itervalues())
+ functions.extend((c[0], False) for c in cmdtable.values())
for func, rstrip in functions:
if func.__doc__: