changeset 45763:bea8cf87bef3 stable

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
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Thu, 29 Oct 2020 11:11:54 +0100
parents 0599c83cdf5c
children 18c17d63fdab
files i18n/hggettext
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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__: