py3: hggettext stable
authorDan Villiom Podlaski Christiansen <danchr@gmail.com>
Thu, 29 Oct 2020 11:11:54 +0100
branchstable
changeset 45763 bea8cf87bef3
parent 45762 0599c83cdf5c
child 45764 18c17d63fdab
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
i18n/hggettext
--- 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__: